summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/acpi/acpidb/Makefile3
-rw-r--r--usr.sbin/amd/Makefile.inc7
-rw-r--r--usr.sbin/amd/amd/Makefile3
-rw-r--r--usr.sbin/amd/amq/Makefile3
-rw-r--r--usr.sbin/amd/fixmount/Makefile5
-rw-r--r--usr.sbin/amd/fsinfo/Makefile3
-rw-r--r--usr.sbin/amd/hlfsd/Makefile3
-rw-r--r--usr.sbin/amd/mk-amd-map/Makefile3
-rw-r--r--usr.sbin/amd/pawd/Makefile3
-rw-r--r--usr.sbin/amd/wire-test/Makefile3
-rw-r--r--usr.sbin/ancontrol/Makefile3
-rw-r--r--usr.sbin/apmd/Makefile3
-rw-r--r--usr.sbin/asf/Makefile3
-rw-r--r--usr.sbin/audit/Makefile3
-rw-r--r--usr.sbin/auditd/Makefile3
-rw-r--r--usr.sbin/auditdistd/Makefile5
-rw-r--r--usr.sbin/auditreduce/Makefile3
-rw-r--r--usr.sbin/authpf/Makefile3
-rw-r--r--usr.sbin/autofs/Makefile3
-rw-r--r--usr.sbin/bhyve/Makefile5
-rw-r--r--usr.sbin/bhyvectl/Makefile3
-rw-r--r--usr.sbin/bhyveload/Makefile3
-rw-r--r--usr.sbin/bluetooth/ath3kfw/Makefile3
-rw-r--r--usr.sbin/bluetooth/bt3cfw/Makefile3
-rw-r--r--usr.sbin/bluetooth/bthidcontrol/Makefile3
-rw-r--r--usr.sbin/bluetooth/bthidd/Makefile3
-rw-r--r--usr.sbin/bluetooth/btpand/Makefile3
-rw-r--r--usr.sbin/bluetooth/hccontrol/Makefile3
-rw-r--r--usr.sbin/bluetooth/hcsecd/Makefile3
-rw-r--r--usr.sbin/bluetooth/hcseriald/Makefile3
-rw-r--r--usr.sbin/bluetooth/l2control/Makefile3
-rw-r--r--usr.sbin/bluetooth/l2ping/Makefile3
-rw-r--r--usr.sbin/bluetooth/rfcomm_pppd/Makefile3
-rw-r--r--usr.sbin/bluetooth/sdpcontrol/Makefile3
-rw-r--r--usr.sbin/boot0cfg/Makefile3
-rw-r--r--usr.sbin/boot98cfg/Makefile3
-rw-r--r--usr.sbin/bsdinstall/distextract/Makefile3
-rw-r--r--usr.sbin/bsdinstall/distfetch/Makefile3
-rw-r--r--usr.sbin/bsdinstall/partedit/Makefile3
-rw-r--r--usr.sbin/bsnmpd/bsnmpd/Makefile3
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hast/Makefile3
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_hostres/Makefile3
-rw-r--r--usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile3
-rw-r--r--usr.sbin/bsnmpd/tools/bsnmptools/Makefile7
-rw-r--r--usr.sbin/cdcontrol/Makefile3
-rw-r--r--usr.sbin/ckdist/Makefile3
-rw-r--r--usr.sbin/clear_locks/Makefile3
-rw-r--r--usr.sbin/config/Makefile3
-rw-r--r--usr.sbin/cron/Makefile.inc5
-rw-r--r--usr.sbin/cron/cron/Makefile3
-rw-r--r--usr.sbin/cron/crontab/Makefile3
-rw-r--r--usr.sbin/ctladm/Makefile3
-rw-r--r--usr.sbin/ctld/Makefile3
-rw-r--r--usr.sbin/ctm/ctm/Makefile3
-rw-r--r--usr.sbin/ctm/mkCTM/Makefile3
-rw-r--r--usr.sbin/daemon/Makefile3
-rw-r--r--usr.sbin/dconschat/Makefile3
-rw-r--r--usr.sbin/devinfo/Makefile3
-rw-r--r--usr.sbin/diskinfo/Makefile3
-rw-r--r--usr.sbin/editmap/Makefile12
-rw-r--r--usr.sbin/edquota/Makefile3
-rw-r--r--usr.sbin/fifolog/Makefile.inc8
-rw-r--r--usr.sbin/fifolog/fifolog_create/Makefile3
-rw-r--r--usr.sbin/fifolog/fifolog_reader/Makefile3
-rw-r--r--usr.sbin/fifolog/fifolog_writer/Makefile3
-rw-r--r--usr.sbin/flowctl/Makefile3
-rw-r--r--usr.sbin/ftp-proxy/Makefile3
-rw-r--r--usr.sbin/gssd/Makefile6
-rw-r--r--usr.sbin/gstat/Makefile3
-rw-r--r--usr.sbin/ifmcstat/Makefile3
-rw-r--r--usr.sbin/inetd/Makefile6
-rw-r--r--usr.sbin/iostat/Makefile3
-rw-r--r--usr.sbin/ipfwpcap/Makefile3
-rw-r--r--usr.sbin/iscsid/Makefile3
-rw-r--r--usr.sbin/jail/Makefile3
-rw-r--r--usr.sbin/jexec/Makefile3
-rw-r--r--usr.sbin/jls/Makefile3
-rw-r--r--usr.sbin/kbdcontrol/Makefile3
-rw-r--r--usr.sbin/keyserv/Makefile3
-rw-r--r--usr.sbin/kgmon/Makefile3
-rw-r--r--usr.sbin/lmcconfig/Makefile3
-rw-r--r--usr.sbin/lpr/Makefile.inc2
-rw-r--r--usr.sbin/lpr/chkprintcap/Makefile3
-rw-r--r--usr.sbin/lpr/lpc/Makefile5
-rw-r--r--usr.sbin/lpr/lpd/Makefile3
-rw-r--r--usr.sbin/lpr/lpq/Makefile3
-rw-r--r--usr.sbin/lpr/lpr/Makefile3
-rw-r--r--usr.sbin/lpr/lprm/Makefile3
-rw-r--r--usr.sbin/lpr/pac/Makefile3
-rw-r--r--usr.sbin/mailstats/Makefile9
-rw-r--r--usr.sbin/mailwrapper/Makefile3
-rw-r--r--usr.sbin/makemap/Makefile12
-rw-r--r--usr.sbin/mfiutil/Makefile3
-rw-r--r--usr.sbin/mount_smbfs/Makefile3
-rw-r--r--usr.sbin/mountd/Makefile3
-rw-r--r--usr.sbin/moused/Makefile3
-rw-r--r--usr.sbin/mptutil/Makefile3
-rw-r--r--usr.sbin/mtree/Makefile3
-rw-r--r--usr.sbin/nandtool/Makefile3
-rw-r--r--usr.sbin/ndiscvt/Makefile3
-rw-r--r--usr.sbin/ngctl/Makefile6
-rw-r--r--usr.sbin/nghook/Makefile3
-rw-r--r--usr.sbin/nmtree/Makefile4
-rw-r--r--usr.sbin/nscd/Makefile4
-rw-r--r--usr.sbin/ntp/Makefile.inc4
-rw-r--r--usr.sbin/ntp/ntp-keygen/Makefile6
-rw-r--r--usr.sbin/ntp/ntpd/Makefile6
-rw-r--r--usr.sbin/ntp/ntpdate/Makefile3
-rw-r--r--usr.sbin/ntp/ntpdc/Makefile6
-rw-r--r--usr.sbin/ntp/ntpq/Makefile6
-rw-r--r--usr.sbin/ntp/ntptime/Makefile3
-rw-r--r--usr.sbin/ntp/sntp/Makefile3
-rw-r--r--usr.sbin/pkg/Makefile5
-rw-r--r--usr.sbin/pmccontrol/Makefile3
-rw-r--r--usr.sbin/pmcstat/Makefile3
-rw-r--r--usr.sbin/powerd/Makefile3
-rw-r--r--usr.sbin/ppp/Makefile18
-rw-r--r--usr.sbin/pppctl/Makefile3
-rw-r--r--usr.sbin/praliases/Makefile12
-rw-r--r--usr.sbin/praudit/Makefile3
-rw-r--r--usr.sbin/pstat/Makefile3
-rw-r--r--usr.sbin/quotaon/Makefile3
-rw-r--r--usr.sbin/rarpd/Makefile3
-rw-r--r--usr.sbin/repquota/Makefile3
-rw-r--r--usr.sbin/rpc.lockd/Makefile3
-rw-r--r--usr.sbin/rpc.statd/Makefile3
-rw-r--r--usr.sbin/rpc.yppasswdd/Makefile3
-rw-r--r--usr.sbin/rpc.ypupdated/Makefile3
-rw-r--r--usr.sbin/rpc.ypxfrd/Makefile3
-rw-r--r--usr.sbin/rpcbind/Makefile3
-rw-r--r--usr.sbin/rrenumd/Makefile3
-rw-r--r--usr.sbin/rtadvd/Makefile3
-rw-r--r--usr.sbin/rtsold/Makefile3
-rw-r--r--usr.sbin/sendmail/Makefile15
-rw-r--r--usr.sbin/services_mkdb/Makefile3
-rw-r--r--usr.sbin/snapinfo/Makefile5
-rw-r--r--usr.sbin/spray/Makefile3
-rw-r--r--usr.sbin/syslogd/Makefile3
-rw-r--r--usr.sbin/tcpdchk/Makefile3
-rw-r--r--usr.sbin/tcpdmatch/Makefile3
-rw-r--r--usr.sbin/tcpdump/tcpdump/Makefile9
-rw-r--r--usr.sbin/timed/timed/Makefile3
-rw-r--r--usr.sbin/traceroute/Makefile3
-rw-r--r--usr.sbin/traceroute6/Makefile3
-rw-r--r--usr.sbin/tzsetup/Makefile3
-rw-r--r--usr.sbin/ugidfw/Makefile3
-rw-r--r--usr.sbin/uhsoctl/Makefile3
-rw-r--r--usr.sbin/unbound/anchor/Makefile4
-rw-r--r--usr.sbin/unbound/checkconf/Makefile4
-rw-r--r--usr.sbin/unbound/control/Makefile4
-rw-r--r--usr.sbin/unbound/daemon/Makefile4
-rw-r--r--usr.sbin/usbconfig/Makefile3
-rw-r--r--usr.sbin/vipw/Makefile3
-rw-r--r--usr.sbin/watch/Makefile3
-rw-r--r--usr.sbin/watchdogd/Makefile3
-rw-r--r--usr.sbin/wpa/Makefile.crypto3
-rw-r--r--usr.sbin/wpa/hostapd/Makefile3
-rw-r--r--usr.sbin/wpa/hostapd_cli/Makefile3
-rw-r--r--usr.sbin/wpa/wpa_cli/Makefile3
-rw-r--r--usr.sbin/wpa/wpa_passphrase/Makefile3
-rw-r--r--usr.sbin/wpa/wpa_priv/Makefile3
-rw-r--r--usr.sbin/wpa/wpa_supplicant/Makefile6
-rw-r--r--usr.sbin/ypserv/Makefile3
163 files changed, 178 insertions, 434 deletions
diff --git a/usr.sbin/acpi/acpidb/Makefile b/usr.sbin/acpi/acpidb/Makefile
index 15d114d..9df03bd 100644
--- a/usr.sbin/acpi/acpidb/Makefile
+++ b/usr.sbin/acpi/acpidb/Makefile
@@ -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>
diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc
index e4425f5..8c397cf 100644
--- a/usr.sbin/amd/Makefile.inc
+++ b/usr.sbin/amd/Makefile.inc
@@ -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
diff --git a/usr.sbin/amd/amd/Makefile b/usr.sbin/amd/amd/Makefile
index 1fc41bf..602c941 100644
--- a/usr.sbin/amd/amd/Makefile
+++ b/usr.sbin/amd/amd/Makefile
@@ -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
diff --git a/usr.sbin/amd/amq/Makefile b/usr.sbin/amd/amq/Makefile
index 74fc749..968ae4c 100644
--- a/usr.sbin/amd/amq/Makefile
+++ b/usr.sbin/amd/amq/Makefile
@@ -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>
diff --git a/usr.sbin/amd/fixmount/Makefile b/usr.sbin/amd/fixmount/Makefile
index 7f96a45..8137ffb 100644
--- a/usr.sbin/amd/fixmount/Makefile
+++ b/usr.sbin/amd/fixmount/Makefile
@@ -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>
diff --git a/usr.sbin/amd/fsinfo/Makefile b/usr.sbin/amd/fsinfo/Makefile
index 1695a46..a059da6 100644
--- a/usr.sbin/amd/fsinfo/Makefile
+++ b/usr.sbin/amd/fsinfo/Makefile
@@ -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
diff --git a/usr.sbin/amd/hlfsd/Makefile b/usr.sbin/amd/hlfsd/Makefile
index 5b863dd..96d05c4 100644
--- a/usr.sbin/amd/hlfsd/Makefile
+++ b/usr.sbin/amd/hlfsd/Makefile
@@ -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>
diff --git a/usr.sbin/amd/mk-amd-map/Makefile b/usr.sbin/amd/mk-amd-map/Makefile
index 57fd6a5..417ea2a 100644
--- a/usr.sbin/amd/mk-amd-map/Makefile
+++ b/usr.sbin/amd/mk-amd-map/Makefile
@@ -10,7 +10,6 @@
PROG= mk-amd-map
MAN= mk-amd-map.8
-DPADD= ${LIBAMU}
-LDADD= ${LIBAMU}
+LIBADD= amu
.include <bsd.prog.mk>
diff --git a/usr.sbin/amd/pawd/Makefile b/usr.sbin/amd/pawd/Makefile
index c6bb1cc..2870ab4 100644
--- a/usr.sbin/amd/pawd/Makefile
+++ b/usr.sbin/amd/pawd/Makefile
@@ -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>
diff --git a/usr.sbin/amd/wire-test/Makefile b/usr.sbin/amd/wire-test/Makefile
index a07e690..edde2eb 100644
--- a/usr.sbin/amd/wire-test/Makefile
+++ b/usr.sbin/amd/wire-test/Makefile
@@ -10,7 +10,6 @@
PROG= wire-test
MAN= wire-test.8
-DPADD= ${LIBAMU}
-LDADD= ${LIBAMU}
+LIBADD= amu
.include <bsd.prog.mk>
diff --git a/usr.sbin/ancontrol/Makefile b/usr.sbin/ancontrol/Makefile
index b0f66cd..f06b943 100644
--- a/usr.sbin/ancontrol/Makefile
+++ b/usr.sbin/ancontrol/Makefile
@@ -6,7 +6,6 @@ MAN= ancontrol.8
WARNS?= 3
CFLAGS+= -DANCACHE -I${.CURDIR}/../../sys
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.prog.mk>
diff --git a/usr.sbin/apmd/Makefile b/usr.sbin/apmd/Makefile
index 9a0dc0d..b2afdfaf 100644
--- a/usr.sbin/apmd/Makefile
+++ b/usr.sbin/apmd/Makefile
@@ -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}
diff --git a/usr.sbin/asf/Makefile b/usr.sbin/asf/Makefile
index 0db69e8..49f9305 100644
--- a/usr.sbin/asf/Makefile
+++ b/usr.sbin/asf/Makefile
@@ -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>
diff --git a/usr.sbin/audit/Makefile b/usr.sbin/audit/Makefile
index a3f7fbf..14fc893 100644
--- a/usr.sbin/audit/Makefile
+++ b/usr.sbin/audit/Makefile
@@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR}
PROG= audit
MAN= audit.8
-DPADD= ${LIBBSM}
-LDADD= -lbsm
+LIBADD= bsm
WARNS?= 5
diff --git a/usr.sbin/auditd/Makefile b/usr.sbin/auditd/Makefile
index 47ffd0b..3fb6a40 100644
--- a/usr.sbin/auditd/Makefile
+++ b/usr.sbin/auditd/Makefile
@@ -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
diff --git a/usr.sbin/auditdistd/Makefile b/usr.sbin/auditdistd/Makefile
index b323dcd..8d32884 100644
--- a/usr.sbin/auditdistd/Makefile
+++ b/usr.sbin/auditdistd/Makefile
@@ -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
diff --git a/usr.sbin/auditreduce/Makefile b/usr.sbin/auditreduce/Makefile
index 7dc9553..a462e1b 100644
--- a/usr.sbin/auditreduce/Makefile
+++ b/usr.sbin/auditreduce/Makefile
@@ -10,8 +10,7 @@ CFLAGS+= -I${OPENBSMDIR}
PROG= auditreduce
MAN= auditreduce.1
-DPADD= ${LIBBSM}
-LDADD= -lbsm
+LIBADD= bsm
WARNS?= 3
diff --git a/usr.sbin/authpf/Makefile b/usr.sbin/authpf/Makefile
index 744df61..07b2cdc 100644
--- a/usr.sbin/authpf/Makefile
+++ b/usr.sbin/authpf/Makefile
@@ -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
diff --git a/usr.sbin/autofs/Makefile b/usr.sbin/autofs/Makefile
index fab6865..00c79dd 100644
--- a/usr.sbin/autofs/Makefile
+++ b/usr.sbin/autofs/Makefile
@@ -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
diff --git a/usr.sbin/bhyve/Makefile b/usr.sbin/bhyve/Makefile
index 377a2e6..5a1c2c6c 100644
--- a/usr.sbin/bhyve/Makefile
+++ b/usr.sbin/bhyve/Makefile
@@ -4,7 +4,7 @@
PROG= bhyve
-DEBUG_FLAGS= -g -O0
+DEBUG_FLAGS= -g -O0
MAN= bhyve.8
@@ -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
diff --git a/usr.sbin/bhyvectl/Makefile b/usr.sbin/bhyvectl/Makefile
index 5f879fe..4a33dee 100644
--- a/usr.sbin/bhyvectl/Makefile
+++ b/usr.sbin/bhyvectl/Makefile
@@ -7,8 +7,7 @@ SRCS= bhyvectl.c
MAN=
-DPADD= ${LIBVMMAPI} ${LIBUTIL}
-LDADD= -lvmmapi -lutil
+LIBADD= vmmapi util
WARNS?= 3
diff --git a/usr.sbin/bhyveload/Makefile b/usr.sbin/bhyveload/Makefile
index e7b19bd..aa89b6c 100644
--- a/usr.sbin/bhyveload/Makefile
+++ b/usr.sbin/bhyveload/Makefile
@@ -4,8 +4,7 @@ PROG= bhyveload
SRCS= bhyveload.c
MAN= bhyveload.8
-DPADD+= ${LIBVMMAPI} ${LIBUTIL}
-LDADD+= -lvmmapi -lutil
+LIBADD= vmmapi util
WARNS?= 3
diff --git a/usr.sbin/bluetooth/ath3kfw/Makefile b/usr.sbin/bluetooth/ath3kfw/Makefile
index 373655b..26ce06e 100644
--- a/usr.sbin/bluetooth/ath3kfw/Makefile
+++ b/usr.sbin/bluetooth/ath3kfw/Makefile
@@ -2,7 +2,6 @@
PROG= ath3kfw
MAN= ath3kfw.8
-DPADD+= ${LIBUSB}
-LDADD+= -lusb
+LIBADD+= usb
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/bt3cfw/Makefile b/usr.sbin/bluetooth/bt3cfw/Makefile
index 90bf751..f9da6ca 100644
--- a/usr.sbin/bluetooth/bt3cfw/Makefile
+++ b/usr.sbin/bluetooth/bt3cfw/Makefile
@@ -5,7 +5,6 @@ PROG= bt3cfw
MAN= bt3cfw.8
WARNS?= 2
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD+= netgraph
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/bthidcontrol/Makefile b/usr.sbin/bluetooth/bthidcontrol/Makefile
index 6c9eafb..09128d6 100644
--- a/usr.sbin/bluetooth/bthidcontrol/Makefile
+++ b/usr.sbin/bluetooth/bthidcontrol/Makefile
@@ -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>
diff --git a/usr.sbin/bluetooth/bthidd/Makefile b/usr.sbin/bluetooth/bthidd/Makefile
index fe6ef33..587189b 100644
--- a/usr.sbin/bluetooth/bthidd/Makefile
+++ b/usr.sbin/bluetooth/bthidd/Makefile
@@ -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=
diff --git a/usr.sbin/bluetooth/btpand/Makefile b/usr.sbin/bluetooth/btpand/Makefile
index 5e4bb0b..0689d17 100644
--- a/usr.sbin/bluetooth/btpand/Makefile
+++ b/usr.sbin/bluetooth/btpand/Makefile
@@ -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>
diff --git a/usr.sbin/bluetooth/hccontrol/Makefile b/usr.sbin/bluetooth/hccontrol/Makefile
index 592247e..61206df 100644
--- a/usr.sbin/bluetooth/hccontrol/Makefile
+++ b/usr.sbin/bluetooth/hccontrol/Makefile
@@ -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>
diff --git a/usr.sbin/bluetooth/hcsecd/Makefile b/usr.sbin/bluetooth/hcsecd/Makefile
index e544ed4..684243d 100644
--- a/usr.sbin/bluetooth/hcsecd/Makefile
+++ b/usr.sbin/bluetooth/hcsecd/Makefile
@@ -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>
diff --git a/usr.sbin/bluetooth/hcseriald/Makefile b/usr.sbin/bluetooth/hcseriald/Makefile
index ed0bf32..e02e1ae 100644
--- a/usr.sbin/bluetooth/hcseriald/Makefile
+++ b/usr.sbin/bluetooth/hcseriald/Makefile
@@ -5,7 +5,6 @@ PROG= hcseriald
MAN= hcseriald.8
WARNS?= 2
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/l2control/Makefile b/usr.sbin/bluetooth/l2control/Makefile
index 847ff4b..8f17e02 100644
--- a/usr.sbin/bluetooth/l2control/Makefile
+++ b/usr.sbin/bluetooth/l2control/Makefile
@@ -6,7 +6,6 @@ MAN= l2control.8
SRCS= l2cap.c l2control.c
WARNS?= 2
-DPADD= ${LIBBLUETOOTH}
-LDADD= -lbluetooth
+LIBADD= bluetooth
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/l2ping/Makefile b/usr.sbin/bluetooth/l2ping/Makefile
index bc130e3..572366a 100644
--- a/usr.sbin/bluetooth/l2ping/Makefile
+++ b/usr.sbin/bluetooth/l2ping/Makefile
@@ -5,7 +5,6 @@ PROG= l2ping
MAN= l2ping.8
WARNS?= 2
-DPADD= ${LIBBLUETOOTH}
-LDADD= -lbluetooth
+LIBADD= bluetooth
.include <bsd.prog.mk>
diff --git a/usr.sbin/bluetooth/rfcomm_pppd/Makefile b/usr.sbin/bluetooth/rfcomm_pppd/Makefile
index adac64e..f31e1e5 100644
--- a/usr.sbin/bluetooth/rfcomm_pppd/Makefile
+++ b/usr.sbin/bluetooth/rfcomm_pppd/Makefile
@@ -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>
diff --git a/usr.sbin/bluetooth/sdpcontrol/Makefile b/usr.sbin/bluetooth/sdpcontrol/Makefile
index c0ec8d4..e3ebcd8 100644
--- a/usr.sbin/bluetooth/sdpcontrol/Makefile
+++ b/usr.sbin/bluetooth/sdpcontrol/Makefile
@@ -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>
diff --git a/usr.sbin/boot0cfg/Makefile b/usr.sbin/boot0cfg/Makefile
index bb7fe07..d41945a 100644
--- a/usr.sbin/boot0cfg/Makefile
+++ b/usr.sbin/boot0cfg/Makefile
@@ -3,8 +3,7 @@
PROG= boot0cfg
MAN= boot0cfg.8
-DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD= -lgeom -lbsdxml -lsbuf
+LIBADD= geom
NO_WCAST_ALIGN=
diff --git a/usr.sbin/boot98cfg/Makefile b/usr.sbin/boot98cfg/Makefile
index 9b0e703..57dfe94 100644
--- a/usr.sbin/boot98cfg/Makefile
+++ b/usr.sbin/boot98cfg/Makefile
@@ -5,7 +5,6 @@ MAN= boot98cfg.8
WARNS?= 2
-DPADD= ${LIBGEOM}
-LDADD= -lgeom
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/usr.sbin/bsdinstall/distextract/Makefile b/usr.sbin/bsdinstall/distextract/Makefile
index f84c4d7..464ef6b 100644
--- a/usr.sbin/bsdinstall/distextract/Makefile
+++ b/usr.sbin/bsdinstall/distextract/Makefile
@@ -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=
diff --git a/usr.sbin/bsdinstall/distfetch/Makefile b/usr.sbin/bsdinstall/distfetch/Makefile
index ed1f599..5c0f6e8 100644
--- a/usr.sbin/bsdinstall/distfetch/Makefile
+++ b/usr.sbin/bsdinstall/distfetch/Makefile
@@ -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=
diff --git a/usr.sbin/bsdinstall/partedit/Makefile b/usr.sbin/bsdinstall/partedit/Makefile
index fb75888..d48f777 100644
--- a/usr.sbin/bsdinstall/partedit/Makefile
+++ b/usr.sbin/bsdinstall/partedit/Makefile
@@ -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"
diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile
index b20ba31..a426345 100644
--- a/usr.sbin/bsnmpd/bsnmpd/Makefile
+++ b/usr.sbin/bsnmpd/bsnmpd/Makefile
@@ -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
diff --git a/usr.sbin/bsnmpd/modules/snmp_hast/Makefile b/usr.sbin/bsnmpd/modules/snmp_hast/Makefile
index e05ce31..d0c3a48 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hast/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_hast/Makefile
@@ -29,8 +29,7 @@ CFLAGS+=-DYY_NO_UNPUT
CFLAGS+=-DYY_NO_INPUT
CFLAGS+= -DSNMPTREE_TYPES
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
XSYM= begemotHast
DEFS= ${MOD}_tree.def
diff --git a/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile b/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
index 2922f45..57f3eab 100644
--- a/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_hostres/Makefile
@@ -69,8 +69,7 @@ MAN= snmp_hostres.3
DEFS= ${MOD}_tree.def
BMIBS= BEGEMOT-HOSTRES-MIB.txt
-DPADD= ${LIBKVM} ${LIBDEVINFO} ${LIBM} ${LIBGEOM} ${LIBMEMSTAT}
-LDADD= -lkvm -ldevinfo -lm -lgeom -lmemstat
+LIBADD= kvm devinfo m geom memstat
.include <bsd.snmpmod.mk>
diff --git a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
index 7caf7e4..85057c9 100644
--- a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
+++ b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile
@@ -11,7 +11,6 @@ BMIBS= BEGEMOT-NETGRAPH.txt
DEFS= ${MOD}_tree.def
INCS= snmp_${MOD}.h
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
.include <bsd.snmpmod.mk>
diff --git a/usr.sbin/bsnmpd/tools/bsnmptools/Makefile b/usr.sbin/bsnmpd/tools/bsnmptools/Makefile
index 3310420..49afd94 100644
--- a/usr.sbin/bsnmpd/tools/bsnmptools/Makefile
+++ b/usr.sbin/bsnmpd/tools/bsnmptools/Makefile
@@ -7,14 +7,11 @@
PROG= bsnmpget
-DPADD+= ${LIBBSNMP} ${LIBBSNMPTOOLS}
-LDADD+= -lbsnmp -lbsnmptools
+LIBADD= bsnmp bsnmptools
CFLAGS+= -I${.CURDIR}/../libbsnmptools
-LDFLAGS+= -L${LIBBSNMPTOOLSDIR}
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
.endif
LINKS= ${BINDIR}/bsnmpget ${BINDIR}/bsnmpwalk
diff --git a/usr.sbin/cdcontrol/Makefile b/usr.sbin/cdcontrol/Makefile
index fa0dc2c..de95606 100644
--- a/usr.sbin/cdcontrol/Makefile
+++ b/usr.sbin/cdcontrol/Makefile
@@ -2,7 +2,6 @@
PROG= cdcontrol
-DPADD= ${LIBEDIT} ${LIBTERMCAPW}
-LDADD= -ledit -ltermcapw
+LIBADD= edit
.include <bsd.prog.mk>
diff --git a/usr.sbin/ckdist/Makefile b/usr.sbin/ckdist/Makefile
index 23430a8..4d35763 100644
--- a/usr.sbin/ckdist/Makefile
+++ b/usr.sbin/ckdist/Makefile
@@ -5,7 +5,6 @@
PROG= ckdist
SRCS= ckdist.c crc.c
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.prog.mk>
diff --git a/usr.sbin/clear_locks/Makefile b/usr.sbin/clear_locks/Makefile
index 00ff3ce..6906bf0 100644
--- a/usr.sbin/clear_locks/Makefile
+++ b/usr.sbin/clear_locks/Makefile
@@ -2,7 +2,6 @@
PROG= clear_locks
MAN= clear_locks.8
-DPADD= ${LIBRPCSVC}
-LDADD= -lrpcsvc
+LIBADD= rpcsvc
.include <bsd.prog.mk>
diff --git a/usr.sbin/config/Makefile b/usr.sbin/config/Makefile
index 6561989..76712d2 100644
--- a/usr.sbin/config/Makefile
+++ b/usr.sbin/config/Makefile
@@ -13,8 +13,7 @@ CFLAGS+= -I. -I${.CURDIR}
NO_WMISSING_VARIABLE_DECLARATIONS=
-DPADD= ${LIBL} ${LIBSBUF}
-LDADD= -ll -lsbuf
+LIBADD= l sbuf
CLEANFILES+= kernconf.c
diff --git a/usr.sbin/cron/Makefile.inc b/usr.sbin/cron/Makefile.inc
deleted file mode 100644
index 900730b..0000000
--- a/usr.sbin/cron/Makefile.inc
+++ /dev/null
@@ -1,5 +0,0 @@
-# $FreeBSD$
-
-LIBCRON= ${.OBJDIR}/../lib/libcron.a
-
-.include "../Makefile.inc"
diff --git a/usr.sbin/cron/cron/Makefile b/usr.sbin/cron/cron/Makefile
index d9a1d24..0aa84d8 100644
--- a/usr.sbin/cron/cron/Makefile
+++ b/usr.sbin/cron/cron/Makefile
@@ -6,8 +6,7 @@ SRCS= cron.c database.c do_command.c job.c user.c popen.c
CFLAGS+= -DLOGIN_CAP -DPAM
-DPADD= ${LIBCRON} ${LIBPAM} ${LIBUTIL}
-LDADD= ${LIBCRON} ${MINUSLPAM} -lutil
+LIBADD= cron pam util
WARNS?= 2
diff --git a/usr.sbin/cron/crontab/Makefile b/usr.sbin/cron/crontab/Makefile
index 829128e..9f43112 100644
--- a/usr.sbin/cron/crontab/Makefile
+++ b/usr.sbin/cron/crontab/Makefile
@@ -12,7 +12,6 @@ WARNS?= 3
CFLAGS+= -I${.CURDIR}/../cron
-DPADD= ${LIBCRON} ${LIBMD} ${LIBUTIL}
-LDADD= ${LIBCRON} -lmd -lutil
+LIBADD= cron md util
.include <bsd.prog.mk>
diff --git a/usr.sbin/ctladm/Makefile b/usr.sbin/ctladm/Makefile
index a9f6bfd..fd9e606 100644
--- a/usr.sbin/ctladm/Makefile
+++ b/usr.sbin/ctladm/Makefile
@@ -14,8 +14,7 @@ CFLAGS+= -I${SDIR}
WARNS?= 3
.endif
-DPADD= ${LIBCAM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lcam -lsbuf -lbsdxml -lutil
+LIBADD= cam sbuf bsdxml util
MAN= ctladm.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/ctld/Makefile b/usr.sbin/ctld/Makefile
index 149ae39..bd3fb94 100644
--- a/usr.sbin/ctld/Makefile
+++ b/usr.sbin/ctld/Makefile
@@ -10,8 +10,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi
#CFLAGS+= -DICL_KERNEL_PROXY
MAN= ctld.8 ctl.conf.5
-DPADD= ${LIBBSDXML} ${LIBCRYPTO} ${LIBL} ${LIBSBUF} ${LIBUTIL}
-LDADD= -lbsdxml -lcrypto -ll -lsbuf -lutil
+LIBADD= bsdxml crypto l sbuf util
YFLAGS+= -v
CLEANFILES= y.tab.c y.tab.h y.output
diff --git a/usr.sbin/ctm/ctm/Makefile b/usr.sbin/ctm/ctm/Makefile
index cc2c9b9..dd27ed2 100644
--- a/usr.sbin/ctm/ctm/Makefile
+++ b/usr.sbin/ctm/ctm/Makefile
@@ -14,8 +14,7 @@ SRCS= ctm.c ctm_input.c ctm_pass1.c ctm_pass2.c ctm_pass3.c \
NOTYET= ctm_ed.c
-LDADD= -lmd
-DPADD= ${LIBMD}
+LIBADD= md
WARNS?= 2
diff --git a/usr.sbin/ctm/mkCTM/Makefile b/usr.sbin/ctm/mkCTM/Makefile
index 745956c..8194dd7 100644
--- a/usr.sbin/ctm/mkCTM/Makefile
+++ b/usr.sbin/ctm/mkCTM/Makefile
@@ -3,8 +3,7 @@
PROG= mkctm
MAN=
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
test: mkctm
rm -f tst.out*
diff --git a/usr.sbin/daemon/Makefile b/usr.sbin/daemon/Makefile
index 2def803..eb0d502 100644
--- a/usr.sbin/daemon/Makefile
+++ b/usr.sbin/daemon/Makefile
@@ -3,7 +3,6 @@
PROG= daemon
MAN= daemon.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/dconschat/Makefile b/usr.sbin/dconschat/Makefile
index 2836a66..198c5cc 100644
--- a/usr.sbin/dconschat/Makefile
+++ b/usr.sbin/dconschat/Makefile
@@ -5,8 +5,7 @@ MAN= dconschat.8
CFLAGS+= -I${.CURDIR}/../../sys
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD= kvm
WARNS?= 1
diff --git a/usr.sbin/devinfo/Makefile b/usr.sbin/devinfo/Makefile
index 2a2301b..681c819 100644
--- a/usr.sbin/devinfo/Makefile
+++ b/usr.sbin/devinfo/Makefile
@@ -3,7 +3,6 @@
PROG= devinfo
MAN= devinfo.8
-DPADD= ${LIBDEVINFO}
-LDADD= -ldevinfo
+LIBADD= devinfo
.include <bsd.prog.mk>
diff --git a/usr.sbin/diskinfo/Makefile b/usr.sbin/diskinfo/Makefile
index b16b933..41c52da 100644
--- a/usr.sbin/diskinfo/Makefile
+++ b/usr.sbin/diskinfo/Makefile
@@ -3,8 +3,7 @@
PROG= diskinfo
MAN= diskinfo.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/editmap/Makefile b/usr.sbin/editmap/Makefile
index 92d8392..20d86ab 100644
--- a/usr.sbin/editmap/Makefile
+++ b/usr.sbin/editmap/Makefile
@@ -12,17 +12,7 @@ CFLAGS+= -DNEWDB -DNOT_SENDMAIL
WARNS?= 2
-LIBSMDIR= ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-LIBSMDBDIR= ${.OBJDIR}/../../lib/libsmdb
-LIBSMDB= ${LIBSMDBDIR}/libsmdb.a
-
-LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil
-LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a
-
-DPADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
-LDADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
+LIBADD= smdb smutil sm
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
diff --git a/usr.sbin/edquota/Makefile b/usr.sbin/edquota/Makefile
index 1196e47..83f06d0 100644
--- a/usr.sbin/edquota/Makefile
+++ b/usr.sbin/edquota/Makefile
@@ -7,7 +7,6 @@ MAN= edquota.8
CSTD= gnu99
WARNS?= 4
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/fifolog/Makefile.inc b/usr.sbin/fifolog/Makefile.inc
deleted file mode 100644
index 5ec27dd..0000000
--- a/usr.sbin/fifolog/Makefile.inc
+++ /dev/null
@@ -1,8 +0,0 @@
-# $FreeBSD$
-
-LIBFIFOLOG= ${.OBJDIR}/../lib/libfifolog.a
-
-#LINT= flint
-#LINTFLAGS= ${.CURDIR}/../flint.lnt -I/usr/include
-
-.include "../Makefile.inc"
diff --git a/usr.sbin/fifolog/fifolog_create/Makefile b/usr.sbin/fifolog/fifolog_create/Makefile
index 8b59b25..4a83b5b 100644
--- a/usr.sbin/fifolog/fifolog_create/Makefile
+++ b/usr.sbin/fifolog/fifolog_create/Makefile
@@ -4,8 +4,7 @@ PROG= fifolog_create
CFLAGS+= -I${.CURDIR}/../lib
-DPADD= ${LIBFIFOLOG} ${LIBUTIL}
-LDADD= ${LIBFIFOLOG} -lutil
+LIBADD= util fifolog
MAN= fifolog.1
MLINKS= fifolog.1 fifolog_create.1 \
diff --git a/usr.sbin/fifolog/fifolog_reader/Makefile b/usr.sbin/fifolog/fifolog_reader/Makefile
index 50575a9..19ce281 100644
--- a/usr.sbin/fifolog/fifolog_reader/Makefile
+++ b/usr.sbin/fifolog/fifolog_reader/Makefile
@@ -6,8 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib
MAN=
-DPADD= ${LIBFIFOLOG} ${LIBZ}
-LDADD= ${LIBFIFOLOG} -lz
+LIBADD= z fifolog
regress:
./${PROG} /tmp/fifolog.0
diff --git a/usr.sbin/fifolog/fifolog_writer/Makefile b/usr.sbin/fifolog/fifolog_writer/Makefile
index 9806ec7..3e5e6cc 100644
--- a/usr.sbin/fifolog/fifolog_writer/Makefile
+++ b/usr.sbin/fifolog/fifolog_writer/Makefile
@@ -6,8 +6,7 @@ CFLAGS+= -I${.CURDIR}/../lib
MAN=
-DPADD= ${LIBFIFOLOG} ${LIBZ}
-LDADD= ${LIBFIFOLOG} -lz
+LIBADD= z fifolog
regress:
date | ./${PROG} -z 0 /tmp/fifolog.0
diff --git a/usr.sbin/flowctl/Makefile b/usr.sbin/flowctl/Makefile
index acee16b..8bd6389 100644
--- a/usr.sbin/flowctl/Makefile
+++ b/usr.sbin/flowctl/Makefile
@@ -8,8 +8,7 @@ PROG= flowctl
MAN= flowctl.8
WARNS?= 2
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
diff --git a/usr.sbin/ftp-proxy/Makefile b/usr.sbin/ftp-proxy/Makefile
index 7a3ef47..103ea86 100644
--- a/usr.sbin/ftp-proxy/Makefile
+++ b/usr.sbin/ftp-proxy/Makefile
@@ -9,8 +9,7 @@ SRCS= ftp-proxy.c filter.c
CFLAGS+=-I${.CURDIR}/../../contrib/pf/libevent
-LDADD+= ${LIBEVENT}
-DPADD+= ${LIBEVENT}
+LIBADD= event
WARNS?= 3
diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile
index 9573702..ddc1dfa 100644
--- a/usr.sbin/gssd/Makefile
+++ b/usr.sbin/gssd/Makefile
@@ -9,11 +9,9 @@ SRCS= gssd.c gssd.h gssd_svc.c gssd_xdr.c gssd_prot.c
CFLAGS+= -I.
WARNS?= 1
-DPADD= ${LIBGSSAPI}
-LDADD= -lgssapi
+LIBADD= gssapi
.if ${MK_KERBEROS_SUPPORT} != "no"
-DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR} ${LIBCRYPT} ${LIBCRYPTO}
-LDADD+= -lkrb5 -lhx509 -lasn1 -lroken -lcom_err -lcrypt -lcrypto
+LIBADD+= krb5 roken
.else
CFLAGS+= -DWITHOUT_KERBEROS
.endif
diff --git a/usr.sbin/gstat/Makefile b/usr.sbin/gstat/Makefile
index 8aceec0..1c71f22 100644
--- a/usr.sbin/gstat/Makefile
+++ b/usr.sbin/gstat/Makefile
@@ -2,7 +2,6 @@
PROG= gstat
MAN= gstat.8
-DPADD= ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBEDIT} ${LIBNCURSESW}
-LDADD= -ldevstat -lkvm -lgeom -lbsdxml -lsbuf -ledit -lncursesw
+LIBADD= devstat geom edit ncursesw
.include <bsd.prog.mk>
diff --git a/usr.sbin/ifmcstat/Makefile b/usr.sbin/ifmcstat/Makefile
index 5b967c7..20de277 100644
--- a/usr.sbin/ifmcstat/Makefile
+++ b/usr.sbin/ifmcstat/Makefile
@@ -17,8 +17,7 @@ CFLAGS+=-DINET6
.if ${MK_KVM_SUPPORT} != "no"
CFLAGS+=-DWITH_KVM
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD= kvm
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/inetd/Makefile b/usr.sbin/inetd/Makefile
index f31027af..6174592 100644
--- a/usr.sbin/inetd/Makefile
+++ b/usr.sbin/inetd/Makefile
@@ -16,14 +16,12 @@ CFLAGS+= -DLOGIN_CAP
CFLAGS+= -DINET6
.endif
-DPADD= ${LIBUTIL} ${LIBWRAP}
-LDADD= -lutil -lwrap
+LIBADD= util wrap
# XXX for src/release/picobsd
.if !defined(RELEASE_CRUNCH)
CFLAGS+= -DIPSEC
-DPADD+= ${LIBIPSEC}
-LDADD+= -lipsec
+LIBADD+= ipsec
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/iostat/Makefile b/usr.sbin/iostat/Makefile
index 9fd4809..dfbf69d 100644
--- a/usr.sbin/iostat/Makefile
+++ b/usr.sbin/iostat/Makefile
@@ -4,8 +4,7 @@
PROG= iostat
MAN= iostat.8
-DPADD= ${LIBDEVSTAT} ${LIBKVM} ${LIBM}
-LDADD= -ldevstat -lkvm -lm
+LIBADD= devstat kvm m
WARNS?= 1
diff --git a/usr.sbin/ipfwpcap/Makefile b/usr.sbin/ipfwpcap/Makefile
index d16f888..2fde890 100644
--- a/usr.sbin/ipfwpcap/Makefile
+++ b/usr.sbin/ipfwpcap/Makefile
@@ -6,8 +6,7 @@
PROG= ipfwpcap
-LDADD= -lpcap
-DPADD= ${LIBPCAP}
+LIBADD= pcap
MAN= ipfwpcap.8
diff --git a/usr.sbin/iscsid/Makefile b/usr.sbin/iscsid/Makefile
index 784c204..e3c6dd1 100644
--- a/usr.sbin/iscsid/Makefile
+++ b/usr.sbin/iscsid/Makefile
@@ -8,8 +8,7 @@ CFLAGS+= -I${.CURDIR}/../../sys/dev/iscsi
#CFLAGS+= -DICL_KERNEL_PROXY
MAN= iscsid.8
-DPADD= ${LIBCRYPTO} ${LIBUTIL}
-LDADD= -lcrypto -lutil
+LIBADD= crypto util
WARNS= 6
diff --git a/usr.sbin/jail/Makefile b/usr.sbin/jail/Makefile
index 58324ac..9dfdee5 100644
--- a/usr.sbin/jail/Makefile
+++ b/usr.sbin/jail/Makefile
@@ -6,8 +6,7 @@ PROG= jail
MAN= jail.8 jail.conf.5
SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h
-DPADD= ${LIBJAIL} ${LIBKVM} ${LIBUTIL} ${LIBL}
-LDADD= -ljail -lkvm -lutil -ll
+LIBADD= jail kvm util l
NO_WMISSING_VARIABLE_DECLARATIONS=
diff --git a/usr.sbin/jexec/Makefile b/usr.sbin/jexec/Makefile
index 7a2e6821..700da97 100644
--- a/usr.sbin/jexec/Makefile
+++ b/usr.sbin/jexec/Makefile
@@ -2,7 +2,6 @@
PROG= jexec
MAN= jexec.8
-DPADD= ${LIBJAIL} ${LIBUTIL}
-LDADD= -ljail -lutil
+LIBADD= jail util
.include <bsd.prog.mk>
diff --git a/usr.sbin/jls/Makefile b/usr.sbin/jls/Makefile
index 431fd0c..d90d094 100644
--- a/usr.sbin/jls/Makefile
+++ b/usr.sbin/jls/Makefile
@@ -4,8 +4,7 @@
PROG= jls
MAN= jls.8
-DPADD= ${LIBJAIL}
-LDADD= -ljail
+LIBADD= jail
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
diff --git a/usr.sbin/kbdcontrol/Makefile b/usr.sbin/kbdcontrol/Makefile
index ca1b6e6..42fa3e8 100644
--- a/usr.sbin/kbdcontrol/Makefile
+++ b/usr.sbin/kbdcontrol/Makefile
@@ -8,7 +8,6 @@ SRCS= kbdcontrol.c lex.l
WARNS?= 4
CFLAGS+= -I${.CURDIR}
-DPADD= ${LIBL}
-LDADD= -ll
+LIBADD= l
.include <bsd.prog.mk>
diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile
index 4308b40..db8a832 100644
--- a/usr.sbin/keyserv/Makefile
+++ b/usr.sbin/keyserv/Makefile
@@ -6,8 +6,7 @@ SRCS= keyserv.c setkey.c crypt_svc.c crypt_server.c crypt.h
CFLAGS+= -DKEYSERV_RANDOM -DBROKEN_DES -I.
-DPADD= ${LIBMP} ${LIBCRYPTO} ${LIBRPCSVC}
-LDADD= -lmp -lcrypto -lrpcsvc
+LIBADD= mp rpcsvc
WARNS?= 1
diff --git a/usr.sbin/kgmon/Makefile b/usr.sbin/kgmon/Makefile
index bf19401..5f6a2a3 100644
--- a/usr.sbin/kgmon/Makefile
+++ b/usr.sbin/kgmon/Makefile
@@ -11,7 +11,6 @@ WARNS?= 2
#BINOWN=root
#BINMODE=4555
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD= kvm
.include <bsd.prog.mk>
diff --git a/usr.sbin/lmcconfig/Makefile b/usr.sbin/lmcconfig/Makefile
index 1ff5055..be00544 100644
--- a/usr.sbin/lmcconfig/Makefile
+++ b/usr.sbin/lmcconfig/Makefile
@@ -3,8 +3,7 @@
PROG= lmcconfig
MAN= lmcconfig.8
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
WARNS?= 3
diff --git a/usr.sbin/lpr/Makefile.inc b/usr.sbin/lpr/Makefile.inc
index 65535e6..59f8ceb 100644
--- a/usr.sbin/lpr/Makefile.inc
+++ b/usr.sbin/lpr/Makefile.inc
@@ -6,6 +6,4 @@
CFLAGS+= -DINET6
.endif
-LIBLPR= ${.OBJDIR}/../common_source/liblpr.a
-
.include "../Makefile.inc"
diff --git a/usr.sbin/lpr/chkprintcap/Makefile b/usr.sbin/lpr/chkprintcap/Makefile
index ffffffb..aa08882 100644
--- a/usr.sbin/lpr/chkprintcap/Makefile
+++ b/usr.sbin/lpr/chkprintcap/Makefile
@@ -8,7 +8,6 @@ SRCS= chkprintcap.c skimprintcap.c
CFLAGS+= -I${.CURDIR}/../common_source
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/lpc/Makefile b/usr.sbin/lpr/lpc/Makefile
index 92ca9e8..43f1f7a 100644
--- a/usr.sbin/lpr/lpc/Makefile
+++ b/usr.sbin/lpr/lpc/Makefile
@@ -5,7 +5,7 @@
PROG= lpc
MAN= lpc.8
-SRCS= lpc.c cmds.c cmdtab.c movejobs.c
+SRCS= lpc.c cmds.c cmdtab.c movejobs.c
BINGRP= daemon
BINMODE= 2555
@@ -13,7 +13,6 @@ CFLAGS+= -I${.CURDIR}/../common_source
WARNS?= 0
-DPADD= ${LIBLPR} ${LIBEDIT} ${LIBTERMCAPW}
-LDADD= ${LIBLPR} -ledit -ltermcapw
+LIBADD= lpr edit
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/lpd/Makefile b/usr.sbin/lpr/lpd/Makefile
index 0d7d93e..a35212b 100644
--- a/usr.sbin/lpr/lpd/Makefile
+++ b/usr.sbin/lpr/lpd/Makefile
@@ -9,7 +9,6 @@ CFLAGS+= -I${.CURDIR}/../common_source
WARNS?= 1
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/lpq/Makefile b/usr.sbin/lpr/lpq/Makefile
index 4df437e..7ea22fa 100644
--- a/usr.sbin/lpr/lpq/Makefile
+++ b/usr.sbin/lpr/lpq/Makefile
@@ -10,7 +10,6 @@ BINMODE= 6555
CFLAGS+= -I${.CURDIR}/../common_source
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/lpr/Makefile b/usr.sbin/lpr/lpr/Makefile
index 1894b00..2841a79 100644
--- a/usr.sbin/lpr/lpr/Makefile
+++ b/usr.sbin/lpr/lpr/Makefile
@@ -15,7 +15,6 @@ CFLAGS+= -I${.CURDIR}/../common_source
WARNS?= 2
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/lprm/Makefile b/usr.sbin/lpr/lprm/Makefile
index 44bc93a..5724d53 100644
--- a/usr.sbin/lpr/lprm/Makefile
+++ b/usr.sbin/lpr/lprm/Makefile
@@ -12,7 +12,6 @@ BINMODE= 6555
CFLAGS+= -I${.CURDIR}/../common_source
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/lpr/pac/Makefile b/usr.sbin/lpr/pac/Makefile
index bd895a7..faf8e58 100644
--- a/usr.sbin/lpr/pac/Makefile
+++ b/usr.sbin/lpr/pac/Makefile
@@ -8,7 +8,6 @@ MAN= pac.8
CFLAGS+= -I${.CURDIR}/../common_source
-DPADD= ${LIBLPR}
-LDADD= ${LIBLPR}
+LIBADD= lpr
.include <bsd.prog.mk>
diff --git a/usr.sbin/mailstats/Makefile b/usr.sbin/mailstats/Makefile
index bd72fc6..a7911a2 100644
--- a/usr.sbin/mailstats/Makefile
+++ b/usr.sbin/mailstats/Makefile
@@ -13,14 +13,7 @@ CFLAGS+= -DNOT_SENDMAIL
WARNS?= 2
-LIBSMDIR= ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil
-LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a
-
-DPADD= ${LIBSMUTIL} ${LIBSM}
-LDADD= ${LIBSMUTIL} ${LIBSM}
+LIBADD= sm smutil
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
diff --git a/usr.sbin/mailwrapper/Makefile b/usr.sbin/mailwrapper/Makefile
index 8e49db7..584cab8 100644
--- a/usr.sbin/mailwrapper/Makefile
+++ b/usr.sbin/mailwrapper/Makefile
@@ -6,8 +6,7 @@
PROG= mailwrapper
MAN= mailwrapper.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.endif
.if ${MK_MAILWRAPPER} != "no" || ${MK_SENDMAIL} != "no"
diff --git a/usr.sbin/makemap/Makefile b/usr.sbin/makemap/Makefile
index 80cafcb..ceec1b3 100644
--- a/usr.sbin/makemap/Makefile
+++ b/usr.sbin/makemap/Makefile
@@ -13,17 +13,7 @@ CFLAGS+= -DNEWDB -DNOT_SENDMAIL
WARNS?= 2
-LIBSMDIR= ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-LIBSMDBDIR= ${.OBJDIR}/../../lib/libsmdb
-LIBSMDB= ${LIBSMDBDIR}/libsmdb.a
-
-LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil
-LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a
-
-DPADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
-LDADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
+LIBADD= sm smdb smutil
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile
index 4fe6f03..dc6f3e4 100644
--- a/usr.sbin/mfiutil/Makefile
+++ b/usr.sbin/mfiutil/Makefile
@@ -8,8 +8,7 @@ MAN8= mfiutil.8
CFLAGS.gcc+= -fno-builtin-strftime
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
# Here be dragons
.ifdef DEBUG
diff --git a/usr.sbin/mount_smbfs/Makefile b/usr.sbin/mount_smbfs/Makefile
index bbc084f..c4c2d1c 100644
--- a/usr.sbin/mount_smbfs/Makefile
+++ b/usr.sbin/mount_smbfs/Makefile
@@ -8,8 +8,7 @@ MOUNTDIR= ${.CURDIR}/../../sbin/mount
CONTRIBDIR= ${.CURDIR}/../../contrib/smbfs
CFLAGS+= -DSMBFS -I${MOUNTDIR} -I${CONTRIBDIR}/include
-LDADD= -lsmb -lkiconv
-DPADD= ${LIBSMB} ${LIBKICONV}
+LIBADD= smb
.PATH: ${CONTRIBDIR}/mount_smbfs
.PATH: ${MOUNTDIR}
diff --git a/usr.sbin/mountd/Makefile b/usr.sbin/mountd/Makefile
index c141d8a..ab32fa3 100644
--- a/usr.sbin/mountd/Makefile
+++ b/usr.sbin/mountd/Makefile
@@ -11,7 +11,6 @@ WARNS?= 2
.PATH: ${MOUNT}
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/moused/Makefile b/usr.sbin/moused/Makefile
index a313a21..0f9eac5 100644
--- a/usr.sbin/moused/Makefile
+++ b/usr.sbin/moused/Makefile
@@ -3,8 +3,7 @@
PROG= moused
MAN= moused.8
-DPADD= ${LIBUTIL} ${LIBM}
-LDADD= -lutil -lm
+LIBADD= m util
#BINMODE=4555
#PRECIOUSPROG=
diff --git a/usr.sbin/mptutil/Makefile b/usr.sbin/mptutil/Makefile
index 53d75b3..2054c26 100644
--- a/usr.sbin/mptutil/Makefile
+++ b/usr.sbin/mptutil/Makefile
@@ -8,8 +8,7 @@ MAN= mptutil.8
WARNS?= 3
-DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL}
-LDADD= -lcam -lsbuf -lutil
+LIBADD= cam util
# Here be dragons
.ifdef DEBUG
diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile
index 1ceb52e..4f23a75 100644
--- a/usr.sbin/mtree/Makefile
+++ b/usr.sbin/mtree/Makefile
@@ -11,8 +11,7 @@ SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c
SRCS+= specspec.c
CFLAGS+= -DMD5 -DSHA1 -DRMD160 -DSHA256
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
CLEANFILES+= fmtree.8
diff --git a/usr.sbin/nandtool/Makefile b/usr.sbin/nandtool/Makefile
index ae9de2d..c01c2fd 100644
--- a/usr.sbin/nandtool/Makefile
+++ b/usr.sbin/nandtool/Makefile
@@ -4,8 +4,7 @@ PROG= nandtool
SRCS= nandtool.c nand_read.c nand_write.c nand_erase.c nand_info.c
SRCS+= nand_readoob.c nand_writeoob.c
BINDIR= /usr/sbin
-DPADD= ${LIBGEOM}
-LDADD= -lgeom
+LIBADD= geom
MAN= nandtool.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/ndiscvt/Makefile b/usr.sbin/ndiscvt/Makefile
index b11b4b0..3322a53 100644
--- a/usr.sbin/ndiscvt/Makefile
+++ b/usr.sbin/ndiscvt/Makefile
@@ -13,8 +13,7 @@ MAN+= ndisgen.8
WARNS?= 4
NO_WCAST_ALIGN=
-DPADD= ${LIBL}
-LDADD= -ll
+LIBADD= l
YFLAGS+=-v
diff --git a/usr.sbin/ngctl/Makefile b/usr.sbin/ngctl/Makefile
index cf72f39..71b5d2b 100644
--- a/usr.sbin/ngctl/Makefile
+++ b/usr.sbin/ngctl/Makefile
@@ -17,13 +17,11 @@ NGCTL_NO_LIBEDIT=
NGCTL_NO_LIBEDIT=
.endif
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
.if !defined(NGCTL_NO_LIBEDIT)
CFLAGS+= -DEDITLINE
-DPADD+= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAPW}
-LDADD+= -lpthread -ledit -ltermcapw
+LIBADD+= edit pthread
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/nghook/Makefile b/usr.sbin/nghook/Makefile
index e427f26..8a63d82 100644
--- a/usr.sbin/nghook/Makefile
+++ b/usr.sbin/nghook/Makefile
@@ -5,7 +5,6 @@ PROG= nghook
MAN= nghook.8
SRCS= main.c
-DPADD= ${LIBNETGRAPH}
-LDADD= -lnetgraph
+LIBADD= netgraph
.include <bsd.prog.mk>
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index 2368239..03af6d6 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -8,15 +8,13 @@ PROG= mtree
MAN= mtree.5 mtree.8
SRCS= compare.c crc.c create.c excludes.c getid.c misc.c mtree.c \
only.c spec.c specspec.c verify.c
-DPADD+= ${LIBMD} ${LIBUTIL}
-LDADD+= -lmd -lutil
CFLAGS+= -I${.CURDIR}/../../contrib/mknod
.PATH: ${.CURDIR}/../../contrib/mknod
SRCS+= pack_dev.c
CFLAGS+= -I${.CURDIR}/../../lib/libnetbsd
-LIBADD= netbsd
+LIBADD= netbsd md util
LINKS= ${BINDIR}/mtree ${BINDIR}/nmtree
MLINKS= mtree.8 nmtree.8
diff --git a/usr.sbin/nscd/Makefile b/usr.sbin/nscd/Makefile
index 298e163..96a2e8a 100644
--- a/usr.sbin/nscd/Makefile
+++ b/usr.sbin/nscd/Makefile
@@ -8,8 +8,8 @@ SRCS= agent.c nscd.c nscdcli.c cachelib.c cacheplcs.c debug.c log.c \
config.c query.c mp_ws_query.c mp_rs_query.c singletons.c protocol.c \
parser.c
CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/nscd.conf\""
-DPADD= ${LIBM} ${LIBPTHREAD} ${LIBUTIL}
-LDADD= -lm -lpthread -lutil
+
+LIBADD= util pthread
.PATH: ${.CURDIR}/agents
.include "${.CURDIR}/agents/Makefile.inc"
diff --git a/usr.sbin/ntp/Makefile.inc b/usr.sbin/ntp/Makefile.inc
index cadd4c7..755fbee 100644
--- a/usr.sbin/ntp/Makefile.inc
+++ b/usr.sbin/ntp/Makefile.inc
@@ -14,10 +14,6 @@ CFLAGS+= ${NTPDEFS} ${DEFS_LOCAL} ${CLOCKDEFS}
CFLAGS+= -DOPENSSL
.endif
-LIBOPTS= ${.OBJDIR}/../libopts/libopts.a
-LIBPARSE= ${.OBJDIR}/../libparse/libparse.a
-LIBNTP= ${.OBJDIR}/../libntp/libntp.a
-
WARNS?= 0
.include "../Makefile.inc"
diff --git a/usr.sbin/ntp/ntp-keygen/Makefile b/usr.sbin/ntp/ntp-keygen/Makefile
index 78308fa..4091b89 100644
--- a/usr.sbin/ntp/ntp-keygen/Makefile
+++ b/usr.sbin/ntp/ntp-keygen/Makefile
@@ -13,12 +13,10 @@ SRCS= ntp-keygen.c ntp-keygen-opts.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
-I${.CURDIR}/../../../contrib/ntp/libopts
-DPADD= ${LIBNTP} ${LIBOPTS}
-LDADD= ${LIBNTP} ${LIBOPTS}
+LIBADD+= ntp opts
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBMD} ${LIBCRYPTO}
-LDADD+= -lmd -lcrypto
+LIBADD+= md crypto
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/ntpd/Makefile b/usr.sbin/ntp/ntpd/Makefile
index 87b2d72..58f35de 100644
--- a/usr.sbin/ntp/ntpd/Makefile
+++ b/usr.sbin/ntp/ntpd/Makefile
@@ -32,12 +32,10 @@ SRCS= cmd_args.c ntp_config.c \
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
-I${.CURDIR}/../../../contrib/ntp/libopts -I${.CURDIR}
-DPADD= ${LIBPARSE} ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT} ${LIBOPTS}
-LDADD= ${LIBPARSE} ${LIBNTP} -lm -lmd -lrt ${LIBOPTS}
+LIBADD= parse ntp m rt opts md
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
.endif
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntpdate/Makefile b/usr.sbin/ntp/ntpdate/Makefile
index f55ec92..7a45835 100644
--- a/usr.sbin/ntp/ntpdate/Makefile
+++ b/usr.sbin/ntp/ntpdate/Makefile
@@ -8,8 +8,7 @@ SRCS= ntpdate.c version.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
-DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBRT}
-LDADD= ${LIBNTP} -lm -lmd -lrt
+LIBADD= md rt ntp
CLEANFILES+= .version version.c
diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile
index d3c37e1..cda51d4 100644
--- a/usr.sbin/ntp/ntpdc/Makefile
+++ b/usr.sbin/ntp/ntpdc/Makefile
@@ -12,11 +12,7 @@ SRCS= ntpdc.c ntpdc_ops.c ntpdc-opts.c version.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
-I${.CURDIR}/../../../contrib/ntp/libopts
-DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS}
-LDADD= ${LIBNTP} -lm -lmd ${LIBOPTS}
-
-DPADD+= ${LIBEDIT} ${LIBTERMCAPW}
-LDADD+= -ledit -ltermcapw
+LIBADD= edit md ntp opts
CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
-I${DESTDIR}/${INCLUDEDIR}/edit
diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile
index 369bd58..95e3296 100644
--- a/usr.sbin/ntp/ntpq/Makefile
+++ b/usr.sbin/ntp/ntpq/Makefile
@@ -14,11 +14,7 @@ SRCS= ntpq.c ntpq-opts.c ntpq-subs.c version.c
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
-I${.CURDIR}/../../../contrib/ntp/libopts
-DPADD= ${LIBNTP} ${LIBM} ${LIBMD} ${LIBOPTS}
-LDADD= ${LIBNTP} -lm -lmd ${LIBOPTS}
-
-DPADD+= ${LIBEDIT} ${LIBTERMCAPW}
-LDADD+= -ledit -ltermcapw
+LIBADD+= edit md ntp opts
CFLAGS+= -DHAVE_LIBEDIT -DHAVE_READLINE_READLINE_H \
-I${DESTDIR}/${INCLUDEDIR}/edit
diff --git a/usr.sbin/ntp/ntptime/Makefile b/usr.sbin/ntp/ntptime/Makefile
index d3bf7a7..65f1a71 100644
--- a/usr.sbin/ntp/ntptime/Makefile
+++ b/usr.sbin/ntp/ntptime/Makefile
@@ -7,7 +7,6 @@ MAN=
CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../
-DPADD= ${LIBNTP}
-LDADD= ${LIBNTP}
+LIBADD= ntp
.include <bsd.prog.mk>
diff --git a/usr.sbin/ntp/sntp/Makefile b/usr.sbin/ntp/sntp/Makefile
index 11316c5..a2eede1 100644
--- a/usr.sbin/ntp/sntp/Makefile
+++ b/usr.sbin/ntp/sntp/Makefile
@@ -10,7 +10,6 @@ CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ \
-DPACKAGE=\"sntp\" -DVERSION=\"1.6\" \
-I${.CURDIR}/../../../contrib/ntp/libopts
-DPADD= ${LIBM} ${LIBOPTS}
-LDADD= -lm ${LIBOPTS}
+LIBADD= m opts
.include <bsd.prog.mk>
diff --git a/usr.sbin/pkg/Makefile b/usr.sbin/pkg/Makefile
index c372a3c..0884b6b 100644
--- a/usr.sbin/pkg/Makefile
+++ b/usr.sbin/pkg/Makefile
@@ -6,9 +6,6 @@ MAN= pkg.7
CFLAGS+=-I${.CURDIR}/../../contrib/libucl/include
.PATH: ${.CURDIR}/../../contrib/libucl/include
-DPADD= ${LIBARCHIVE} ${LIBFETCH} ${LIBUCL} ${LIBSBUF} ${LIBSSL} \
- ${LIBCRYPTO} ${LIBM}
-LDADD= -larchive -lfetch ${LDUCL} -lsbuf -lssl -lcrypto -lm
-USEPRIVATELIB= ucl
+LIBADD= archive fetch ucl sbuf crypto
.include <bsd.prog.mk>
diff --git a/usr.sbin/pmccontrol/Makefile b/usr.sbin/pmccontrol/Makefile
index 0f6dc76..1940b1f 100644
--- a/usr.sbin/pmccontrol/Makefile
+++ b/usr.sbin/pmccontrol/Makefile
@@ -5,8 +5,7 @@
PROG= pmccontrol
MAN= pmccontrol.8
-DPADD= ${LIBPMC}
-LDADD= -lpmc
+LIBADD+= pmc
SRCS= pmccontrol.c
diff --git a/usr.sbin/pmcstat/Makefile b/usr.sbin/pmcstat/Makefile
index 78cde44..dc5a30a 100644
--- a/usr.sbin/pmcstat/Makefile
+++ b/usr.sbin/pmcstat/Makefile
@@ -5,8 +5,7 @@
PROG= pmcstat
MAN= pmcstat.8
-DPADD= ${LIBELF} ${LIBKVM} ${LIBPMC} ${LIBM} ${LIBNCURSESW}
-LDADD= -lelf -lkvm -lpmc -lm -lncursesw
+LIBADD= elf kvm pmc m ncursesw
SRCS= pmcstat.c pmcstat.h pmcstat_log.c \
pmcpl_callgraph.c pmcpl_gprof.c pmcpl_annotate.c \
diff --git a/usr.sbin/powerd/Makefile b/usr.sbin/powerd/Makefile
index 62f8da1..4434dcf 100644
--- a/usr.sbin/powerd/Makefile
+++ b/usr.sbin/powerd/Makefile
@@ -3,7 +3,6 @@
PROG= powerd
MAN= powerd.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/ppp/Makefile b/usr.sbin/ppp/Makefile
index dda493e..30de68c 100644
--- a/usr.sbin/ppp/Makefile
+++ b/usr.sbin/ppp/Makefile
@@ -41,8 +41,7 @@ BINOWN= root
BINGRP= network
M4FLAGS=
-LDADD= -lcrypt -lmd -lutil -lz
-DPADD= ${LIBCRYPT} ${LIBMD} ${LIBUTIL} ${LIBZ}
+LIBADD= md util z
.if defined(PPP_CONFDIR) && !empty(PPP_CONFDIR)
CFLAGS+=-DPPP_CONFDIR=\"${PPP_CONFDIR}\"
@@ -60,8 +59,7 @@ CFLAGS+=-DNOINET6
CFLAGS+=-DNONAT
.else
SRCS+= nat_cmd.c
-LDADD+= -lalias
-DPADD+= ${LIBALIAS}
+LIBADD+= alias
.endif
.if defined(PPP_NO_ATM)
@@ -80,24 +78,21 @@ SRCS+= id.c
CFLAGS+=-DNODES
.else
SRCS+= chap_ms.c mppe.c
-LDADD+= -lcrypto
-DPADD+= ${LIBCRYPTO}
+LIBADD+= crypto
.endif
.if defined(PPP_NO_RADIUS)
CFLAGS+=-DNORADIUS
.else
SRCS+= radius.c
-LDADD+= -lradius
-DPADD+= ${LIBRADIUS}
+LIBADD+= radius
.endif
.if defined(PPP_NO_NETGRAPH)
CFLAGS+=-DNONETGRAPH
.else
SRCS+= ether.c
-LDADD+= -lnetgraph
-DPADD+= ${LIBNETGRAPH}
+LIBADD+= netgraph
.if defined(EXPERIMENTAL_NETGRAPH)
CFLAGS+=-DEXPERIMENTAL_NETGRAPH
SRCS+= netgraph.c
@@ -107,8 +102,7 @@ SRCS+= netgraph.c
.if defined(PPP_NO_PAM)
CFLAGS+=-DNOPAM
.else
-LDADD+= ${MINUSLPAM}
-DPADD+= ${LIBPAM}
+LIBADD+= pam
.endif
.include <bsd.prog.mk>
diff --git a/usr.sbin/pppctl/Makefile b/usr.sbin/pppctl/Makefile
index 4a03b86..dcb7931 100644
--- a/usr.sbin/pppctl/Makefile
+++ b/usr.sbin/pppctl/Makefile
@@ -5,7 +5,6 @@ MAN= pppctl.8
WARNS?= 2
-DPADD= ${LIBPTHREAD} ${LIBEDIT} ${LIBTERMCAPW}
-LDADD= -lpthread -ledit -ltermcapw
+LIBADD= edit pthread
.include <bsd.prog.mk>
diff --git a/usr.sbin/praliases/Makefile b/usr.sbin/praliases/Makefile
index 120028d..6fadc1b 100644
--- a/usr.sbin/praliases/Makefile
+++ b/usr.sbin/praliases/Makefile
@@ -13,17 +13,7 @@ CFLAGS+= -DNEWDB -DNOT_SENDMAIL
WARNS?= 2
-LIBSMDIR= ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-LIBSMDBDIR= ${.OBJDIR}/../../lib/libsmdb
-LIBSMDB= ${LIBSMDBDIR}/libsmdb.a
-
-LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil
-LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a
-
-DPADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
-LDADD= ${LIBSMDB} ${LIBSMUTIL} ${LIBSM}
+LIBADD= sm smdb smutil
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
diff --git a/usr.sbin/praudit/Makefile b/usr.sbin/praudit/Makefile
index 6a61fd1..6d85fb3 100644
--- a/usr.sbin/praudit/Makefile
+++ b/usr.sbin/praudit/Makefile
@@ -10,7 +10,6 @@ MAN= praudit.1
WARNS?= 3
-DPADD= ${LIBBSM}
-LDADD= -lbsm
+LIBADD= bsm
.include <bsd.prog.mk>
diff --git a/usr.sbin/pstat/Makefile b/usr.sbin/pstat/Makefile
index 414708c..e3b0533 100644
--- a/usr.sbin/pstat/Makefile
+++ b/usr.sbin/pstat/Makefile
@@ -6,7 +6,6 @@ LINKS= ${BINDIR}/pstat ${BINDIR}/swapinfo
MAN= pstat.8
MLINKS= pstat.8 swapinfo.8
-DPADD= ${LIBKVM} ${LIBUTIL}
-LDADD= -lkvm -lutil
+LIBADD= kvm util
.include <bsd.prog.mk>
diff --git a/usr.sbin/quotaon/Makefile b/usr.sbin/quotaon/Makefile
index 23ba8d1..ec3dc1a 100644
--- a/usr.sbin/quotaon/Makefile
+++ b/usr.sbin/quotaon/Makefile
@@ -6,7 +6,6 @@ LINKS= ${BINDIR}/quotaon ${BINDIR}/quotaoff
MAN= quotaon.8
MLINKS= quotaon.8 quotaoff.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/rarpd/Makefile b/usr.sbin/rarpd/Makefile
index 52a9f92..b7816cd 100644
--- a/usr.sbin/rarpd/Makefile
+++ b/usr.sbin/rarpd/Makefile
@@ -4,8 +4,7 @@
PROG= rarpd
MAN= rarpd.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
WARNS?= 3
# This breaks with format strings returned by expand_syslog_m().. argh!
diff --git a/usr.sbin/repquota/Makefile b/usr.sbin/repquota/Makefile
index ed80132..78fd398 100644
--- a/usr.sbin/repquota/Makefile
+++ b/usr.sbin/repquota/Makefile
@@ -3,7 +3,6 @@
PROG= repquota
MAN= repquota.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile
index 139f4bc..16b4d4f 100644
--- a/usr.sbin/rpc.lockd/Makefile
+++ b/usr.sbin/rpc.lockd/Makefile
@@ -9,8 +9,7 @@ SRCS= kern.c nlm_prot_svc.c lockd.c lock_proc.c lockd_lock.c
CFLAGS+= -I. -I${DESTDIR}/usr/include/rpcsvc
WARNS?= 3
-DPADD= ${LIBRPCSVC} ${LIBUTIL}
-LDADD= -lrpcsvc -lutil
+LIBADD= rpcsvc util
CLEANFILES= nlm_prot_svc.c nlm_prot.h test
diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile
index 6fa2b1e..43504e4 100644
--- a/usr.sbin/rpc.statd/Makefile
+++ b/usr.sbin/rpc.statd/Makefile
@@ -7,8 +7,7 @@ SRCS= file.c sm_inter_svc.c sm_inter.h statd.c procs.c
CFLAGS+= -I.
WARNS?= 2
-DPADD= ${LIBRPCSVC}
-LDADD= -lrpcsvc
+LIBADD= rpcsvc
CLEANFILES= sm_inter_svc.c sm_inter.h
diff --git a/usr.sbin/rpc.yppasswdd/Makefile b/usr.sbin/rpc.yppasswdd/Makefile
index a9d3a75..5f5fb77 100644
--- a/usr.sbin/rpc.yppasswdd/Makefile
+++ b/usr.sbin/rpc.yppasswdd/Makefile
@@ -20,8 +20,7 @@ CFLAGS+= -I${.CURDIR}/../../usr.sbin/vipw \
-I${.CURDIR}/../../usr.sbin/ypserv \
-I${.CURDIR}/../../libexec/ypxfr \
-I${.CURDIR} -I.
-DPADD= ${LIBRPCSVC} ${LIBCRYPT} ${LIBUTIL}
-LDADD= -lrpcsvc -lcrypt -lutil
+LIBADD= rpcsvc crypt util
CLEANFILES= ${GENSRCS}
diff --git a/usr.sbin/rpc.ypupdated/Makefile b/usr.sbin/rpc.ypupdated/Makefile
index 03c1142..d5c346e 100644
--- a/usr.sbin/rpc.ypupdated/Makefile
+++ b/usr.sbin/rpc.ypupdated/Makefile
@@ -13,8 +13,7 @@ CFLAGS+= -I${.CURDIR}/../ypserv -I. -I${.CURDIR}/../../libexec/ypxfr
WARNS?= 1
-DPADD= ${LIBRPCSVC}
-LDADD= -lrpcsvc
+LIBADD= rpcsvc
CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h
diff --git a/usr.sbin/rpc.ypxfrd/Makefile b/usr.sbin/rpc.ypxfrd/Makefile
index 05971b1..903ac16 100644
--- a/usr.sbin/rpc.ypxfrd/Makefile
+++ b/usr.sbin/rpc.ypxfrd/Makefile
@@ -11,8 +11,7 @@ CFLAGS+= -I. -DXFRBLOCKSIZE=65535
WARNS?= 2
-DPADD= ${LIBRPCSVC}
-LDADD= -lrpcsvc
+LIBADD= rpcsvc
CLEANFILES= ypxfrd_svc.c ypxfrd.h
diff --git a/usr.sbin/rpcbind/Makefile b/usr.sbin/rpcbind/Makefile
index 44a030e..2b679f4 100644
--- a/usr.sbin/rpcbind/Makefile
+++ b/usr.sbin/rpcbind/Makefile
@@ -16,7 +16,6 @@ CFLAGS+= -DINET6
WARNS?= 1
-DPADD= ${LIBWRAP}
-LDADD= -lwrap
+LIBADD= wrap
.include <bsd.prog.mk>
diff --git a/usr.sbin/rrenumd/Makefile b/usr.sbin/rrenumd/Makefile
index 091e528..8c82fc3 100644
--- a/usr.sbin/rrenumd/Makefile
+++ b/usr.sbin/rrenumd/Makefile
@@ -23,8 +23,7 @@ YFLAGS= -d
WARNS?= 2
-LDADD= -lipsec -ll -ly
-DPADD= ${LIBIPSEC} ${LIBL} ${LIBY}
+LIBADD= ipsec l y
CLEANFILES= y.tab.h
SRCS+= y.tab.h
diff --git a/usr.sbin/rtadvd/Makefile b/usr.sbin/rtadvd/Makefile
index d48832d..33e90b6 100644
--- a/usr.sbin/rtadvd/Makefile
+++ b/usr.sbin/rtadvd/Makefile
@@ -19,8 +19,7 @@ MAN= rtadvd.conf.5 rtadvd.8
SRCS= rtadvd.c rrenum.c advcap.c if.c config.c timer.c timer_subr.c \
control.c control_server.c
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
CFLAGS+= -DHAVE_ARC4RANDOM
diff --git a/usr.sbin/rtsold/Makefile b/usr.sbin/rtsold/Makefile
index efc322c..53dea03 100644
--- a/usr.sbin/rtsold/Makefile
+++ b/usr.sbin/rtsold/Makefile
@@ -21,7 +21,6 @@ SRCS= rtsold.c rtsol.c if.c probe.c dump.c rtsock.c
WARNS?= 3
CFLAGS+= -DHAVE_ARC4RANDOM -DHAVE_POLL_H
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD= kvm
.include <bsd.prog.mk>
diff --git a/usr.sbin/sendmail/Makefile b/usr.sbin/sendmail/Makefile
index 893b6fd..1537d33 100644
--- a/usr.sbin/sendmail/Makefile
+++ b/usr.sbin/sendmail/Makefile
@@ -45,17 +45,7 @@ CFLAGS+= -DNETINET6
WARNS?= 1
-DPADD= ${LIBUTIL} ${LIBWRAP}
-LDADD= -lutil -lwrap
-
-LIBSMDIR= ${.OBJDIR}/../../lib/libsm
-LIBSM= ${LIBSMDIR}/libsm.a
-
-LIBSMUTILDIR= ${.OBJDIR}/../../lib/libsmutil
-LIBSMUTIL= ${LIBSMUTILDIR}/libsmutil.a
-
-DPADD+= ${LIBSMUTIL} ${LIBSM}
-LDADD+= ${LIBSMUTIL} ${LIBSM}
+LIBADD= util wrap sm smutil
SRCS+= sm_os.h
CLEANFILES+=sm_os.h
@@ -63,8 +53,7 @@ CLEANFILES+=sm_os.h
.if ${MK_OPENSSL} != "no"
# STARTTLS support
CFLAGS+= -DSTARTTLS -D_FFR_TLS_1
-DPADD+= ${LIBSSL} ${LIBCRYPTO}
-LDADD+= -lssl -lcrypto
+LIBADD+= ssl crypto
.endif
# User customizations to the sendmail build environment
diff --git a/usr.sbin/services_mkdb/Makefile b/usr.sbin/services_mkdb/Makefile
index e61c6df..05a4b76 100644
--- a/usr.sbin/services_mkdb/Makefile
+++ b/usr.sbin/services_mkdb/Makefile
@@ -4,7 +4,6 @@ PROG= services_mkdb
MAN= services_mkdb.8
SRCS= services_mkdb.c uniq.c extern.h
-DPADD+= ${LIBUTIL}
-LDADD+= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/snapinfo/Makefile b/usr.sbin/snapinfo/Makefile
index c5175f1..7601374 100644
--- a/usr.sbin/snapinfo/Makefile
+++ b/usr.sbin/snapinfo/Makefile
@@ -4,7 +4,6 @@
PROG= snapinfo
MAN= snapinfo.8
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
-.include <bsd.prog.mk>
+.include <bsd.prog.mk>
diff --git a/usr.sbin/spray/Makefile b/usr.sbin/spray/Makefile
index c2515e0..f007072 100644
--- a/usr.sbin/spray/Makefile
+++ b/usr.sbin/spray/Makefile
@@ -3,7 +3,6 @@
PROG= spray
MAN= spray.8
-DPADD= ${LIBRPCSVC}
-LDADD= -lrpcsvc
+LIBADD= rpcsvc
.include <bsd.prog.mk>
diff --git a/usr.sbin/syslogd/Makefile b/usr.sbin/syslogd/Makefile
index 069e093..716efbe 100644
--- a/usr.sbin/syslogd/Makefile
+++ b/usr.sbin/syslogd/Makefile
@@ -9,8 +9,7 @@ PROG= syslogd
MAN= syslog.conf.5 syslogd.8
SRCS= syslogd.c ttymsg.c
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
WARNS?= 3
diff --git a/usr.sbin/tcpdchk/Makefile b/usr.sbin/tcpdchk/Makefile
index e979916..5faea18 100644
--- a/usr.sbin/tcpdchk/Makefile
+++ b/usr.sbin/tcpdchk/Makefile
@@ -17,7 +17,6 @@ CFLAGS+=-DINET6
WARNS?= 0
-DPADD= ${LIBWRAP}
-LDADD= -lwrap
+LIBADD= wrap
.include <bsd.prog.mk>
diff --git a/usr.sbin/tcpdmatch/Makefile b/usr.sbin/tcpdmatch/Makefile
index f8ccf8a..bbe29a4 100644
--- a/usr.sbin/tcpdmatch/Makefile
+++ b/usr.sbin/tcpdmatch/Makefile
@@ -16,7 +16,6 @@ CFLAGS+=-DINET6
WARNS?= 0
-DPADD= ${LIBWRAP}
-LDADD= -lwrap
+LIBADD= wrap
.include <bsd.prog.mk>
diff --git a/usr.sbin/tcpdump/tcpdump/Makefile b/usr.sbin/tcpdump/tcpdump/Makefile
index fcaa13e..9e6a424 100644
--- a/usr.sbin/tcpdump/tcpdump/Makefile
+++ b/usr.sbin/tcpdump/tcpdump/Makefile
@@ -160,16 +160,13 @@ CFLAGS+= -DINET6
CFLAGS+= -DLBL_ALIGN
.endif
-DPADD= ${LIBL} ${LIBPCAP}
-LDADD= -ll -lpcap
+LIBADD= l pcap
.if ${MK_CASPER} != "no"
-DPADD+= ${LIBCAPSICUM} ${LIBNV}
-LDADD+= -lcapsicum -lnv
+LIBADD+= capsicum
CFLAGS+=-DHAVE_LIBCAPSICUM
.endif
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
CFLAGS+= -I${DESTDIR}/usr/include/openssl
CFLAGS+= -DHAVE_LIBCRYPTO -DHAVE_OPENSSL_EVP_H
.endif
diff --git a/usr.sbin/timed/timed/Makefile b/usr.sbin/timed/timed/Makefile
index af70b06..d4ce0fb 100644
--- a/usr.sbin/timed/timed/Makefile
+++ b/usr.sbin/timed/timed/Makefile
@@ -8,8 +8,7 @@ MAN= timed.8
SRCS= acksend.c candidate.c correct.c master.c networkdelta.c readmsg.c \
slave.c timed.c byteorder.c measure.c cksum.c
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
WARNS?= 1
diff --git a/usr.sbin/traceroute/Makefile b/usr.sbin/traceroute/Makefile
index 12f9a0b..a3b6a14 100644
--- a/usr.sbin/traceroute/Makefile
+++ b/usr.sbin/traceroute/Makefile
@@ -25,8 +25,7 @@ CFLAGS+= -DIPSEC
# CFLAGS+= -DSANE_PRECISION
.if !defined(TRACEROUTE_NO_IPSEC)
-DPADD= ${LIBIPSEC}
-LDADD= -lipsec
+LIBADD+= ipsec
.endif
CFLAGS+= -I${TRACEROUTE_DISTDIR}
diff --git a/usr.sbin/traceroute6/Makefile b/usr.sbin/traceroute6/Makefile
index 4428d5b..fc0b5fe 100644
--- a/usr.sbin/traceroute6/Makefile
+++ b/usr.sbin/traceroute6/Makefile
@@ -27,7 +27,6 @@ CFLAGS+= -I${.CURDIR} -I${TRACEROUTE_DISTDIR} -I.
WARNS?= 3
-DPADD= ${LIBIPSEC}
-LDADD= -lipsec
+LIBADD= ipsec
.include <bsd.prog.mk>
diff --git a/usr.sbin/tzsetup/Makefile b/usr.sbin/tzsetup/Makefile
index 4ef6533..de7375f 100644
--- a/usr.sbin/tzsetup/Makefile
+++ b/usr.sbin/tzsetup/Makefile
@@ -7,7 +7,6 @@ CFLAGS+= -I${.CURDIR}/../../contrib/dialog -I.
WARNS?= 3
-DPADD= ${LIBDIALOG} ${LIBNCURSESW} ${LIBM}
-LDADD= -ldialog -lncursesw -lm
+LIBADD= dialog ncursesw
.include <bsd.prog.mk>
diff --git a/usr.sbin/ugidfw/Makefile b/usr.sbin/ugidfw/Makefile
index d89bc85..7a5453e 100644
--- a/usr.sbin/ugidfw/Makefile
+++ b/usr.sbin/ugidfw/Makefile
@@ -3,7 +3,6 @@
PROG= ugidfw
MAN= ugidfw.8
-DPADD= ${LIBUGIDFW}
-LDADD= -lugidfw
+LIBADD= ugidfw
.include <bsd.prog.mk>
diff --git a/usr.sbin/uhsoctl/Makefile b/usr.sbin/uhsoctl/Makefile
index 565b2e6..264384b 100644
--- a/usr.sbin/uhsoctl/Makefile
+++ b/usr.sbin/uhsoctl/Makefile
@@ -4,7 +4,6 @@ PROG= uhsoctl
MAN= uhsoctl.1
WARNS?= 1
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/unbound/anchor/Makefile b/usr.sbin/unbound/anchor/Makefile
index 970fb70..64e01d2 100644
--- a/usr.sbin/unbound/anchor/Makefile
+++ b/usr.sbin/unbound/anchor/Makefile
@@ -10,9 +10,7 @@ EXPATDIR= ${.CURDIR}/../../../contrib/expat
PROG= unbound-anchor
SRCS= unbound-anchor.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR} -I${EXPATDIR}/lib
-DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBBSDXML} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD= ${LDUNBOUND} ${LDLDNS} -lutil -lbsdxml -lssl -lcrypto -lpthread
-USEPRIVATELIB= ldns
+LIBADD= unbound bsdxml ssl crypto pthread
MAN= unbound-anchor.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/unbound/checkconf/Makefile b/usr.sbin/unbound/checkconf/Makefile
index 0993d3d..884465b 100644
--- a/usr.sbin/unbound/checkconf/Makefile
+++ b/usr.sbin/unbound/checkconf/Makefile
@@ -9,9 +9,7 @@ UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
PROG= unbound-checkconf
SRCS= unbound-checkconf.c worker_cb.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
-DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD= ${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
-USEPRIVATELIB= ldns
+LIBADD= unbound pthread
MAN= unbound-checkconf.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/unbound/control/Makefile b/usr.sbin/unbound/control/Makefile
index 2989e73..1614127 100644
--- a/usr.sbin/unbound/control/Makefile
+++ b/usr.sbin/unbound/control/Makefile
@@ -10,9 +10,7 @@ PROG= unbound-control
SCRIPTS= unbound-control-setup.sh
SRCS= unbound-control.c worker_cb.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
-DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD= ${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
-USEPRIVATELIB= ldns
+LIBADD= unbound crypto ssl pthread
MAN= unbound-control.8
.include <bsd.prog.mk>
diff --git a/usr.sbin/unbound/daemon/Makefile b/usr.sbin/unbound/daemon/Makefile
index a8b1bb2..f90e06e 100644
--- a/usr.sbin/unbound/daemon/Makefile
+++ b/usr.sbin/unbound/daemon/Makefile
@@ -9,9 +9,7 @@ UNBOUNDDIR= ${.CURDIR}/../../../contrib/unbound
PROG= unbound
SRCS= acl_list.c cachedump.c daemon.c remote.c stats.c unbound.c worker.c
CFLAGS= -I${UNBOUNDDIR} -I${LDNSDIR}
-DPADD= ${LIBUNBOUND} ${LIBLDNS} ${LIBUTIL} ${LIBSSL} ${LIBCRYPTO} ${LIBPTHREAD}
-LDADD= ${LDUNBOUND} ${LDLDNS} -lutil -lssl -lcrypto -lpthread
-USEPRIVATELIB= ldns
+LIBADD= unbound util ssl crypto pthread
MAN= unbound.8 unbound.conf.5
.include <bsd.prog.mk>
diff --git a/usr.sbin/usbconfig/Makefile b/usr.sbin/usbconfig/Makefile
index 0aa51fa..bfc4b63 100644
--- a/usr.sbin/usbconfig/Makefile
+++ b/usr.sbin/usbconfig/Makefile
@@ -4,7 +4,6 @@
PROG= usbconfig
MAN= usbconfig.8
SRCS= usbconfig.c dump.c
-DPADD+= ${LIBUSB}
-LDADD+= -lusb
+LIBADD= usb
.include <bsd.prog.mk>
diff --git a/usr.sbin/vipw/Makefile b/usr.sbin/vipw/Makefile
index d98e401..f36825d 100644
--- a/usr.sbin/vipw/Makefile
+++ b/usr.sbin/vipw/Makefile
@@ -4,7 +4,6 @@
PROG= vipw
MAN= vipw.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/watch/Makefile b/usr.sbin/watch/Makefile
index 184d331..981aec0 100644
--- a/usr.sbin/watch/Makefile
+++ b/usr.sbin/watch/Makefile
@@ -5,7 +5,6 @@ MAN= watch.8
WARNS?= 2
-DPADD= ${LIBTERMCAPW}
-LDADD= -ltermcapw
+LIBADD= ncursesw
.include <bsd.prog.mk>
diff --git a/usr.sbin/watchdogd/Makefile b/usr.sbin/watchdogd/Makefile
index 5df7946..bce983f 100644
--- a/usr.sbin/watchdogd/Makefile
+++ b/usr.sbin/watchdogd/Makefile
@@ -4,8 +4,7 @@ PROG= watchdogd
LINKS= ${BINDIR}/watchdogd ${BINDIR}/watchdog
MAN= watchdogd.8 watchdog.8
-LDADD= -lutil
-DPADD= ${LIBUTIL}
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/wpa/Makefile.crypto b/usr.sbin/wpa/Makefile.crypto
index 94367bb..3049011 100644
--- a/usr.sbin/wpa/Makefile.crypto
+++ b/usr.sbin/wpa/Makefile.crypto
@@ -2,8 +2,7 @@
.if ${MK_OPENSSL} != "no" && !defined(RELEASE_CRUNCH)
SRCS+= crypto_openssl.c random.c sha1-prf.c sha256-prf.c
-DPADD+= ${LIBSSL} ${LIBCRYPTO}
-LDADD+= -lssl -lcrypto
+LIBADD+= ssl crypto
CFLAGS+= -DCONFIG_SHA256
.else
CFLAGS+=-DCONFIG_CRYPTO_INTERNAL
diff --git a/usr.sbin/wpa/hostapd/Makefile b/usr.sbin/wpa/hostapd/Makefile
index 7ab542f..4621ad3 100644
--- a/usr.sbin/wpa/hostapd/Makefile
+++ b/usr.sbin/wpa/hostapd/Makefile
@@ -46,8 +46,7 @@ CFLAGS+=-DCONFIG_DRIVER_BSD \
CFLAGS+= -DCONFIG_IPV6
.endif
#CFLAGS+= -g
-DPADD+= ${LIBPCAP} ${LIBUTIL}
-LDADD+= -lpcap -lutil
+LIBADD+= pcap util
# User customizations for wpa_supplicant/hostapd build environment
CFLAGS+=${HOSTAPD_CFLAGS}
diff --git a/usr.sbin/wpa/hostapd_cli/Makefile b/usr.sbin/wpa/hostapd_cli/Makefile
index 3542aac..48af140 100644
--- a/usr.sbin/wpa/hostapd_cli/Makefile
+++ b/usr.sbin/wpa/hostapd_cli/Makefile
@@ -10,8 +10,7 @@ SRCS= common.c edit.c eloop.c hostapd_cli.c os_unix.c wpa_ctrl.c wpa_debug.c
CFLAGS+= -DCONFIG_CTRL_IFACE
CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX
-DPADD+= ${LIBUTIL}
-LDADD+= -lutil
+LIBADD+= util
MAN= hostapd_cli.8
diff --git a/usr.sbin/wpa/wpa_cli/Makefile b/usr.sbin/wpa/wpa_cli/Makefile
index 9530b73..3203829 100644
--- a/usr.sbin/wpa/wpa_cli/Makefile
+++ b/usr.sbin/wpa/wpa_cli/Makefile
@@ -15,7 +15,6 @@ CFLAGS+= -DCONFIG_CTRL_IFACE_UNIX
CFLAGS+= -D_DIRENT_HAVE_D_TYPE
CFLAGS+= -DCONFIG_WPA_CLI_EDIT=y
-LDADD+= -lutil
-DPADD+= ${LIBUTIL}
+LIBADD+= util
.include <bsd.prog.mk>
diff --git a/usr.sbin/wpa/wpa_passphrase/Makefile b/usr.sbin/wpa/wpa_passphrase/Makefile
index d0f5198..c138481 100644
--- a/usr.sbin/wpa/wpa_passphrase/Makefile
+++ b/usr.sbin/wpa/wpa_passphrase/Makefile
@@ -11,8 +11,7 @@ SRCS= common.c md5-internal.c md5.c os_unix.c sha1-internal.c sha1-pbkdf2.c sha1
CFLAGS+= -DINTERNAL_SHA1
CFLAGS+= -DINTERNAL_MD5
-DPADD+= ${LIBUTIL}
-LDADD+= -lutil
+LIBADD+= util
MAN= wpa_passphrase.8
diff --git a/usr.sbin/wpa/wpa_priv/Makefile b/usr.sbin/wpa/wpa_priv/Makefile
index 4dbc631..cf77678 100644
--- a/usr.sbin/wpa/wpa_priv/Makefile
+++ b/usr.sbin/wpa/wpa_priv/Makefile
@@ -9,8 +9,7 @@ PROG= wpa_priv
SRCS= drivers.c os_unix.c eloop.c common.c wpa_debug.c wpabuf.c wpa_priv.c \
driver_common.c l2_packet_freebsd.c
-DPADD+= ${LIBPCAP}
-LDADD+= -lpcap
+LIBADD= pcap
.include "${.CURDIR}/../Makefile.crypto"
diff --git a/usr.sbin/wpa/wpa_supplicant/Makefile b/usr.sbin/wpa/wpa_supplicant/Makefile
index 673a04d..dd40766 100644
--- a/usr.sbin/wpa/wpa_supplicant/Makefile
+++ b/usr.sbin/wpa/wpa_supplicant/Makefile
@@ -49,8 +49,7 @@ CFLAGS+=-DCONFIG_BACKEND_FILE \
-DCONFIG_GAS \
-DPKCS12_FUNCS
#CFLAGS+= -g
-DPADD+= ${LIBPCAP} ${LIBUTIL}
-LDADD+= -lpcap -lutil
+LIBADD= pcap util
# User customizations to the wpa_supplicant build environment
CFLAGS+=${WPA_SUPPLICANT_CFLAGS}
@@ -127,8 +126,7 @@ NEED_FIPS186_2_PRF=y
#
.if !empty(CFLAGS:M*-DPCSC_FUNCS)
SRCS+= pcsc_funcs.c
-DPADD+=${LIBPTHREAD}
-LDADD+=-lpcsclite -lpthread
+LIBADD+= pcslite pthread
.endif
.if !empty(CFLAGS:M*-DEAP_GPSK)
diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile
index cb24c43..28d6a66 100644
--- a/usr.sbin/ypserv/Makefile
+++ b/usr.sbin/ypserv/Makefile
@@ -12,8 +12,7 @@ CFLAGS+= -DDB_CACHE -DTCP_WRAPPER -I.
WARNS?= 0
-DPADD= ${LIBWRAP}
-LDADD= -lwrap
+LIBADD= wrap
CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h
OpenPOWER on IntegriCloud