aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2014-11-25 11:23:12 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2014-11-25 11:23:12 +0000
commit13eb765f2d1a7497df9f56f5ca95950e04cb4c01 (patch)
tree69f31f17bfe80e77e4f38188819e4e69f11b9f25
parentcc0d90a7997d7483dcfb77b908a709fa5561a5fb (diff)
downloadsrc-13eb765f2d1a7497df9f56f5ca95950e04cb4c01.tar.gz
src-13eb765f2d1a7497df9f56f5ca95950e04cb4c01.zip
Convert sbin/ to LIBADD
Reduce overlinking
Notes
Notes: svn path=/head/; revision=275030
-rw-r--r--sbin/atm/atmconfig/Makefile6
-rw-r--r--sbin/badsect/Makefile3
-rw-r--r--sbin/bsdlabel/Makefile3
-rw-r--r--sbin/camcontrol/Makefile3
-rw-r--r--sbin/casperd/Makefile3
-rw-r--r--sbin/ccdconfig/Makefile3
-rw-r--r--sbin/ddb/Makefile3
-rw-r--r--sbin/devd/Makefile3
-rw-r--r--sbin/dhclient/Makefile3
-rw-r--r--sbin/dmesg/Makefile3
-rw-r--r--sbin/dumpfs/Makefile3
-rw-r--r--sbin/fdisk/Makefile3
-rw-r--r--sbin/fdisk_pc98/Makefile3
-rw-r--r--sbin/ffsinfo/Makefile3
-rw-r--r--sbin/fsck_ffs/Makefile3
-rw-r--r--sbin/fsck_ffs/dir.c1
-rw-r--r--sbin/fsdb/Makefile3
-rw-r--r--sbin/gbde/Makefile3
-rw-r--r--sbin/geom/Makefile3
-rw-r--r--sbin/geom/class/eli/Makefile3
-rw-r--r--sbin/geom/class/journal/Makefile3
-rw-r--r--sbin/geom/class/mirror/Makefile3
-rw-r--r--sbin/geom/class/part/Makefile3
-rw-r--r--sbin/geom/class/raid/Makefile3
-rw-r--r--sbin/geom/class/raid3/Makefile3
-rw-r--r--sbin/geom/core/Makefile3
-rw-r--r--sbin/ggate/ggatec/Makefile3
-rw-r--r--sbin/ggate/ggated/Makefile3
-rw-r--r--sbin/ggate/ggatel/Makefile3
-rw-r--r--sbin/growfs/Makefile5
-rw-r--r--sbin/gvinum/Makefile3
-rw-r--r--sbin/hastctl/Makefile6
-rw-r--r--sbin/hastd/Makefile6
-rw-r--r--sbin/ifconfig/Makefile9
-rw-r--r--sbin/init/Makefile3
-rw-r--r--sbin/ipf/Makefile.inc4
-rw-r--r--sbin/ipf/ipf/Makefile3
-rw-r--r--sbin/ipf/ipfstat/Makefile3
-rw-r--r--sbin/ipf/ipsend/Makefile3
-rw-r--r--sbin/ipfw/Makefile3
-rw-r--r--sbin/iscontrol/Makefile3
-rw-r--r--sbin/md5/Makefile3
-rw-r--r--sbin/mdconfig/Makefile3
-rw-r--r--sbin/mount/Makefile3
-rw-r--r--sbin/mount_cd9660/Makefile3
-rw-r--r--sbin/mount_msdosfs/Makefile3
-rw-r--r--sbin/mount_udf/Makefile3
-rw-r--r--sbin/nandfs/Makefile3
-rw-r--r--sbin/natd/Makefile3
-rw-r--r--sbin/newfs/Makefile3
-rw-r--r--sbin/newfs_nandfs/Makefile3
-rw-r--r--sbin/pfctl/Makefile3
-rw-r--r--sbin/pflogd/Makefile3
-rw-r--r--sbin/ping/Makefile9
-rw-r--r--sbin/ping6/Makefile3
-rw-r--r--sbin/quotacheck/Makefile3
-rw-r--r--sbin/rcorder/Makefile3
-rw-r--r--sbin/routed/Makefile3
-rw-r--r--sbin/routed/rtquery/Makefile3
-rw-r--r--sbin/savecore/Makefile3
-rw-r--r--sbin/setkey/Makefile6
-rw-r--r--sbin/sunlabel/Makefile3
-rw-r--r--sbin/swapon/Makefile3
-rw-r--r--sbin/tunefs/Makefile3
64 files changed, 73 insertions, 144 deletions
diff --git a/sbin/atm/atmconfig/Makefile b/sbin/atm/atmconfig/Makefile
index f3dce2663f9a..1e48f0454d32 100644
--- a/sbin/atm/atmconfig/Makefile
+++ b/sbin/atm/atmconfig/Makefile
@@ -17,11 +17,9 @@ CFLAGS+= -I${.OBJDIR}
.if !defined(RESCUE) && ${MK_BSNMP} != "no"
CFLAGS+= -DWITH_BSNMP
SRCS+= oid.h atmconfig_device.c
-DPADD+= ${LIBBSNMP}
-LDADD+= -lbsnmp
+LIBADD+= bsnmp
. if ${MK_DYNAMICROOT} == "no" && ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
. endif
.endif
diff --git a/sbin/badsect/Makefile b/sbin/badsect/Makefile
index b6cb545e09f5..c11f8cba506a 100644
--- a/sbin/badsect/Makefile
+++ b/sbin/badsect/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PROG= badsect
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
MAN= badsect.8
WARNS?= 2
diff --git a/sbin/bsdlabel/Makefile b/sbin/bsdlabel/Makefile
index e51e928afb24..42f0f1c3861a 100644
--- a/sbin/bsdlabel/Makefile
+++ b/sbin/bsdlabel/Makefile
@@ -12,7 +12,6 @@ LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel
MLINKS= bsdlabel.8 disklabel.8
.endif
-DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD= -lgeom -lbsdxml -lsbuf
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/camcontrol/Makefile b/sbin/camcontrol/Makefile
index 4f11f195db5b..f23ef521a8b7 100644
--- a/sbin/camcontrol/Makefile
+++ b/sbin/camcontrol/Makefile
@@ -11,8 +11,7 @@ CFLAGS+= -DMINIMALISTIC
.if ${MACHINE_CPUARCH} == "arm"
WARNS?= 3
.endif
-DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL}
-LDADD= -lcam -lsbuf -lutil
+LIBADD= cam sbuf util
MAN= camcontrol.8
.include <bsd.prog.mk>
diff --git a/sbin/casperd/Makefile b/sbin/casperd/Makefile
index f5a8e05860a8..93f145ceeb38 100644
--- a/sbin/casperd/Makefile
+++ b/sbin/casperd/Makefile
@@ -4,8 +4,7 @@ PROG= casperd
SRCS= casperd.c zygote.c
-DPADD= ${LIBCASPER} ${LIBCAPSICUM} ${LIBNV} ${LIBPJDLOG} ${LIBUTIL}
-LDADD= -lcasper -lcapsicum -lnv -lpjdlog -lutil
+LIBADD= casper nv pjdlog util
MAN= casperd.8
diff --git a/sbin/ccdconfig/Makefile b/sbin/ccdconfig/Makefile
index 0feca5426dec..3b64dafb5c83 100644
--- a/sbin/ccdconfig/Makefile
+++ b/sbin/ccdconfig/Makefile
@@ -3,7 +3,6 @@
PROG= ccdconfig
MAN= ccdconfig.8
-DPADD= ${LIBGEOM}
-LDADD= -lgeom
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/ddb/Makefile b/sbin/ddb/Makefile
index c556be12f016..72abbed337ae 100644
--- a/sbin/ddb/Makefile
+++ b/sbin/ddb/Makefile
@@ -5,7 +5,6 @@ SRCS= ddb.c ddb_capture.c ddb_script.c
MAN= ddb.8
WARNS?= 3
-DPADD= ${LIBKVM}
-LDADD= -lkvm
+LIBADD= kvm
.include <bsd.prog.mk>
diff --git a/sbin/devd/Makefile b/sbin/devd/Makefile
index 518e5e2c21d5..fc0021656beb 100644
--- a/sbin/devd/Makefile
+++ b/sbin/devd/Makefile
@@ -10,8 +10,7 @@ WARNS?= 3
NO_SHARED?=YES
-DPADD= ${LIBL} ${LIBUTIL}
-LDADD= -ll -lutil
+LIBADD= l util
YFLAGS+=-v
CFLAGS+=-I. -I${.CURDIR}
diff --git a/sbin/dhclient/Makefile b/sbin/dhclient/Makefile
index 09f19db0747e..868df6d6ba65 100644
--- a/sbin/dhclient/Makefile
+++ b/sbin/dhclient/Makefile
@@ -41,8 +41,7 @@ PROG= dhclient
SCRIPTS=dhclient-script
MAN= dhclient.8 dhclient.conf.5 dhclient.leases.5 dhcp-options.5 \
dhclient-script.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
WARNS?= 2
diff --git a/sbin/dmesg/Makefile b/sbin/dmesg/Makefile
index 266551be5765..64a0155917be 100644
--- a/sbin/dmesg/Makefile
+++ b/sbin/dmesg/Makefile
@@ -4,7 +4,6 @@
PROG= dmesg
MAN= dmesg.8
-LDADD= -lkvm
-DPADD= ${LIBKVM}
+LIBADD= kvm
.include <bsd.prog.mk>
diff --git a/sbin/dumpfs/Makefile b/sbin/dumpfs/Makefile
index fe464e03f7be..87eb89b1782e 100644
--- a/sbin/dumpfs/Makefile
+++ b/sbin/dumpfs/Makefile
@@ -3,8 +3,7 @@
PROG= dumpfs
WARNS?= 2
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
MAN= dumpfs.8
.include <bsd.prog.mk>
diff --git a/sbin/fdisk/Makefile b/sbin/fdisk/Makefile
index 795377917e1c..a49c69954d0f 100644
--- a/sbin/fdisk/Makefile
+++ b/sbin/fdisk/Makefile
@@ -7,8 +7,7 @@ MAN= fdisk.8
.PATH: ${.CURDIR}/../../sys/geom
-DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD+= -lgeom -lbsdxml -lsbuf
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/fdisk_pc98/Makefile b/sbin/fdisk_pc98/Makefile
index 6961d31d58a8..9915267e6d7c 100644
--- a/sbin/fdisk_pc98/Makefile
+++ b/sbin/fdisk_pc98/Makefile
@@ -7,7 +7,6 @@ MAN= fdisk.8
.PATH: ${.CURDIR}/../../sys/geom
-DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD+= -lgeom -lbsdxml -lsbuf
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/ffsinfo/Makefile b/sbin/ffsinfo/Makefile
index cb4e8f945979..7fd033d3475a 100644
--- a/sbin/ffsinfo/Makefile
+++ b/sbin/ffsinfo/Makefile
@@ -13,7 +13,6 @@ MAN= ffsinfo.8
WARNS?= 1
CFLAGS+=-DFS_DEBUG -I${GROWFS}
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
.include <bsd.prog.mk>
diff --git a/sbin/fsck_ffs/Makefile b/sbin/fsck_ffs/Makefile
index 028a4867c85d..02754697dfa5 100644
--- a/sbin/fsck_ffs/Makefile
+++ b/sbin/fsck_ffs/Makefile
@@ -9,8 +9,7 @@ MLINKS= fsck_ffs.8 fsck_ufs.8 fsck_ffs.8 fsck_4.2bsd.8
SRCS= dir.c ea.c fsutil.c inode.c main.c pass1.c pass1b.c pass2.c pass3.c \
pass4.c pass5.c setup.c suj.c utilities.c gjournal.c getmntopts.c \
globs.c
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
WARNS?= 2
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../mount
diff --git a/sbin/fsck_ffs/dir.c b/sbin/fsck_ffs/dir.c
index 7640f704b76a..9203000f4fce 100644
--- a/sbin/fsck_ffs/dir.c
+++ b/sbin/fsck_ffs/dir.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/time.h>
+#include <sys/types.h>
#include <sys/sysctl.h>
#include <ufs/ufs/dinode.h>
diff --git a/sbin/fsdb/Makefile b/sbin/fsdb/Makefile
index 21ac09f9c66d..e0a9cc3cb382 100644
--- a/sbin/fsdb/Makefile
+++ b/sbin/fsdb/Makefile
@@ -9,8 +9,7 @@ SRCS= fsdb.c fsdbutil.c \
pass5.c setup.c utilities.c ffs_subr.c ffs_tables.c globs.c
CFLAGS+= -I${.CURDIR}/../fsck_ffs
WARNS?= 2
-LDADD= -ledit -ltermcapw
-DPADD= ${LIBEDIT} ${LIBTERMCAPW}
+LIBADD= edit
.PATH: ${.CURDIR}/../fsck_ffs ${.CURDIR}/../../sys/ufs/ffs
.include <bsd.prog.mk>
diff --git a/sbin/gbde/Makefile b/sbin/gbde/Makefile
index 019ee18f8af3..c33136b05e14 100644
--- a/sbin/gbde/Makefile
+++ b/sbin/gbde/Makefile
@@ -20,8 +20,7 @@ CFLAGS+= -I${.CURDIR}/../../sys
CLEANFILES+= template.c
MAN= gbde.8
-DPADD= ${LIBMD} ${LIBUTIL} ${LIBGEOM}
-LDADD= -lmd -lutil -lgeom
+LIBADD= md util geom
template.c: template.txt
file2c 'const char template[] = {' ',0};' \
diff --git a/sbin/geom/Makefile b/sbin/geom/Makefile
index ced58425c657..19a56360ccce 100644
--- a/sbin/geom/Makefile
+++ b/sbin/geom/Makefile
@@ -14,8 +14,7 @@ MAN=
WARNS?= 2
CFLAGS+=-I${.CURDIR} -I${.CURDIR}/core -DSTATIC_GEOM_CLASSES
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil
+LIBADD= geom util
.include <bsd.prog.mk>
diff --git a/sbin/geom/class/eli/Makefile b/sbin/geom/class/eli/Makefile
index 119566876d71..f8e453dc616c 100644
--- a/sbin/geom/class/eli/Makefile
+++ b/sbin/geom/class/eli/Makefile
@@ -8,8 +8,7 @@ SRCS+= g_eli_key.c
SRCS+= pkcs5v2.c
SRCS+= sha2.c
-DPADD= ${LIBMD} ${LIBCRYPTO}
-LDADD= -lmd -lcrypto
+LIBADD= md crypto
WARNS?= 3
diff --git a/sbin/geom/class/journal/Makefile b/sbin/geom/class/journal/Makefile
index 2db8d3002734..0e1a38ea6dc4 100644
--- a/sbin/geom/class/journal/Makefile
+++ b/sbin/geom/class/journal/Makefile
@@ -5,8 +5,7 @@
GEOM_CLASS= journal
SRCS+= geom_journal_ufs.c
-DPADD= ${LIBMD} ${LIBUFS}
-LDADD= -lmd -lufs
+LIBADD= ufs md
CFLAGS+=-I${.CURDIR}/../../../../sys
diff --git a/sbin/geom/class/mirror/Makefile b/sbin/geom/class/mirror/Makefile
index e38d617b6da5..ce7ee6466326 100644
--- a/sbin/geom/class/mirror/Makefile
+++ b/sbin/geom/class/mirror/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= mirror
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/part/Makefile b/sbin/geom/class/part/Makefile
index 341cd42b8c97..4b67de4ef415 100644
--- a/sbin/geom/class/part/Makefile
+++ b/sbin/geom/class/part/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= part
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/raid/Makefile b/sbin/geom/class/raid/Makefile
index 743f690f0fd9..07d71403d48f 100644
--- a/sbin/geom/class/raid/Makefile
+++ b/sbin/geom/class/raid/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= raid
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/class/raid3/Makefile b/sbin/geom/class/raid3/Makefile
index d2405d4b4f5d..74e12455a432 100644
--- a/sbin/geom/class/raid3/Makefile
+++ b/sbin/geom/class/raid3/Makefile
@@ -4,7 +4,6 @@
GEOM_CLASS= raid3
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.lib.mk>
diff --git a/sbin/geom/core/Makefile b/sbin/geom/core/Makefile
index 64edc793a95e..0636d037a358 100644
--- a/sbin/geom/core/Makefile
+++ b/sbin/geom/core/Makefile
@@ -11,7 +11,6 @@ NO_SHARED=NO
CFLAGS+= -DGEOM_CLASS_DIR=\"${GEOM_CLASS_DIR}\"
CFLAGS+= -I${.CURDIR}/../../../sys -I${.CURDIR} -I${.CURDIR}/..
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil
+LIBADD= geom util
.include <bsd.prog.mk>
diff --git a/sbin/ggate/ggatec/Makefile b/sbin/ggate/ggatec/Makefile
index 4d8917f3164c..e228feaf471a 100644
--- a/sbin/ggate/ggatec/Makefile
+++ b/sbin/ggate/ggatec/Makefile
@@ -10,7 +10,6 @@ CFLAGS+= -DMAX_SEND_SIZE=32768
CFLAGS+= -DLIBGEOM
CFLAGS+= -I${.CURDIR}/../shared
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL} ${LIBPTHREAD}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil -lpthread
+LIBADD= geom util pthread
.include <bsd.prog.mk>
diff --git a/sbin/ggate/ggated/Makefile b/sbin/ggate/ggated/Makefile
index 4e7708ebffa3..af5c9bdf796a 100644
--- a/sbin/ggate/ggated/Makefile
+++ b/sbin/ggate/ggated/Makefile
@@ -6,8 +6,7 @@ PROG= ggated
MAN= ggated.8
SRCS= ggated.c ggate.c
-DPADD= ${LIBPTHREAD}
-LDADD= -lpthread
+LIBADD= pthread
CFLAGS+= -I${.CURDIR}/../shared
diff --git a/sbin/ggate/ggatel/Makefile b/sbin/ggate/ggatel/Makefile
index 604a75480313..be88bd496c36 100644
--- a/sbin/ggate/ggatel/Makefile
+++ b/sbin/ggate/ggatel/Makefile
@@ -9,7 +9,6 @@ SRCS= ggatel.c ggate.c
CFLAGS+= -DLIBGEOM
CFLAGS+= -I${.CURDIR}/../shared
-DPADD= ${LIBGEOM} ${LIBSBUF} ${LIBBSDXML} ${LIBUTIL}
-LDADD= -lgeom -lsbuf -lbsdxml -lutil
+LIBADD= geom util
.include <bsd.prog.mk>
diff --git a/sbin/growfs/Makefile b/sbin/growfs/Makefile
index 025771fa0370..1f7422e6d4a9 100644
--- a/sbin/growfs/Makefile
+++ b/sbin/growfs/Makefile
@@ -19,11 +19,10 @@ CFLAGS+=-I${.CURDIR}/../mount
SRCS+= debug.c
.endif
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.if ${MK_TESTS} != "no"
SUBDIR+= tests
.endif
-.include <bsd.prog.mk>
+.include <bsd.prog.mk>
diff --git a/sbin/gvinum/Makefile b/sbin/gvinum/Makefile
index 1b5f948ce893..0e56920d9cee 100644
--- a/sbin/gvinum/Makefile
+++ b/sbin/gvinum/Makefile
@@ -7,8 +7,7 @@ MAN= gvinum.8
WARNS?= 2
CFLAGS+= -I${.CURDIR}/../../sys -I${DESTDIR}/${INCLUDEDIR}/edit
-DPADD= ${LIBEDIT} ${LIBTERMCAPW} ${LIBDEVSTAT} ${LIBKVM} ${LIBGEOM}
-LDADD= -ledit -ltermcapw -ldevstat -lkvm -lgeom
+LIBADD= edit geom
.PATH: ${.CURDIR}/../../sys/geom/vinum
diff --git a/sbin/hastctl/Makefile b/sbin/hastctl/Makefile
index 89b972e56705..41d443d32783 100644
--- a/sbin/hastctl/Makefile
+++ b/sbin/hastctl/Makefile
@@ -32,11 +32,9 @@ CFLAGS+=-DINET6
CFLAGS+=-DYY_NO_UNPUT
CFLAGS+=-DYY_NO_INPUT
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
CFLAGS+=-DHAVE_CRYPTO
.endif
diff --git a/sbin/hastd/Makefile b/sbin/hastd/Makefile
index 3604b5bab41d..e3fed8d0b522 100644
--- a/sbin/hastd/Makefile
+++ b/sbin/hastd/Makefile
@@ -30,11 +30,9 @@ CFLAGS+=-DINET
CFLAGS+=-DINET6
.endif
-DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} ${LIBPTHREAD} ${LIBUTIL}
-LDADD= -lgeom -lbsdxml -lsbuf -lpthread -lutil
+LIBADD= geom pthread util
.if ${MK_OPENSSL} != "no"
-DPADD+= ${LIBCRYPTO}
-LDADD+= -lcrypto
+LIBADD+= crypto
CFLAGS+=-DHAVE_CRYPTO
.endif
diff --git a/sbin/ifconfig/Makefile b/sbin/ifconfig/Makefile
index 8aba6b466255..885f8a9922bd 100644
--- a/sbin/ifconfig/Makefile
+++ b/sbin/ifconfig/Makefile
@@ -35,12 +35,10 @@ SRCS+= ifgre.c # GRE keys etc
SRCS+= ifgif.c # GIF reversed header workaround
SRCS+= sfp.c # SFP/SFP+ information
-DPADD+= ${LIBM}
-LDADD+= -lm
+LIBADD+= m
SRCS+= ifieee80211.c regdomain.c # SIOC[GS]IEEE80211 support
-DPADD+= ${LIBBSDXML} ${LIBSBUF}
-LDADD+= -lbsdxml -lsbuf
+LIBADD+= bsdxml sbuf
SRCS+= carp.c # SIOC[GS]VH support
SRCS+= ifgroup.c # ...
@@ -59,8 +57,7 @@ CFLAGS+= -DINET
.endif
.if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE)
CFLAGS+= -DJAIL
-DPADD+= ${LIBJAIL}
-LDADD+= -ljail
+LIBADD+= jail
.endif
MAN= ifconfig.8
diff --git a/sbin/init/Makefile b/sbin/init/Makefile
index 7497a4b54fd7..6e9c0fc99c67 100644
--- a/sbin/init/Makefile
+++ b/sbin/init/Makefile
@@ -6,8 +6,7 @@ MAN= init.8
PRECIOUSPROG=
INSTALLFLAGS=-b -B.bak
CFLAGS+=-DDEBUGSHELL -DSECURE -DLOGIN_CAP -DCOMPAT_SYSV_INIT
-DPADD= ${LIBUTIL} ${LIBCRYPT}
-LDADD= -lutil -lcrypt
+LIBADD= util crypt
NO_SHARED?= YES
diff --git a/sbin/ipf/Makefile.inc b/sbin/ipf/Makefile.inc
index 2d7d7b1c71bf..79bdb8e378db 100644
--- a/sbin/ipf/Makefile.inc
+++ b/sbin/ipf/Makefile.inc
@@ -18,9 +18,7 @@ CFLAGS+= -DUSE_INET6
CFLAGS+= -DNOINET6
.endif
-LIBIPF= ${.OBJDIR}/../libipf/libipf.a
-DPADD+= ${LIBIPF} ${LIBKVM}
-LDADD+= ${LIBIPF} -lkvm
+LIBADD+= ipf
CLEANFILES+= y.tab.c y.tab.h
diff --git a/sbin/ipf/ipf/Makefile b/sbin/ipf/ipf/Makefile
index c3938c63af61..3ffd2b272489 100644
--- a/sbin/ipf/ipf/Makefile
+++ b/sbin/ipf/ipf/Makefile
@@ -35,8 +35,7 @@ ipf_l.h: lexer.h
LIBIPF_SRCS!= cd ${.CURDIR}/../libipf && ${MAKE} -V SRCS
SRCS+= ${LIBIPF_SRCS}
.else
-DPADD+= ${LIBPCAP}
-LDADD+= -lpcap
+LIBADD+= pcap
.endif
.include <bsd.prog.mk>
diff --git a/sbin/ipf/ipfstat/Makefile b/sbin/ipf/ipfstat/Makefile
index a33c5df38d8f..14823cf5110c 100644
--- a/sbin/ipf/ipfstat/Makefile
+++ b/sbin/ipf/ipfstat/Makefile
@@ -5,7 +5,6 @@ NOGCCERROR= # defined
PROG= ipfstat
SRCS= ipfstat.c
MAN= ipfstat.8
-DPADD+= ${LIBCURSES}
-LDADD+= -lcurses
+LIBADD+= ncursesw
.include <bsd.prog.mk>
diff --git a/sbin/ipf/ipsend/Makefile b/sbin/ipf/ipsend/Makefile
index 4ae4c3441bbb..176cb106baff 100644
--- a/sbin/ipf/ipsend/Makefile
+++ b/sbin/ipf/ipsend/Makefile
@@ -8,8 +8,7 @@ PROG= ipsend
SRCS= ipsend.c ip.c ipsopt.c iplang_y.c iplang_l.l sbpf.c \
sock.c 44arp.c
MAN= ipsend.1 ipsend.5
-DPADD+= ${LIBL}
-LDADD+= -ll
+LIBADD+= l
CFLAGS+= -I${NETBSDSRCDIR}/dist/ipf/ipsend
CFLAGS+= -I${NETBSDSRCDIR}/dist/ipf/iplang
diff --git a/sbin/ipfw/Makefile b/sbin/ipfw/Makefile
index 9eb4511fb3c9..efd99fcdf316 100644
--- a/sbin/ipfw/Makefile
+++ b/sbin/ipfw/Makefile
@@ -11,8 +11,7 @@ SRCS+= altq.c
CFLAGS+=-DPF
.endif
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
MAN= ipfw.8
.include <bsd.prog.mk>
diff --git a/sbin/iscontrol/Makefile b/sbin/iscontrol/Makefile
index 9bdc29bc5b70..a79233fdcfa5 100644
--- a/sbin/iscontrol/Makefile
+++ b/sbin/iscontrol/Makefile
@@ -2,8 +2,7 @@
SRCS= iscontrol.c pdu.c fsm.c config.c login.c auth_subr.c misc.c
PROG= iscontrol
-DPADD= ${LIBCAM} ${LIBMD}
-LDADD= -lcam -lmd
+LIBADD= cam md
S= ${.CURDIR}/../../sys
WARNS?= 3
diff --git a/sbin/md5/Makefile b/sbin/md5/Makefile
index eabf129f6b43..a16d46004315 100644
--- a/sbin/md5/Makefile
+++ b/sbin/md5/Makefile
@@ -16,7 +16,6 @@ MLINKS= md5.1 rmd160.1 \
NO_WMISSING_VARIABLE_DECLARATIONS=
WFORMAT?= 1
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
.include <bsd.prog.mk>
diff --git a/sbin/mdconfig/Makefile b/sbin/mdconfig/Makefile
index 69a688cdc389..6be9129144e7 100644
--- a/sbin/mdconfig/Makefile
+++ b/sbin/mdconfig/Makefile
@@ -5,8 +5,7 @@
PROG= mdconfig
MAN= mdconfig.8
-DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF}
-LDADD= -lutil -lgeom -lbsdxml -lsbuf
+LIBADD= util geom
.if ${MK_TESTS} != "no"
SUBDIR+= tests
diff --git a/sbin/mount/Makefile b/sbin/mount/Makefile
index c4d98f0fc56a..f95085a6cae7 100644
--- a/sbin/mount/Makefile
+++ b/sbin/mount/Makefile
@@ -6,7 +6,6 @@ SRCS= mount.c mount_fs.c getmntopts.c vfslist.c
MAN= mount.8 mount.conf.8
# We do NOT install the getmntopts.3 man page.
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/sbin/mount_cd9660/Makefile b/sbin/mount_cd9660/Makefile
index b889174ffa05..c70892c3309e 100644
--- a/sbin/mount_cd9660/Makefile
+++ b/sbin/mount_cd9660/Makefile
@@ -4,8 +4,7 @@
PROG= mount_cd9660
SRCS= mount_cd9660.c getmntopts.c
MAN= mount_cd9660.8
-DPADD= ${LIBKICONV}
-LDADD= -lkiconv
+LIBADD= kiconv
MOUNT= ${.CURDIR}/../mount
CFLAGS+= -I${MOUNT}
diff --git a/sbin/mount_msdosfs/Makefile b/sbin/mount_msdosfs/Makefile
index c3e416af21fc..ede86b4d8674 100644
--- a/sbin/mount_msdosfs/Makefile
+++ b/sbin/mount_msdosfs/Makefile
@@ -5,8 +5,7 @@
PROG= mount_msdosfs
SRCS= mount_msdosfs.c getmntopts.c
MAN= mount_msdosfs.8
-DPADD= ${LIBKICONV}
-LDADD= -lkiconv
+LIBADD= kiconv
MOUNT= ${.CURDIR}/../mount
CFLAGS+= -I${MOUNT}
diff --git a/sbin/mount_udf/Makefile b/sbin/mount_udf/Makefile
index 06ad9a768e4c..12d5d5822424 100644
--- a/sbin/mount_udf/Makefile
+++ b/sbin/mount_udf/Makefile
@@ -3,8 +3,7 @@
PROG= mount_udf
SRCS= mount_udf.c getmntopts.c
MAN= mount_udf.8
-DPADD= ${LIBKICONV}
-LDADD= -lkiconv
+LIBADD= kiconv
MOUNT= ${.CURDIR}/../mount
CFLAGS+= -I${MOUNT} -I${.CURDIR}/../../sys
diff --git a/sbin/nandfs/Makefile b/sbin/nandfs/Makefile
index 8474b09c522d..5757f8c16886 100644
--- a/sbin/nandfs/Makefile
+++ b/sbin/nandfs/Makefile
@@ -4,7 +4,6 @@ PROG= nandfs
SRCS= nandfs.c lssnap.c mksnap.c rmsnap.c
MAN= nandfs.8
-DPADD= ${LIBNANDFS}
-LDADD= -lnandfs
+LIBADD= nandfs
.include <bsd.prog.mk>
diff --git a/sbin/natd/Makefile b/sbin/natd/Makefile
index 7d8b3e49eae1..44e5b6f3b0f6 100644
--- a/sbin/natd/Makefile
+++ b/sbin/natd/Makefile
@@ -3,8 +3,7 @@
PROG = natd
SRCS = natd.c icmp.c
WARNS?= 3
-LDADD = -lalias
-DPADD = ${LIBALIAS}
+LIBADD = alias
MAN = natd.8
.include <bsd.prog.mk>
diff --git a/sbin/newfs/Makefile b/sbin/newfs/Makefile
index d45143ba7a83..83801fd38947 100644
--- a/sbin/newfs/Makefile
+++ b/sbin/newfs/Makefile
@@ -4,8 +4,7 @@
.PATH: ${.CURDIR}/../../sys/geom
PROG= newfs
-DPADD= ${LIBUFS} ${LIBUTIL}
-LDADD= -lufs -lutil
+LIBADD= ufs util
SRCS= newfs.c mkfs.c geom_bsd_enc.c
WARNS?= 3
diff --git a/sbin/newfs_nandfs/Makefile b/sbin/newfs_nandfs/Makefile
index 1d990eddf52c..7a39fbb088e6 100644
--- a/sbin/newfs_nandfs/Makefile
+++ b/sbin/newfs_nandfs/Makefile
@@ -3,7 +3,6 @@
PROG= newfs_nandfs
MAN= newfs_nandfs.8
-LDADD+= -lgeom
-DPADD+= ${LIBGEOM}
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/pfctl/Makefile b/sbin/pfctl/Makefile
index 937f403569dd..de3b7ec5012c 100644
--- a/sbin/pfctl/Makefile
+++ b/sbin/pfctl/Makefile
@@ -28,7 +28,6 @@ CFLAGS+= -DWITH_INET
YFLAGS=
-LDADD+= -lm -lmd
-DPADD+= ${LIBM} ${LIBMD}
+LIBADD= m md
.include <bsd.prog.mk>
diff --git a/sbin/pflogd/Makefile b/sbin/pflogd/Makefile
index fcff8eb45135..49a311e11bb7 100644
--- a/sbin/pflogd/Makefile
+++ b/sbin/pflogd/Makefile
@@ -8,8 +8,7 @@ MAN= pflogd.8
CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h
-LDADD= -lpcap
-DPADD= ${LIBPCAP}
+LIBADD= pcap
WARNS?= 2
diff --git a/sbin/ping/Makefile b/sbin/ping/Makefile
index 57f82a8f72b7..533f8b845d7a 100644
--- a/sbin/ping/Makefile
+++ b/sbin/ping/Makefile
@@ -8,19 +8,16 @@ MAN= ping.8
BINOWN= root
BINMODE=4555
WARNS?= 3
-DPADD= ${LIBM}
-LDADD= -lm
+LIBADD= m
.if ${MK_CASPER} != "no" && !defined(RESCUE)
-DPADD+= ${LIBCAPSICUM} ${LIBNV}
-LDADD+= -lcapsicum -lnv
+LIBADD+= capsicum
CFLAGS+=-DHAVE_LIBCAPSICUM
.endif
.if !defined(RELEASE_CRUNCH)
CFLAGS+=-DIPSEC
-DPADD+= ${LIBIPSEC}
-LDADD+= -lipsec
+LIBADD+= ipsec
.endif
.include <bsd.prog.mk>
diff --git a/sbin/ping6/Makefile b/sbin/ping6/Makefile
index e40dc6eb9393..35a76e47f853 100644
--- a/sbin/ping6/Makefile
+++ b/sbin/ping6/Makefile
@@ -10,7 +10,6 @@ WARNS?= 3
BINOWN= root
BINMODE=4555
-LDADD= -lipsec -lm -lmd
-DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD}
+LIBADD= ipsec m md
.include <bsd.prog.mk>
diff --git a/sbin/quotacheck/Makefile b/sbin/quotacheck/Makefile
index 51a88b7681c7..7be3e3510503 100644
--- a/sbin/quotacheck/Makefile
+++ b/sbin/quotacheck/Makefile
@@ -5,8 +5,7 @@ PROG= quotacheck
SRCS= quotacheck.c preen.c fsutil.c utilities.c
WARNS?= 2
MAN= quotacheck.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.PATH: ${.CURDIR}/../fsck ${.CURDIR}/../fsck_ffs
diff --git a/sbin/rcorder/Makefile b/sbin/rcorder/Makefile
index b71aa4b83d37..50e797f4cc43 100644
--- a/sbin/rcorder/Makefile
+++ b/sbin/rcorder/Makefile
@@ -5,8 +5,7 @@ PROG= rcorder
SRCS= ealloc.c hash.c rcorder.c
MAN= rcorder.8
-LDADD= -lutil
-DPADD= ${LIBUTIL}
+LIBADD= util
# XXX hack for make's hash.[ch]
CFLAGS+= -DORDER -I.
diff --git a/sbin/routed/Makefile b/sbin/routed/Makefile
index 8f2a8193318e..2308722c7191 100644
--- a/sbin/routed/Makefile
+++ b/sbin/routed/Makefile
@@ -5,8 +5,7 @@ PROG= routed
MAN= routed.8
SRCS= if.c input.c main.c output.c parms.c radix.c rdisc.c table.c trace.c
WARNS?= 3
-DPADD= ${LIBMD}
-LDADD= -lmd
+LIBADD= md
SUBDIR= rtquery
diff --git a/sbin/routed/rtquery/Makefile b/sbin/routed/rtquery/Makefile
index e5d0f5a65203..4df7dc29ace3 100644
--- a/sbin/routed/rtquery/Makefile
+++ b/sbin/routed/rtquery/Makefile
@@ -4,8 +4,7 @@
PROG= rtquery
MAN= rtquery.8
-LDADD= -lmd
-DPADD= ${LIBMD}
+LIBADD= md
WARNS?= 3
NO_WARRAY_BOUNDS=
diff --git a/sbin/savecore/Makefile b/sbin/savecore/Makefile
index f25745826029..e07a81532f87 100644
--- a/sbin/savecore/Makefile
+++ b/sbin/savecore/Makefile
@@ -1,8 +1,7 @@
# $FreeBSD$
PROG= savecore
-DPADD= ${LIBZ}
-LDADD= -lz
+LIBADD= z
MAN= savecore.8
.include <bsd.prog.mk>
diff --git a/sbin/setkey/Makefile b/sbin/setkey/Makefile
index bd04f07c1eb4..e974af5f0b15 100644
--- a/sbin/setkey/Makefile
+++ b/sbin/setkey/Makefile
@@ -37,8 +37,7 @@ WARNS?= 1
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../../lib/libipsec
YFLAGS= -d
-DPADD= ${LIBL} ${LIBY}
-LDADD= -ll -ly
+LIBADD= l y
CLEANFILES= y.tab.c y.tab.h key_test.o keytest
@@ -55,8 +54,7 @@ CFLAGS+= -DIPSEC_DEBUG -DYY_NO_UNPUT
CFLAGS+= -DINET6
.endif
CFLAGS+= -I.
-DPADD+= ${LIBIPSEC}
-LDADD+= -lipsec
+LIBADD+= ipsec
CLEANFILES+= scriptdump y.tab.h
#SCRIPTS= scriptdump
diff --git a/sbin/sunlabel/Makefile b/sbin/sunlabel/Makefile
index ed64bee5809c..21ccfd751a68 100644
--- a/sbin/sunlabel/Makefile
+++ b/sbin/sunlabel/Makefile
@@ -11,8 +11,7 @@ LINKS= ${BINDIR}/sunlabel ${BINDIR}/disklabel
MLINKS= sunlabel.8 disklabel.8
.endif
-DPADD= ${LIBGEOM}
-LDADD= -lgeom
+LIBADD= geom
.include <bsd.prog.mk>
diff --git a/sbin/swapon/Makefile b/sbin/swapon/Makefile
index 6f8e8df2e5a6..e9074be9c433 100644
--- a/sbin/swapon/Makefile
+++ b/sbin/swapon/Makefile
@@ -8,7 +8,6 @@ LINKS+= ${BINDIR}/swapon ${BINDIR}/swapctl
MLINKS= swapon.8 swapoff.8
MLINKS+=swapon.8 swapctl.8
-DPADD= ${LIBUTIL}
-LDADD= -lutil
+LIBADD= util
.include <bsd.prog.mk>
diff --git a/sbin/tunefs/Makefile b/sbin/tunefs/Makefile
index d5313c445526..07fe3b1ccaa1 100644
--- a/sbin/tunefs/Makefile
+++ b/sbin/tunefs/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PROG= tunefs
-DPADD= ${LIBUFS}
-LDADD= -lufs
+LIBADD= ufs
MAN= tunefs.8
WARNS= 3