Skip to content

Commit

Permalink
Convert usr.sbin to LIBADD
Browse files Browse the repository at this point in the history
Reduce overlinking
  • Loading branch information
bapt committed Nov 25, 2014
1 parent c97038f commit c6db814
Show file tree
Hide file tree
Showing 163 changed files with 178 additions and 434 deletions.
3 changes: 1 addition & 2 deletions usr.sbin/acpi/acpidb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ MAN= acpidb.8
WARNS?= 3

CFLAGS+= -DACPI_EXEC_APP -fno-strict-aliasing
DPADD= ${LIBPTHREAD}
LDADD= -lpthread
LIBADD= pthread

.include <bsd.prog.mk>
7 changes: 0 additions & 7 deletions usr.sbin/amd/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ CFLAGS+= -DYES_HESIOD

CFLAGS+= -DHOST_CPU=\"${MACHINE_CPUARCH}\" -DHOST_ARCH=\"${MACHINE_ARCH}\"

.if exists(${.OBJDIR}/../libamu)
LIBAMUDIR= ${.OBJDIR}/../libamu
.else
LIBAMUDIR= ${.CURDIR}/../libamu
.endif
LIBAMU= ${LIBAMUDIR}/libamu.a

RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen
MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x
NFS_PROT_X= ${DESTDIR}/usr/include/rpcsvc/nfs_prot.x
Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/amd/amd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ SRCS+= srvr_amfs_auto.c srvr_nfs.c
CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amd \
-I${DESTDIR}/usr/include/rpcsvc

DPADD= ${LIBAMU} ${LIBWRAP}
LDADD= ${LIBAMU} -lwrap
LIBADD= amu wrap

CLEANFILES+= conf_parse.c conf_parse.h conf_tok.c

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/amd/amq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ SRCS= amq.c amq_clnt.c amq_xdr.c

CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

.include <bsd.prog.mk>
5 changes: 2 additions & 3 deletions usr.sbin/amd/fixmount/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,11 @@

PROG= fixmount
MAN= fixmount.8
SRCS= fixmount.c
SRCS= fixmount.c

# These would be links created by the GNU-style configure
SRCS+= checkmount_bsd44.c

DPADD= ${LIBAMU} ${LIBRPCSVC}
LDADD= ${LIBAMU} -lrpcsvc
LIBADD+= amu rpcsvc

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/amd/fsinfo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ SRCS+= wr_bparam.c wr_dumpset.c wr_exportfs.c wr_fstab.c

CFLAGS+= -I${.CURDIR}/../../../contrib/amd/fsinfo

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

CLEANFILES+= fsi_gram.c fsi_gram.h fsi_lex.c

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/amd/hlfsd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ SRCS= hlfsd.c homedir.c nfs_prot_svc.c stubs.c

CFLAGS+= -I${.CURDIR}/../../../contrib/amd/hlfsd

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/amd/mk-amd-map/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
PROG= mk-amd-map
MAN= mk-amd-map.8

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/amd/pawd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ SRCS= pawd.c amq_clnt.c amq_xdr.c

CFLAGS+= -I${.CURDIR}/../../../contrib/amd/amq

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/amd/wire-test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
PROG= wire-test
MAN= wire-test.8

DPADD= ${LIBAMU}
LDADD= ${LIBAMU}
LIBADD= amu

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/ancontrol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MAN= ancontrol.8
WARNS?= 3
CFLAGS+= -DANCACHE -I${.CURDIR}/../../sys

DPADD= ${LIBMD}
LDADD= -lmd
LIBADD= md

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/apmd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SRCS= apmd.c apmdlex.l apmdparse.y y.tab.h

WARNS?= 3

DPADD= ${LIBL}
LDADD= -ll
LIBADD= l

CFLAGS+= -I${.CURDIR}

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/asf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ PROG= asf
SRCS= asf.c asf_kld.c asf_kvm.c asf_prog.c
MAN= asf.8

DPADD= ${LIBKVM}
LDADD= -lkvm
LIBADD= kvm

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/audit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR}
PROG= audit
MAN= audit.8

DPADD= ${LIBBSM}
LDADD= -lbsm
LIBADD= bsm

WARNS?= 5

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/auditd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ PROG= auditd
SRCS= auditd.c audit_warn.c auditd_fbsd.c
MAN= auditd.8

DPADD= ${LIBAUDITD} ${LIBBSM}
LDADD= -lauditd -lbsm
LIBADD= auditd bsm

WARNS?= 3

Expand Down
5 changes: 1 addition & 4 deletions usr.sbin/auditdistd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ SRCS+= sandbox.c sender.c subr.c
SRCS+= token.l trail.c
MAN= auditdistd.8 auditdistd.conf.5

DPADD= ${LIBL} ${LIBPTHREAD} ${LIBUTIL}
LDADD= -ll -lpthread -lutil
DPADD+= ${LIBCRYPTO} ${LIBSSL}
LDADD+= -lcrypto -lssl
LIBADD+= l pthread util crypto ssl

YFLAGS+=-v

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/auditreduce/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR}
PROG= auditreduce
MAN= auditreduce.1

DPADD= ${LIBBSM}
LDADD= -lbsm
LIBADD= bsm

WARNS?= 3

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/authpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ SRCS= authpf.c
# XXX ALTQ:
CFLAGS+= -DENABLE_ALTQ

LDADD+= -lm -lmd -lutil
DPADD+= ${LIBM} ${LIBMD} ${LIBUTIL}
LIBADD= m md util

WARNS?= 3

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/autofs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ CFLAGS+=-I${.CURDIR}/../../sys/fs/autofs

MAN= automount.8 automountd.8 autounmountd.8 auto_master.5

DPADD= ${LIBUTIL}
LDADD= -lutil
LIBADD= util

# Needed for getmntopts.c
MOUNT= ${.CURDIR}/../../sbin/mount
Expand Down
5 changes: 2 additions & 3 deletions usr.sbin/bhyve/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

PROG= bhyve

DEBUG_FLAGS= -g -O0
DEBUG_FLAGS= -g -O0

MAN= bhyve.8

Expand Down Expand Up @@ -43,8 +43,7 @@ SRCS= \
.PATH: ${.CURDIR}/../../sys/amd64/vmm
SRCS+= vmm_instruction_emul.c

DPADD= ${LIBVMMAPI} ${LIBMD} ${LIBUTIL} ${LIBPTHREAD}
LDADD= -lvmmapi -lmd -lutil -lpthread
LIBADD= vmmapi md util pthread

WARNS?= 2

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bhyvectl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ SRCS= bhyvectl.c

MAN=

DPADD= ${LIBVMMAPI} ${LIBUTIL}
LDADD= -lvmmapi -lutil
LIBADD= vmmapi util

WARNS?= 3

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bhyveload/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ PROG= bhyveload
SRCS= bhyveload.c
MAN= bhyveload.8

DPADD+= ${LIBVMMAPI} ${LIBUTIL}
LDADD+= -lvmmapi -lutil
LIBADD= vmmapi util

WARNS?= 3

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/ath3kfw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

PROG= ath3kfw
MAN= ath3kfw.8
DPADD+= ${LIBUSB}
LDADD+= -lusb
LIBADD+= usb

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/bt3cfw/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ PROG= bt3cfw
MAN= bt3cfw.8
WARNS?= 2

DPADD= ${LIBNETGRAPH}
LDADD= -lnetgraph
LIBADD+= netgraph

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/bthidcontrol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ SRCS= bthidcontrol.c hid.c lexer.l parser.y sdp.c
WARNS?= 1
CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR}/../bthidd

DPADD= ${LIBBLUETOOTH} ${LIBSDP} ${LIBUSBHID}
LDADD= -lbluetooth -lsdp -lusbhid
LIBADD+= bluetooth sdp usbhid

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/bthidd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ SRCS= bthidd.c client.c hid.c kbd.c lexer.l parser.y server.c \
CFLAGS+= -I${.CURDIR}
DEBUG_FLAGS= -g

DPADD= ${LIBBLUETOOTH} ${LIBUSBHID}
LDADD= -lbluetooth -lusbhid
LIBADD+= bluetooth usbhid

NO_WMISSING_VARIABLE_DECLARATIONS=

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/btpand/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SRCS= btpand.c bnep.c channel.c client.c event.c packet.c server.c sdp.c tap.c

WARNS?= 3

DPADD+= ${LIBBLUETOOTH} ${LIBSDP} ${LIBUTIL}
LDADD+= -lbluetooth -lsdp -lutil
LIBADD= bluetooth sdp util

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/hccontrol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ SRCS= send_recv.c link_policy.c link_control.c \
util.c
WARNS?= 2

DPADD= ${LIBBLUETOOTH}
LDADD= -lbluetooth
LIBADD= bluetooth

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/hcsecd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ SRCS= hcsecd.c lexer.l parser.y
WARNS?= 2
CFLAGS+= -I${.CURDIR}

DPADD= ${LIBBLUETOOTH}
LDADD= -lbluetooth
LIBADD= bluetooth

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/hcseriald/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ PROG= hcseriald
MAN= hcseriald.8
WARNS?= 2

DPADD= ${LIBNETGRAPH}
LDADD= -lnetgraph
LIBADD= netgraph

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/l2control/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MAN= l2control.8
SRCS= l2cap.c l2control.c
WARNS?= 2

DPADD= ${LIBBLUETOOTH}
LDADD= -lbluetooth
LIBADD= bluetooth

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/l2ping/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ PROG= l2ping
MAN= l2ping.8
WARNS?= 2

DPADD= ${LIBBLUETOOTH}
LDADD= -lbluetooth
LIBADD= bluetooth

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/rfcomm_pppd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ MAN= rfcomm_pppd.8
SRCS= rfcomm_pppd.c rfcomm_sdp.c
WARNS?= 2

DPADD= ${LIBBLUETOOTH} ${LIBSDP}
LDADD= -lbluetooth -lsdp
LIBADD= bluetooth sdp

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bluetooth/sdpcontrol/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ MAN= sdpcontrol.8
SRCS= sdpcontrol.c search.c
WARNS?= 2

DPADD= ${LIBBLUETOOTH} ${LIBSDP}
LDADD= -lbluetooth -lsdp
LIBADD= bluetooth sdp

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/boot0cfg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
PROG= boot0cfg
MAN= boot0cfg.8

DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
LDADD= -lgeom -lbsdxml -lsbuf
LIBADD= geom

NO_WCAST_ALIGN=

Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/boot98cfg/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ MAN= boot98cfg.8

WARNS?= 2

DPADD= ${LIBGEOM}
LDADD= -lgeom
LIBADD= geom

.include <bsd.prog.mk>
3 changes: 1 addition & 2 deletions usr.sbin/bsdinstall/distextract/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

BINDIR= /usr/libexec/bsdinstall
PROG= distextract
DPADD= ${LIBARCHIVE} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM}
LDADD= -larchive -lncursesw -ldialog -lm
LIBADD= archive ncursesw dialog m

WARNS?= 6
MAN=
Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bsdinstall/distfetch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

BINDIR= /usr/libexec/bsdinstall
PROG= distfetch
DPADD= ${LIBFETCH} ${LIBNCURSESW} ${LIBDIALOG} ${LIBM}
LDADD= -lfetch -lncursesw -ldialog -lm
LIBADD= fetch ncursesw dialog m

WARNS?= 6
MAN=
Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bsdinstall/partedit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ PROG= partedit
LINKS= ${BINDIR}/partedit ${BINDIR}/autopart \
${BINDIR}/partedit ${BINDIR}/scriptedpart
SYMLINKS= ${BINDIR}/partedit /usr/sbin/sade
DPADD= ${LIBGEOM} ${LIBNCURSESW} ${LIBUTIL} ${LIBDIALOG} ${LIBM}
LDADD= -lgeom -lncursesw -lutil -ldialog -lm
LIBADD+= geom ncursesw util dialog m

PARTEDIT_ARCH= ${MACHINE}
.if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
Expand Down
3 changes: 1 addition & 2 deletions usr.sbin/bsnmpd/bsnmpd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ CFLAGS+= -DSNMPTREE_TYPES
CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
CFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
DPADD= ${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP}
LDADD= -lbegemot -lbsnmp -lwrap
LIBADD= begemot bsnmp wrap

LDFLAGS= -Wl,-export-dynamic

Expand Down
Loading

0 comments on commit c6db814

Please sign in to comment.