Convert libraries to use LIBADD

While here reduce a bit overlinking
This commit is contained in:
bapt 2014-11-25 11:07:26 +00:00
parent 1578ed600d
commit 6adce30d28
55 changed files with 66 additions and 138 deletions

View File

@ -33,8 +33,7 @@ PRIVATELIB= true
SHLIB_MAJOR= 2
# libatf-c++ depends on the C version of the ATF library to build.
DPADD= ${LIBATF_C}
LDADD= -latf-c
LIBADD+= atf_c
LDFLAGS+= -L${.OBJDIR}/../libatf-c

View File

@ -4,19 +4,9 @@
LIBARCHIVEDIR= ${.CURDIR}/../../contrib/libarchive
LIB= archive
DPADD= ${LIBZ}
LDADD= -lz
DPADD+= ${LIBBZ2}
LDADD+= -lbz2
CFLAGS+= -DHAVE_BZLIB_H=1
DPADD+= ${LIBLZMA}
LDADD+= -llzma
CFLAGS+= -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
DPADD+= ${LIBBSDXML}
LDADD+= -lbsdxml
LIBADD= z bz2 lzma bsdxml
CFLAGS+= -DHAVE_BZLIB_H=1 -DHAVE_LIBLZMA=1 -DHAVE_LZMA_H=1
# FreeBSD SHLIB_MAJOR value is managed as part of the FreeBSD system.
# It has no real relation to the libarchive version number.
@ -27,11 +17,9 @@ CFLAGS+= -I${.OBJDIR}
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_OPENSSL
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
LIBADD+= crypto
.else
DPADD+= ${LIBMD}
LDADD+= -lmd
LIBADD+= md
.endif
.if ${MK_ICONV} != "no"

View File

@ -6,9 +6,8 @@ MAN=
PROG=libarchive_test
INTERNALPROG=yes # Don't install this; it's just for testing
DPADD=${LIBBZ2} ${LIBZ} ${LIBMD} ${LIBCRYPTO} ${LIBBSDXML}
LDADD= -L ${.OBJDIR}/.. -larchive
LDADD+= -lz -lbz2 -llzma -lmd -lcrypto -lbsdxml
LIBADD= z bz2 lzma md crypto bsdxml
CFLAGS+= -g
CFLAGS+= -I${.CURDIR}/.. -I${.OBJDIR}
CFLAGS+= -I${LIBARCHIVEDIR}/libarchive -I${LIBARCHIVEDIR}/test_utils

View File

@ -15,8 +15,7 @@ CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DHAVE_LIBCRYPTO
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
LIBADD= crypto
.endif
SRCS= asn1.c snmp.c snmpagent.c snmpclient.c snmpcrypto.c support.c

View File

@ -62,8 +62,7 @@ CFLAGS+= -I${HDRDIR} -I${LIBCXXRTDIR} -nostdlib -DLIBCXXRT
CXXFLAGS+= -std=c++11
.endif
DPADD= ${LIBCXXRT}
LDADD= -lcxxrt
LIBADD+= cxxrt
LDFLAGS+= --verbose
INCSGROUPS= STD EXP EXT

View File

@ -44,13 +44,11 @@ CFLAGS+=${CANCELPOINTS_CFLAGS}
#
# Link with static libcompiler_rt.a.
#
DPADD+= ${LIBCOMPILER_RT}
LDFLAGS+= -nodefaultlibs
LDADD+= -lcompiler_rt
LIBADD+= compiler_rt
.if ${MK_SSP} != "no"
DPADD+= ${LIBSSP_NONSHARED}
LDADD+= -lssp_nonshared
LIBADD+= ssp_nonshared
.endif
# Extras that live in either libc.a or libc_nonshared.a

View File

@ -6,8 +6,7 @@ SRCS= camlib.c scsi_cmdparse.c scsi_all.c scsi_da.c scsi_sa.c cam.c \
ata_all.c smp_all.c
INCS= camlib.h
DPADD= ${LIBSBUF}
LDADD= -lsbuf
LIBADD= sbuf
MAN= cam.3 cam_cdbparse.3

View File

@ -21,8 +21,7 @@ INCS+= libcapsicum_random.h
INCS+= libcapsicum_service.h
INCS+= libcapsicum_sysctl.h
DPADD= ${LIBNV}
LDADD= -lnv
LIBADD= nv
CFLAGS+=-I${.CURDIR}
CFLAGS+=-I${.CURDIR}/../libnv

View File

@ -8,8 +8,7 @@ SHLIBDIR?= /lib
SRCS= libcasper.c
INCS= libcasper.h
DPADD= ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG}
LDADD= -lcapsicum -lnv -lpjdlog
LIBADD= capsicum nv pjdlog
CFLAGS+=-I${.CURDIR}
CFLAGS+=-I${.CURDIR}/../libpjdlog

View File

@ -7,7 +7,6 @@ TESTSDIR= ${TESTSBASE}/lib/libcrypt
ATF_TESTS_C= crypt_tests
CFLAGS+= -I${.CURDIR:H}
DPADD+= ${LIBCRYPT}
LDADD+= -lcrypt
LIBADD= crypt
.include <bsd.test.mk>

View File

@ -30,14 +30,12 @@ SHLIB_MINOR= 0
SRCS= cuse_lib.c
INCS= cuse.h
MAN= cuse.3
PTHREAD_LIBS?= -lpthread
CFLAGS+= -D_GNU_SOURCE
.if defined(HAVE_DEBUG)
CFLAGS+= -g
CFLAGS+= -DHAVE_DEBUG
.endif
DPADD+= ${LIBPTHREAD}
LDADD+= ${PTHREAD_LIBS}
LIBADD= pthread
MLINKS=
MLINKS+= cuse.3 cuse_alloc_unit_number.3

View File

@ -7,8 +7,7 @@ SHLIB_MAJOR= 7
SRCS= devstat.c
INCS= devstat.h
DPADD= ${LIBKVM}
LDADD= -lkvm
LIBADD= kvm
MAN= devstat.3

View File

@ -6,8 +6,7 @@ INCS= dpv.h
MAN= dpv.3
MLINKS= dpv.3 dpv_free.3
DPADD= ${LIBDIALOG} ${LIBFIGPAR} ${LIBNCURSESW} ${LIBUTIL}
LDADD= -ldialog -lfigpar -lncursesw -lutil
LIBADD= dialog figpar util ncursesw
SRCS= dialog_util.c dialogrc.c dprompt.c dpv.c status.c util.c

View File

@ -96,8 +96,7 @@ sys/elf32.h sys/elf64.h sys/elf_common.h: ${.CURDIR}/../../sys/${.TARGET}
mkdir -p ${.OBJDIR}/sys
ln -sf ${.CURDIR}/../../sys/${.TARGET} ${.TARGET}
LDADD+= -lelf
DPADD+= ${LIBELF}
LIBADD+= elf
SHLIB_MAJOR= 4

View File

@ -10,8 +10,7 @@ OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \
hist.c key.c map.c \
parse.c prompt.c read.c refresh.c search.c sig.c term.c tty.c vi.c
DPADD= ${LIBNCURSESW}
LDADD= -lncursesw
LIBADD= ncursesw
MAN= editline.3 editrc.5

View File

@ -10,8 +10,7 @@ SHLIB_MAJOR= 1
INCS= execinfo.h
SRCS= backtrace.c symtab.c unwind.c
DPADD= ${LIBELF}
LDADD= -lelf
LIBADD= elf
MAN= backtrace.3

View File

@ -16,11 +16,9 @@ CFLAGS+= -DINET6
.if ${MK_OPENSSL} != "no"
CFLAGS+= -DWITH_SSL
DPADD= ${LIBSSL} ${LIBCRYPTO}
LDADD= -lssl -lcrypto
LIBADD+= ssl crypto
.else
DPADD= ${LIBMD}
LDADD= -lmd
LIBADD+= md
.endif
CFLAGS+= -DFTP_COMBINE_CWDS

View File

@ -13,8 +13,7 @@ CFLAGS += -I${.CURDIR}
WARNS?= 3
DPADD= ${LIBBSDXML} ${LIBSBUF}
LDADD= -lbsdxml -lsbuf
LIBADD+= bsdxml sbuf
MAN= libgeom.3

View File

@ -18,8 +18,7 @@ SRCS= buffer.c dane.c dname.c dnssec.c dnssec_sign.c dnssec_verify.c \
SRCS+= b64_ntop.c b64_pton.c
DPADD+= ${LIBCRYPTO}
LDADD+= -lcrypto
LIBADD= crypto
WARNS ?= 3

View File

@ -7,8 +7,7 @@ CONTRDIR= ${.CURDIR}/../../contrib/file
LIB= magic
SHLIB_MAJOR= 4
DPADD= ${LIBZ}
LDADD= -lz
LIBADD= z
MAN= libmagic.3 magic.5
SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \

View File

@ -3,8 +3,7 @@
WARNS?= 3
LIB= memstat
SHLIB_MAJOR= 3
DPADD= ${LIBKVM}
LDADD= -lkvm
LIBADD+= kvm
SRCS+= memstat.c
SRCS+= memstat_all.c
SRCS+= memstat_malloc.c

View File

@ -4,8 +4,7 @@
LIB= mp
SHLIB_MAJOR= 7
DPADD= ${LIBCRYPTO}
LDADD= -lcrypto
LIBADD= crypto
MAN= libmp.3
INCS= mp.h
SRCS= mpasbn.c

View File

@ -4,7 +4,6 @@ TESTSDIR= ${TESTSBASE}/lib/libmp
TAP_TESTS_C+= legacy_test
DPADD+= ${LIBCRYPTO} ${LIBMP}
LDADD+= -lcrypto -lmp
LIBADD+= mp
.include <bsd.test.mk>

View File

@ -9,8 +9,7 @@ TAP_TESTS_C+= nvlist_get_test
TAP_TESTS_C+= nvlist_move_test
TAP_TESTS_C+= nvlist_send_recv_test
DPADD+= ${LIBNV}
LDADD+= -lnv
LIBADD+= nv
WARNS?= 6

View File

@ -27,8 +27,7 @@ CFLAGS+= -DINSECURE_OVERRIDE -DPATH_ACCESS_FILE=${ACCESSFILE}
WARNS?= 0
DPADD= ${LIBMD}
LDADD= -lmd
LIBADD= md
MAN= ${OPIE_DIST}/opie.4 ${OPIE_DIST}/opiekeys.5 ${OPIE_DIST}/opieaccess.5

View File

@ -14,8 +14,7 @@ CFLAGS+= -I${PAMDIR}/include -I${.CURDIR}/../../libpam
NO_PIC=
.else
SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR}
DPADD+= ${LIBPAM}
LDADD+= -lpam
LIBADD+= pam
.endif
.include "../Makefile.inc"

View File

@ -32,7 +32,6 @@ CFLAGS+=-D_FREEFALL_CONFIG
WARNS?= 3
.endif
DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
LDADD= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
LIBADD+= krb5
.include <bsd.lib.mk>

View File

@ -28,7 +28,6 @@ LIB= pam_ksu
SRCS= pam_ksu.c
MAN= pam_ksu.8
DPADD= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
LDADD= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
LIBADD+= krb5
.include <bsd.lib.mk>

View File

@ -28,7 +28,6 @@ LIB= pam_nologin
SRCS= pam_nologin.c
MAN= pam_nologin.8
DPADD= ${LIBUTIL}
LDADD= -lutil
LIBADD+= util
.include <bsd.lib.mk>

View File

@ -29,7 +29,6 @@ LIB= pam_opie
SRCS= pam_opie.c
MAN= pam_opie.8
DPADD= ${LIBOPIE}
LDADD= -lopie
LIBADD+= opie
.include <bsd.lib.mk>

View File

@ -4,7 +4,6 @@ LIB= pam_opieaccess
SRCS= ${LIB}.c
MAN= pam_opieaccess.8
DPADD= ${LIBOPIE}
LDADD= -lopie
LIBADD+= opie
.include <bsd.lib.mk>

View File

@ -10,8 +10,7 @@ MAN= pam_passwdqc.8
WARNS?= 2
CFLAGS+= -I${SRCDIR}
DPADD= ${LIBCRYPT}
LDADD= -lcrypt
LIBADD+= crypt
.include <bsd.lib.mk>

View File

@ -29,7 +29,6 @@ SRCS= pam_radius.c
MAN= pam_radius.8
WARNS?= 3
DPADD= ${LIBRADIUS}
LDADD= -lradius
LIBADD+= radius
.include <bsd.lib.mk>

View File

@ -13,9 +13,7 @@ SRCS+= roaming_dummy.c
WARNS?= 3
CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
DPADD= ${LIBSSH} ${LIBCRYPTO} ${LIBCRYPT}
LDADD= ${LDSSH} -lcrypto -lcrypt
USEPRIVATELIB= ssh
LIBADD= ssh
.include <bsd.lib.mk>

View File

@ -28,7 +28,6 @@ LIB= pam_tacplus
SRCS= pam_tacplus.c
MAN= pam_tacplus.8
DPADD= ${LIBTACPLUS}
LDADD= -ltacplus
LIBADD+= tacplus
.include <bsd.lib.mk>

View File

@ -41,13 +41,11 @@ LIB= pam_unix
SRCS= pam_unix.c
MAN= pam_unix.8
DPADD+= ${LIBUTIL} ${LIBCRYPT}
LDADD+= -lutil -lcrypt
LIBADD+= util crypt
.if ${MK_NIS} != "no"
CFLAGS+= -DYP
DPADD+= ${LIBYPCLNT}
LDADD+= -lypclnt
LIBADD+= ypclnt
.endif
.include <bsd.lib.mk>

View File

@ -13,8 +13,7 @@ SHLIB_MAJOR= 0
CFLAGS+=-I${.CURDIR}
DPADD= ${LIBUTIL}
LDADD= -lutil
LIBADD= util
WARNS?= 6

View File

@ -18,16 +18,13 @@ CFLAGS+= -I${.CURDIR}
.if ${MK_CXX} == "no"
CFLAGS+= -DNO_CXA_DEMANGLE
.elif ${MK_LIBCPLUSPLUS} != "no"
LDADD+= -lcxxrt
DPADD+= ${LIBCXXRT}
LIBADD+= cxxrt
.else
LDADD+= -lsupc++
DPADD+= ${LIBSTDCPLUSPLUS}
LIBADD+= supcplusplus
.endif
.if ${MK_CDDL} != "no"
LDADD+= -lctf
DPADD+= ${LIBCTF}
LIBADD+= ctf
IGNORE_PRAGMA= YES
CFLAGS+= -I${.CURDIR}/../../cddl/contrib/opensolaris/lib/libctf/common \
-I${.CURDIR}/../../sys/cddl/contrib/opensolaris/uts/common \

View File

@ -19,8 +19,7 @@ INCS= libprocstat.h
CFLAGS+= -I. -I${.CURDIR} -D_KVM_VNODE
SHLIB_MAJOR= 1
DPADD= ${LIBELF} ${LIBKVM} ${LIBUTIL}
LDADD= -lelf -lkvm -lutil
LIBADD= elf kvm util
MAN= libprocstat.3

View File

@ -70,13 +70,11 @@ MLINKS+=libradius.3 rad_acct_open.3 \
WARNS?= 3
.if ${MK_OPENSSL} == "no"
DPADD= ${LIBMD}
LDADD= -lmd
.else
DPADD= ${LIBCRYPTO}
LDADD= -lcrypto
.if ${MK_OPENSSL} != "no"
LIBADD+= crypto
CFLAGS+= -DWITH_SSL
.else
LIBADD+= md
.endif
.include <bsd.lib.mk>

View File

@ -5,8 +5,7 @@ SHLIB_MAJOR= 1
SRCS+= rpcsec_gss.c rpcsec_gss_prot.c rpcsec_gss_conf.c rpcsec_gss_misc.c \
svc_rpcsec_gss.c
DPADD+= ${LIBGSSAPI}
LDADD+= -lgssapi
LIBADD= gssapi
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map

View File

@ -9,8 +9,7 @@ CFLAGS+=-I${.CURDIR}/../libc/include -I${.CURDIR}
CFLAGS+=-fexceptions
.endif
CFLAGS+=-Winline -Wall
DPADD= ${LIBPTHREAD}
LDADD= -lpthread
LIBADD= pthread
WARNS?= 2

View File

@ -6,8 +6,7 @@ TESTSRC= ${SRCTOP}/contrib/netbsd-tests/lib/librt
TESTSDIR= ${TESTSBASE}/lib/librt
DPADD+= ${LIBRT}
LDADD+= -lrt
LIBADD= rt
NETBSD_ATF_TESTS_C= sched_test
NETBSD_ATF_TESTS_C+= sem_test

View File

@ -7,8 +7,7 @@ CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs
LIB= smb
SHLIB_MAJOR= 4
DPADD= ${LIBKICONV}
LDADD= -lkiconv
LIBADD= kiconv
SRCS= rcfile.c ctx.c cfopt.c subr.c nls.c rap.c mbuf.c rq.c file.c \
print.c \

View File

@ -3,6 +3,7 @@
PRIVATELIB= yes
LIB= sqlite3
SHLIB_MAJOR?= 0
LIBADD+= pthreads
SRCS= sqlite3.c

View File

@ -32,8 +32,7 @@ MLINKS= thrd_create.3 call_once.3 \
thrd_create.3 tss_get.3 \
thrd_create.3 tss_set.3
DPADD= ${LIBPTHREAD}
LDADD= -lpthread
LIBADD= pthread
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map

View File

@ -28,8 +28,7 @@ LIB= tacplus
SRCS= taclib.c
INCS= taclib.h
CFLAGS+= -Wall
DPADD= ${LIBMD}
LDADD= -lmd
LIBADD= md
SHLIB_MAJOR= 5
MAN= libtacplus.3 tacplus.conf.5

View File

@ -19,8 +19,7 @@ MLINKS+=ulog_login.3 ulog_login_pseudo.3 \
utempter_remove_added_record.3 removeFromUtmp.3 \
utempter_remove_record.3 removeLineFromUtmp.3
DPADD= ${LIBMD}
LDADD= -lmd
LIBADD= md
VERSION_DEF= ${.CURDIR}/../libc/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map

View File

@ -28,8 +28,7 @@ SRCS= alloc.c autotrust.c config_file.c configlexer.l configparser.y \
WARNS?= 3
DPADD+= ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
LDADD+= -lssl -lcrypto -lpthread
LIBADD= ssl crypto pthread
# Misnamed file in upstream source
configlexer.l: configlexer.lex

View File

@ -19,8 +19,7 @@ PTHREAD_LIBS?= -lpthread
WARNS?= 2
DPADD= ${LIBPTHREAD}
LDADD= ${PTHREAD_LIBS}
LIBADD= pthread
MLINKS+= libusb.3 usb.3

View File

@ -9,7 +9,6 @@ TAP_TESTS_C+= pidfile_test
TAP_TESTS_C+= trimdomain_test
TAP_TESTS_C+= trimdomain-nodomain_test
DPADD+= ${LIBUTIL}
LDADD+= -lutil
LIBADD+= util
.include <bsd.test.mk>

View File

@ -41,8 +41,7 @@ NETBSD_ATF_TESTS_C+= tanh_test
CSTD= c99
LDADD+= -lm
DPADD+= ${LIBM}
LIBADD+= m
#COPTS+= -Wfloat-equal
# Copied from lib/msun/Makefile

View File

@ -54,8 +54,7 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
CFLAGS+= -I${NCURSES_DIR}/menu
DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}}
LDADD= -lncurses${LIB_SUFFIX}
LIBADD+= ncurses${LIB_SUFFIX}
.if defined(ENABLE_WIDEC)
INCS= form.h

View File

@ -40,8 +40,7 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}}
LDADD= -lncurses${LIB_SUFFIX}
LIBADD+= ncurses${LIB_SUFFIX}
.if defined(ENABLE_WIDEC)
INCS= menu.h eti.h

View File

@ -29,8 +29,7 @@ CLEANFILES= ncurses_def.h
CFLAGS+= -I${SRCDIR}
DPADD= ${LIBNCURSES${LIB_SUFFIX:tu}}
LDADD= -lncurses${LIB_SUFFIX}
LIBADD+= ncurses${LIB_SUFFIX}
.if defined(ENABLE_WIDEC)
INCS= panel.h