Index: head/sbin/atm/atmconfig/Makefile =================================================================== --- head/sbin/atm/atmconfig/Makefile (revision 275029) +++ head/sbin/atm/atmconfig/Makefile (revision 275030) @@ -1,45 +1,43 @@ # Copyright (c) 2001-2003 # Fraunhofer Institute for Open Communication Systems (FhG Fokus). # All rights reserved. # Author: Harti Brandt # # $FreeBSD$ .include PROG= atmconfig SRCS= main.c diag.c natm.c MAN= atmconfig.8 # CFLAGS+= -DPATH_HELP='".:/usr/share/doc/atm:/usr/local/share/doc/atm"' 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 CLEANFILES+= oid.h # XXX - this is verboten .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif FILES= atmconfig.help atmconfig_device.help FILESDIR= /usr/share/doc/atm SNMP_ATM_DEF= ${.CURDIR}/../../../contrib/ngatm/snmp_atm/atm_tree.def \ ${.CURDIR}/../../../usr.sbin/bsnmpd/modules/snmp_atm/atm_freebsd.def oid.h: atm_oid.list ${SNMP_ATM_DEF} cat ${SNMP_ATM_DEF} | gensnmptree -e `tail -n +2 ${.CURDIR}/atm_oid.list` \ > ${.TARGET} .include Index: head/sbin/badsect/Makefile =================================================================== --- head/sbin/badsect/Makefile (revision 275029) +++ head/sbin/badsect/Makefile (revision 275030) @@ -1,10 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= badsect -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= badsect.8 WARNS?= 2 .include Index: head/sbin/bsdlabel/Makefile =================================================================== --- head/sbin/bsdlabel/Makefile (revision 275029) +++ head/sbin/bsdlabel/Makefile (revision 275030) @@ -1,18 +1,17 @@ # @(#)Makefile 8.2 (Berkeley) 3/17/94 # $FreeBSD$ .PATH: ${.CURDIR}/../../sys/geom PROG= bsdlabel SRCS= bsdlabel.c geom_bsd_enc.c MAN+= bsdlabel.8 .if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64" LINKS= ${BINDIR}/bsdlabel ${BINDIR}/disklabel MLINKS= bsdlabel.8 disklabel.8 .endif -DPADD= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include Index: head/sbin/camcontrol/Makefile =================================================================== --- head/sbin/camcontrol/Makefile (revision 275029) +++ head/sbin/camcontrol/Makefile (revision 275030) @@ -1,18 +1,17 @@ # $FreeBSD$ PROG= camcontrol SRCS= camcontrol.c util.c .if !defined(RELEASE_CRUNCH) SRCS+= fwdownload.c modeedit.c persist.c progress.c .else CFLAGS+= -DMINIMALISTIC .endif # This is verboten .if ${MACHINE_CPUARCH} == "arm" WARNS?= 3 .endif -DPADD= ${LIBCAM} ${LIBSBUF} ${LIBUTIL} -LDADD= -lcam -lsbuf -lutil +LIBADD= cam sbuf util MAN= camcontrol.8 .include Index: head/sbin/casperd/Makefile =================================================================== --- head/sbin/casperd/Makefile (revision 275029) +++ head/sbin/casperd/Makefile (revision 275030) @@ -1,18 +1,17 @@ # $FreeBSD$ 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 CFLAGS+=-I${.CURDIR} CFLAGS+=-I${.CURDIR}/../../lib/libcapsicum CFLAGS+=-I${.CURDIR}/../../lib/libcasper CFLAGS+=-I${.CURDIR}/../../lib/libnv CFLAGS+=-I${.CURDIR}/../../lib/libpjdlog .include Index: head/sbin/ccdconfig/Makefile =================================================================== --- head/sbin/ccdconfig/Makefile (revision 275029) +++ head/sbin/ccdconfig/Makefile (revision 275030) @@ -1,9 +1,8 @@ # $FreeBSD$ PROG= ccdconfig MAN= ccdconfig.8 -DPADD= ${LIBGEOM} -LDADD= -lgeom +LIBADD= geom .include Index: head/sbin/ddb/Makefile =================================================================== --- head/sbin/ddb/Makefile (revision 275029) +++ head/sbin/ddb/Makefile (revision 275030) @@ -1,11 +1,10 @@ # $FreeBSD$ PROG= ddb SRCS= ddb.c ddb_capture.c ddb_script.c MAN= ddb.8 WARNS?= 3 -DPADD= ${LIBKVM} -LDADD= -lkvm +LIBADD= kvm .include Index: head/sbin/devd/Makefile =================================================================== --- head/sbin/devd/Makefile (revision 275029) +++ head/sbin/devd/Makefile (revision 275030) @@ -1,25 +1,24 @@ # $FreeBSD$ .include PROG_CXX=devd SRCS= devd.cc token.l parse.y y.tab.h MAN= devd.8 devd.conf.5 WARNS?= 3 NO_SHARED?=YES -DPADD= ${LIBL} ${LIBUTIL} -LDADD= -ll -lutil +LIBADD= l util YFLAGS+=-v CFLAGS+=-I. -I${.CURDIR} CLEANFILES= y.output .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .include Index: head/sbin/dhclient/Makefile =================================================================== --- head/sbin/dhclient/Makefile (revision 275029) +++ head/sbin/dhclient/Makefile (revision 275030) @@ -1,53 +1,52 @@ # $OpenBSD: Makefile,v 1.9 2004/05/04 12:52:05 henning Exp $ # $FreeBSD$ # # Copyright (c) 1996, 1997 The Internet Software Consortium. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of The Internet Software Consortium nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE INTERNET SOFTWARE CONSORTIUM AND # CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL # THE INTERNET SOFTWARE CONSORTIUM OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # OF THE POSSIBILITY OF SUCH DAMAGE. # .include SRCS= dhclient.c clparse.c alloc.c dispatch.c hash.c bpf.c options.c \ tree.c conflex.c errwarn.c inet.c packet.c convert.c tables.c \ parse.c privsep.c 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 .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .include Index: head/sbin/dmesg/Makefile =================================================================== --- head/sbin/dmesg/Makefile (revision 275029) +++ head/sbin/dmesg/Makefile (revision 275030) @@ -1,10 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= dmesg MAN= dmesg.8 -LDADD= -lkvm -DPADD= ${LIBKVM} +LIBADD= kvm .include Index: head/sbin/dumpfs/Makefile =================================================================== --- head/sbin/dumpfs/Makefile (revision 275029) +++ head/sbin/dumpfs/Makefile (revision 275030) @@ -1,10 +1,9 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= dumpfs WARNS?= 2 -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= dumpfs.8 .include Index: head/sbin/fdisk/Makefile =================================================================== --- head/sbin/fdisk/Makefile (revision 275029) +++ head/sbin/fdisk/Makefile (revision 275030) @@ -1,16 +1,15 @@ # $FreeBSD$ PROG= fdisk SRCS= fdisk.c geom_mbr_enc.c WARNS?= 4 MAN= fdisk.8 .PATH: ${.CURDIR}/../../sys/geom -DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD+= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include test: ${PROG} sh ${.CURDIR}/runtest.sh Index: head/sbin/fdisk_pc98/Makefile =================================================================== --- head/sbin/fdisk_pc98/Makefile (revision 275029) +++ head/sbin/fdisk_pc98/Makefile (revision 275030) @@ -1,13 +1,12 @@ # $FreeBSD$ PROG= fdisk SRCS= fdisk.c geom_pc98_enc.c WARNS?= 4 MAN= fdisk.8 .PATH: ${.CURDIR}/../../sys/geom -DPADD+= ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD+= -lgeom -lbsdxml -lsbuf +LIBADD= geom .include Index: head/sbin/ffsinfo/Makefile =================================================================== --- head/sbin/ffsinfo/Makefile (revision 275029) +++ head/sbin/ffsinfo/Makefile (revision 275030) @@ -1,19 +1,18 @@ # @(#)Makefile 8.8 (Berkeley) 6/21/2000 # # $TSHeader: src/sbin/ffsinfo/Makefile,v 1.3 2000/12/05 19:45:10 tomsoft Exp $ # $FreeBSD$ # GROWFS= ${.CURDIR}/../growfs .PATH: ${GROWFS} PROG= ffsinfo SRCS= ffsinfo.c debug.c MAN= ffsinfo.8 WARNS?= 1 CFLAGS+=-DFS_DEBUG -I${GROWFS} -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs .include Index: head/sbin/fsck_ffs/Makefile =================================================================== --- head/sbin/fsck_ffs/Makefile (revision 275029) +++ head/sbin/fsck_ffs/Makefile (revision 275030) @@ -1,19 +1,18 @@ # $FreeBSD$ # @(#)Makefile 8.2 (Berkeley) 4/27/95 PROG= fsck_ffs LINKS+= ${BINDIR}/fsck_ffs ${BINDIR}/fsck_ufs LINKS+= ${BINDIR}/fsck_ffs ${BINDIR}/fsck_4.2bsd MAN= fsck_ffs.8 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 .PATH: ${.CURDIR}/../../sys/ufs/ffs ${.CURDIR}/../mount .include Index: head/sbin/fsck_ffs/dir.c =================================================================== --- head/sbin/fsck_ffs/dir.c (revision 275029) +++ head/sbin/fsck_ffs/dir.c (revision 275030) @@ -1,708 +1,709 @@ /* * Copyright (c) 1980, 1986, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if 0 #ifndef lint static const char sccsid[] = "@(#)dir.c 8.8 (Berkeley) 4/28/95"; #endif /* not lint */ #endif #include __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include #include #include #include #include "fsck.h" static struct dirtemplate emptydir = { 0, DIRBLKSIZ, DT_UNKNOWN, 0, "", 0, 0, DT_UNKNOWN, 0, "" }; static struct dirtemplate dirhead = { 0, 12, DT_DIR, 1, ".", 0, DIRBLKSIZ - 12, DT_DIR, 2, ".." }; static int chgino(struct inodesc *); static int dircheck(struct inodesc *, struct direct *); static int expanddir(union dinode *dp, char *name); static void freedir(ino_t ino, ino_t parent); static struct direct *fsck_readdir(struct inodesc *); static struct bufarea *getdirblk(ufs2_daddr_t blkno, long size); static int lftempname(char *bufp, ino_t ino); static int mkentry(struct inodesc *); /* * Propagate connected state through the tree. */ void propagate(void) { struct inoinfo **inpp, *inp; struct inoinfo **inpend; long change; inpend = &inpsort[inplast]; do { change = 0; for (inpp = inpsort; inpp < inpend; inpp++) { inp = *inpp; if (inp->i_parent == 0) continue; if (inoinfo(inp->i_parent)->ino_state == DFOUND && INO_IS_DUNFOUND(inp->i_number)) { inoinfo(inp->i_number)->ino_state = DFOUND; change++; } } } while (change > 0); } /* * Scan each entry in a directory block. */ int dirscan(struct inodesc *idesc) { struct direct *dp; struct bufarea *bp; u_int dsize, n; long blksiz; char dbuf[DIRBLKSIZ]; if (idesc->id_type != DATA) errx(EEXIT, "wrong type to dirscan %d", idesc->id_type); if (idesc->id_entryno == 0 && (idesc->id_filesize & (DIRBLKSIZ - 1)) != 0) idesc->id_filesize = roundup(idesc->id_filesize, DIRBLKSIZ); blksiz = idesc->id_numfrags * sblock.fs_fsize; if (chkrange(idesc->id_blkno, idesc->id_numfrags)) { idesc->id_filesize -= blksiz; return (SKIP); } idesc->id_loc = 0; for (dp = fsck_readdir(idesc); dp != NULL; dp = fsck_readdir(idesc)) { dsize = dp->d_reclen; if (dsize > sizeof(dbuf)) dsize = sizeof(dbuf); memmove(dbuf, dp, (size_t)dsize); idesc->id_dirp = (struct direct *)dbuf; if ((n = (*idesc->id_func)(idesc)) & ALTERED) { bp = getdirblk(idesc->id_blkno, blksiz); memmove(bp->b_un.b_buf + idesc->id_loc - dsize, dbuf, (size_t)dsize); dirty(bp); sbdirty(); rerun = 1; } if (n & STOP) return (n); } return (idesc->id_filesize > 0 ? KEEPON : STOP); } /* * get next entry in a directory. */ static struct direct * fsck_readdir(struct inodesc *idesc) { struct direct *dp, *ndp; struct bufarea *bp; long size, blksiz, fix, dploc; blksiz = idesc->id_numfrags * sblock.fs_fsize; bp = getdirblk(idesc->id_blkno, blksiz); if (idesc->id_loc % DIRBLKSIZ == 0 && idesc->id_filesize > 0 && idesc->id_loc < blksiz) { dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); if (dircheck(idesc, dp)) goto dpok; if (idesc->id_fix == IGNORE) return (0); fix = dofix(idesc, "DIRECTORY CORRUPTED"); bp = getdirblk(idesc->id_blkno, blksiz); dp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); dp->d_reclen = DIRBLKSIZ; dp->d_ino = 0; dp->d_type = 0; dp->d_namlen = 0; dp->d_name[0] = '\0'; if (fix) dirty(bp); idesc->id_loc += DIRBLKSIZ; idesc->id_filesize -= DIRBLKSIZ; return (dp); } dpok: if (idesc->id_filesize <= 0 || idesc->id_loc >= blksiz) return NULL; dploc = idesc->id_loc; dp = (struct direct *)(bp->b_un.b_buf + dploc); idesc->id_loc += dp->d_reclen; idesc->id_filesize -= dp->d_reclen; if ((idesc->id_loc % DIRBLKSIZ) == 0) return (dp); ndp = (struct direct *)(bp->b_un.b_buf + idesc->id_loc); if (idesc->id_loc < blksiz && idesc->id_filesize > 0 && dircheck(idesc, ndp) == 0) { size = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); idesc->id_loc += size; idesc->id_filesize -= size; if (idesc->id_fix == IGNORE) return (0); fix = dofix(idesc, "DIRECTORY CORRUPTED"); bp = getdirblk(idesc->id_blkno, blksiz); dp = (struct direct *)(bp->b_un.b_buf + dploc); dp->d_reclen += size; if (fix) dirty(bp); } return (dp); } /* * Verify that a directory entry is valid. * This is a superset of the checks made in the kernel. */ static int dircheck(struct inodesc *idesc, struct direct *dp) { size_t size; char *cp; u_char type; u_int8_t namlen; int spaceleft; spaceleft = DIRBLKSIZ - (idesc->id_loc % DIRBLKSIZ); if (dp->d_reclen == 0 || dp->d_reclen > spaceleft || (dp->d_reclen & 0x3) != 0) goto bad; if (dp->d_ino == 0) return (1); size = DIRSIZ(0, dp); namlen = dp->d_namlen; type = dp->d_type; if (dp->d_reclen < size || idesc->id_filesize < size || namlen == 0 || type > 15) goto bad; for (cp = dp->d_name, size = 0; size < namlen; size++) if (*cp == '\0' || (*cp++ == '/')) goto bad; if (*cp != '\0') goto bad; return (1); bad: if (debug) printf("Bad dir: ino %d reclen %d namlen %d type %d name %s\n", dp->d_ino, dp->d_reclen, dp->d_namlen, dp->d_type, dp->d_name); return (0); } void direrror(ino_t ino, const char *errmesg) { fileerror(ino, ino, errmesg); } void fileerror(ino_t cwd, ino_t ino, const char *errmesg) { union dinode *dp; char pathbuf[MAXPATHLEN + 1]; pwarn("%s ", errmesg); pinode(ino); printf("\n"); getpathname(pathbuf, cwd, ino); if (ino < ROOTINO || ino > maxino) { pfatal("NAME=%s\n", pathbuf); return; } dp = ginode(ino); if (ftypeok(dp)) pfatal("%s=%s\n", (DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE", pathbuf); else pfatal("NAME=%s\n", pathbuf); } void adjust(struct inodesc *idesc, int lcnt) { union dinode *dp; int saveresolved; dp = ginode(idesc->id_number); if (DIP(dp, di_nlink) == lcnt) { /* * If we have not hit any unresolved problems, are running * in preen mode, and are on a file system using soft updates, * then just toss any partially allocated files. */ if (resolved && (preen || bkgrdflag) && usedsoftdep) { clri(idesc, "UNREF", 1); return; } else { /* * The file system can be marked clean even if * a file is not linked up, but is cleared. * Hence, resolved should not be cleared when * linkup is answered no, but clri is answered yes. */ saveresolved = resolved; if (linkup(idesc->id_number, (ino_t)0, NULL) == 0) { resolved = saveresolved; clri(idesc, "UNREF", 0); return; } /* * Account for the new reference created by linkup(). */ dp = ginode(idesc->id_number); lcnt--; } } if (lcnt != 0) { pwarn("LINK COUNT %s", (lfdir == idesc->id_number) ? lfname : ((DIP(dp, di_mode) & IFMT) == IFDIR ? "DIR" : "FILE")); pinode(idesc->id_number); printf(" COUNT %d SHOULD BE %d", DIP(dp, di_nlink), DIP(dp, di_nlink) - lcnt); if (preen || usedsoftdep) { if (lcnt < 0) { printf("\n"); pfatal("LINK COUNT INCREASING"); } if (preen) printf(" (ADJUSTED)\n"); } if (preen || reply("ADJUST") == 1) { if (bkgrdflag == 0) { DIP_SET(dp, di_nlink, DIP(dp, di_nlink) - lcnt); inodirty(); } else { cmd.value = idesc->id_number; cmd.size = -lcnt; if (debug) printf("adjrefcnt ino %ld amt %lld\n", (long)cmd.value, (long long)cmd.size); if (sysctl(adjrefcnt, MIBSIZE, 0, 0, &cmd, sizeof cmd) == -1) rwerror("ADJUST INODE", cmd.value); } } } } static int mkentry(struct inodesc *idesc) { struct direct *dirp = idesc->id_dirp; struct direct newent; int newlen, oldlen; newent.d_namlen = strlen(idesc->id_name); newlen = DIRSIZ(0, &newent); if (dirp->d_ino != 0) oldlen = DIRSIZ(0, dirp); else oldlen = 0; if (dirp->d_reclen - oldlen < newlen) return (KEEPON); newent.d_reclen = dirp->d_reclen - oldlen; dirp->d_reclen = oldlen; dirp = (struct direct *)(((char *)dirp) + oldlen); dirp->d_ino = idesc->id_parent; /* ino to be entered is in id_parent */ dirp->d_reclen = newent.d_reclen; dirp->d_type = inoinfo(idesc->id_parent)->ino_type; dirp->d_namlen = newent.d_namlen; memmove(dirp->d_name, idesc->id_name, (size_t)newent.d_namlen + 1); return (ALTERED|STOP); } static int chgino(struct inodesc *idesc) { struct direct *dirp = idesc->id_dirp; if (memcmp(dirp->d_name, idesc->id_name, (int)dirp->d_namlen + 1)) return (KEEPON); dirp->d_ino = idesc->id_parent; dirp->d_type = inoinfo(idesc->id_parent)->ino_type; return (ALTERED|STOP); } int linkup(ino_t orphan, ino_t parentdir, char *name) { union dinode *dp; int lostdir; ino_t oldlfdir; struct inodesc idesc; char tempname[BUFSIZ]; memset(&idesc, 0, sizeof(struct inodesc)); dp = ginode(orphan); lostdir = (DIP(dp, di_mode) & IFMT) == IFDIR; pwarn("UNREF %s ", lostdir ? "DIR" : "FILE"); pinode(orphan); if (preen && DIP(dp, di_size) == 0) return (0); if (cursnapshot != 0) { pfatal("FILE LINKUP IN SNAPSHOT"); return (0); } if (preen) printf(" (RECONNECTED)\n"); else if (reply("RECONNECT") == 0) return (0); if (lfdir == 0) { dp = ginode(ROOTINO); idesc.id_name = strdup(lfname); idesc.id_type = DATA; idesc.id_func = findino; idesc.id_number = ROOTINO; if ((ckinode(dp, &idesc) & FOUND) != 0) { lfdir = idesc.id_parent; } else { pwarn("NO lost+found DIRECTORY"); if (preen || reply("CREATE")) { lfdir = allocdir(ROOTINO, (ino_t)0, lfmode); if (lfdir != 0) { if (makeentry(ROOTINO, lfdir, lfname) != 0) { numdirs++; if (preen) printf(" (CREATED)\n"); } else { freedir(lfdir, ROOTINO); lfdir = 0; if (preen) printf("\n"); } } } } if (lfdir == 0) { pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY"); printf("\n\n"); return (0); } } dp = ginode(lfdir); if ((DIP(dp, di_mode) & IFMT) != IFDIR) { pfatal("lost+found IS NOT A DIRECTORY"); if (reply("REALLOCATE") == 0) return (0); oldlfdir = lfdir; if ((lfdir = allocdir(ROOTINO, (ino_t)0, lfmode)) == 0) { pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY\n\n"); return (0); } if ((changeino(ROOTINO, lfname, lfdir) & ALTERED) == 0) { pfatal("SORRY. CANNOT CREATE lost+found DIRECTORY\n\n"); return (0); } inodirty(); idesc.id_type = ADDR; idesc.id_func = pass4check; idesc.id_number = oldlfdir; adjust(&idesc, inoinfo(oldlfdir)->ino_linkcnt + 1); inoinfo(oldlfdir)->ino_linkcnt = 0; dp = ginode(lfdir); } if (inoinfo(lfdir)->ino_state != DFOUND) { pfatal("SORRY. NO lost+found DIRECTORY\n\n"); return (0); } (void)lftempname(tempname, orphan); if (makeentry(lfdir, orphan, (name ? name : tempname)) == 0) { pfatal("SORRY. NO SPACE IN lost+found DIRECTORY"); printf("\n\n"); return (0); } inoinfo(orphan)->ino_linkcnt--; if (lostdir) { if ((changeino(orphan, "..", lfdir) & ALTERED) == 0 && parentdir != (ino_t)-1) (void)makeentry(orphan, lfdir, ".."); dp = ginode(lfdir); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) + 1); inodirty(); inoinfo(lfdir)->ino_linkcnt++; pwarn("DIR I=%lu CONNECTED. ", (u_long)orphan); if (parentdir != (ino_t)-1) { printf("PARENT WAS I=%lu\n", (u_long)parentdir); /* * The parent directory, because of the ordering * guarantees, has had the link count incremented * for the child, but no entry was made. This * fixes the parent link count so that fsck does * not need to be rerun. */ inoinfo(parentdir)->ino_linkcnt++; } if (preen == 0) printf("\n"); } return (1); } /* * fix an entry in a directory. */ int changeino(ino_t dir, const char *name, ino_t newnum) { struct inodesc idesc; memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = DATA; idesc.id_func = chgino; idesc.id_number = dir; idesc.id_fix = DONTKNOW; idesc.id_name = strdup(name); idesc.id_parent = newnum; /* new value for name */ return (ckinode(ginode(dir), &idesc)); } /* * make an entry in a directory */ int makeentry(ino_t parent, ino_t ino, const char *name) { union dinode *dp; struct inodesc idesc; char pathbuf[MAXPATHLEN + 1]; if (parent < ROOTINO || parent >= maxino || ino < ROOTINO || ino >= maxino) return (0); memset(&idesc, 0, sizeof(struct inodesc)); idesc.id_type = DATA; idesc.id_func = mkentry; idesc.id_number = parent; idesc.id_parent = ino; /* this is the inode to enter */ idesc.id_fix = DONTKNOW; idesc.id_name = strdup(name); dp = ginode(parent); if (DIP(dp, di_size) % DIRBLKSIZ) { DIP_SET(dp, di_size, roundup(DIP(dp, di_size), DIRBLKSIZ)); inodirty(); } if ((ckinode(dp, &idesc) & ALTERED) != 0) return (1); getpathname(pathbuf, parent, parent); dp = ginode(parent); if (expanddir(dp, pathbuf) == 0) return (0); return (ckinode(dp, &idesc) & ALTERED); } /* * Attempt to expand the size of a directory */ static int expanddir(union dinode *dp, char *name) { ufs2_daddr_t lastbn, newblk; struct bufarea *bp; char *cp, firstblk[DIRBLKSIZ]; lastbn = lblkno(&sblock, DIP(dp, di_size)); if (lastbn >= NDADDR - 1 || DIP(dp, di_db[lastbn]) == 0 || DIP(dp, di_size) == 0) return (0); if ((newblk = allocblk(sblock.fs_frag)) == 0) return (0); DIP_SET(dp, di_db[lastbn + 1], DIP(dp, di_db[lastbn])); DIP_SET(dp, di_db[lastbn], newblk); DIP_SET(dp, di_size, DIP(dp, di_size) + sblock.fs_bsize); DIP_SET(dp, di_blocks, DIP(dp, di_blocks) + btodb(sblock.fs_bsize)); bp = getdirblk(DIP(dp, di_db[lastbn + 1]), sblksize(&sblock, DIP(dp, di_size), lastbn + 1)); if (bp->b_errs) goto bad; memmove(firstblk, bp->b_un.b_buf, DIRBLKSIZ); bp = getdirblk(newblk, sblock.fs_bsize); if (bp->b_errs) goto bad; memmove(bp->b_un.b_buf, firstblk, DIRBLKSIZ); for (cp = &bp->b_un.b_buf[DIRBLKSIZ]; cp < &bp->b_un.b_buf[sblock.fs_bsize]; cp += DIRBLKSIZ) memmove(cp, &emptydir, sizeof emptydir); dirty(bp); bp = getdirblk(DIP(dp, di_db[lastbn + 1]), sblksize(&sblock, DIP(dp, di_size), lastbn + 1)); if (bp->b_errs) goto bad; memmove(bp->b_un.b_buf, &emptydir, sizeof emptydir); pwarn("NO SPACE LEFT IN %s", name); if (preen) printf(" (EXPANDED)\n"); else if (reply("EXPAND") == 0) goto bad; dirty(bp); inodirty(); return (1); bad: DIP_SET(dp, di_db[lastbn], DIP(dp, di_db[lastbn + 1])); DIP_SET(dp, di_db[lastbn + 1], 0); DIP_SET(dp, di_size, DIP(dp, di_size) - sblock.fs_bsize); DIP_SET(dp, di_blocks, DIP(dp, di_blocks) - btodb(sblock.fs_bsize)); freeblk(newblk, sblock.fs_frag); return (0); } /* * allocate a new directory */ ino_t allocdir(ino_t parent, ino_t request, int mode) { ino_t ino; char *cp; union dinode *dp; struct bufarea *bp; struct inoinfo *inp; struct dirtemplate *dirp; ino = allocino(request, IFDIR|mode); dirp = &dirhead; dirp->dot_ino = ino; dirp->dotdot_ino = parent; dp = ginode(ino); bp = getdirblk(DIP(dp, di_db[0]), sblock.fs_fsize); if (bp->b_errs) { freeino(ino); return (0); } memmove(bp->b_un.b_buf, dirp, sizeof(struct dirtemplate)); for (cp = &bp->b_un.b_buf[DIRBLKSIZ]; cp < &bp->b_un.b_buf[sblock.fs_fsize]; cp += DIRBLKSIZ) memmove(cp, &emptydir, sizeof emptydir); dirty(bp); DIP_SET(dp, di_nlink, 2); inodirty(); if (ino == ROOTINO) { inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink); cacheino(dp, ino); return(ino); } if (!INO_IS_DVALID(parent)) { freeino(ino); return (0); } cacheino(dp, ino); inp = getinoinfo(ino); inp->i_parent = parent; inp->i_dotdot = parent; inoinfo(ino)->ino_state = inoinfo(parent)->ino_state; if (inoinfo(ino)->ino_state == DSTATE) { inoinfo(ino)->ino_linkcnt = DIP(dp, di_nlink); inoinfo(parent)->ino_linkcnt++; } dp = ginode(parent); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) + 1); inodirty(); return (ino); } /* * free a directory inode */ static void freedir(ino_t ino, ino_t parent) { union dinode *dp; if (ino != parent) { dp = ginode(parent); DIP_SET(dp, di_nlink, DIP(dp, di_nlink) - 1); inodirty(); } freeino(ino); } /* * generate a temporary name for the lost+found directory. */ static int lftempname(char *bufp, ino_t ino) { ino_t in; char *cp; int namlen; cp = bufp + 2; for (in = maxino; in > 0; in /= 10) cp++; *--cp = 0; namlen = cp - bufp; in = ino; while (cp > bufp) { *--cp = (in % 10) + '0'; in /= 10; } *cp = '#'; return (namlen); } /* * Get a directory block. * Insure that it is held until another is requested. */ static struct bufarea * getdirblk(ufs2_daddr_t blkno, long size) { if (pdirbp != 0) pdirbp->b_flags &= ~B_INUSE; pdirbp = getdatablk(blkno, size, BT_DIRDATA); return (pdirbp); } Index: head/sbin/fsdb/Makefile =================================================================== --- head/sbin/fsdb/Makefile (revision 275029) +++ head/sbin/fsdb/Makefile (revision 275030) @@ -1,16 +1,15 @@ # $NetBSD: Makefile,v 1.1.1.1 1995/10/08 23:08:36 thorpej Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= fsdb MAN= fsdb.8 SRCS= fsdb.c fsdbutil.c \ dir.c ea.c fsutil.c inode.c pass1.c pass1b.c pass2.c pass3.c pass4.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 Index: head/sbin/gbde/Makefile =================================================================== --- head/sbin/gbde/Makefile (revision 275029) +++ head/sbin/gbde/Makefile (revision 275030) @@ -1,33 +1,32 @@ # $FreeBSD$ PROG= gbde SRCS= gbde.c template.c SRCS+= rijndael-alg-fst.c SRCS+= rijndael-api-fst.c SRCS+= sha2.c SRCS+= g_bde_lock.c # rijndael-fst.c does evil casting things which can results in warnings, # the test-vectors check out however, so it works right. NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= CFLAGS+= -I${.CURDIR}/../../sys .PATH: ${.CURDIR}/../../sys/geom/bde \ ${.CURDIR}/../../sys/crypto/rijndael \ ${.CURDIR}/../../sys/crypto/sha2 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};' \ < ${.CURDIR}/template.txt > template.c test: ${PROG} sh ${.CURDIR}/test.sh ${.CURDIR} .include Index: head/sbin/geom/Makefile =================================================================== --- head/sbin/geom/Makefile (revision 275029) +++ head/sbin/geom/Makefile (revision 275030) @@ -1,28 +1,27 @@ # $FreeBSD$ .if defined(RESCUE) || defined(RELEASE_CRUNCH) .PATH: ${.CURDIR}/class/part \ ${.CURDIR}/class/label \ ${.CURDIR}/core \ ${.CURDIR}/misc PROG= geom SRCS= geom.c geom_label.c geom_part.c subr.c 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 .else SUBDIR= core class .include .endif Index: head/sbin/geom/class/eli/Makefile =================================================================== --- head/sbin/geom/class/eli/Makefile (revision 275029) +++ head/sbin/geom/class/eli/Makefile (revision 275030) @@ -1,18 +1,17 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc ${.CURDIR}/../../../../sys/geom/eli ${.CURDIR}/../../../../sys/crypto/sha2 GEOM_CLASS= eli SRCS= g_eli_crypto.c SRCS+= g_eli_key.c SRCS+= pkcs5v2.c SRCS+= sha2.c -DPADD= ${LIBMD} ${LIBCRYPTO} -LDADD= -lmd -lcrypto +LIBADD= md crypto WARNS?= 3 CFLAGS+=-I${.CURDIR}/../../../../sys .include Index: head/sbin/geom/class/journal/Makefile =================================================================== --- head/sbin/geom/class/journal/Makefile (revision 275029) +++ head/sbin/geom/class/journal/Makefile (revision 275030) @@ -1,13 +1,12 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc GEOM_CLASS= journal SRCS+= geom_journal_ufs.c -DPADD= ${LIBMD} ${LIBUFS} -LDADD= -lmd -lufs +LIBADD= ufs md CFLAGS+=-I${.CURDIR}/../../../../sys .include Index: head/sbin/geom/class/mirror/Makefile =================================================================== --- head/sbin/geom/class/mirror/Makefile (revision 275029) +++ head/sbin/geom/class/mirror/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc GEOM_CLASS= mirror -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Index: head/sbin/geom/class/part/Makefile =================================================================== --- head/sbin/geom/class/part/Makefile (revision 275029) +++ head/sbin/geom/class/part/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc GEOM_CLASS= part -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Index: head/sbin/geom/class/raid/Makefile =================================================================== --- head/sbin/geom/class/raid/Makefile (revision 275029) +++ head/sbin/geom/class/raid/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc GEOM_CLASS= raid -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Index: head/sbin/geom/class/raid3/Makefile =================================================================== --- head/sbin/geom/class/raid3/Makefile (revision 275029) +++ head/sbin/geom/class/raid3/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../misc GEOM_CLASS= raid3 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Index: head/sbin/geom/core/Makefile =================================================================== --- head/sbin/geom/core/Makefile (revision 275029) +++ head/sbin/geom/core/Makefile (revision 275030) @@ -1,17 +1,16 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../misc PROG= geom MAN= geom.8 SRCS= geom.c subr.c 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 Index: head/sbin/ggate/ggatec/Makefile =================================================================== --- head/sbin/ggate/ggatec/Makefile (revision 275029) +++ head/sbin/ggate/ggatec/Makefile (revision 275030) @@ -1,16 +1,15 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../shared PROG= ggatec MAN= ggatec.8 SRCS= ggatec.c ggate.c 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 Index: head/sbin/ggate/ggated/Makefile =================================================================== --- head/sbin/ggate/ggated/Makefile (revision 275029) +++ head/sbin/ggate/ggated/Makefile (revision 275030) @@ -1,14 +1,13 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../shared PROG= ggated MAN= ggated.8 SRCS= ggated.c ggate.c -DPADD= ${LIBPTHREAD} -LDADD= -lpthread +LIBADD= pthread CFLAGS+= -I${.CURDIR}/../shared .include Index: head/sbin/ggate/ggatel/Makefile =================================================================== --- head/sbin/ggate/ggatel/Makefile (revision 275029) +++ head/sbin/ggate/ggatel/Makefile (revision 275030) @@ -1,15 +1,14 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../shared PROG= ggatel MAN= ggatel.8 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 Index: head/sbin/growfs/Makefile =================================================================== --- head/sbin/growfs/Makefile (revision 275029) +++ head/sbin/growfs/Makefile (revision 275030) @@ -1,29 +1,28 @@ # @(#)Makefile 8.8 (Berkeley) 6/21/2000 # # $TSHeader: src/sbin/growfs/Makefile,v 1.4 2000/12/05 19:45:24 tomsoft Exp $ # $FreeBSD$ # #GFSDBG= .include .PATH: ${.CURDIR}/../mount PROG= growfs SRCS= growfs.c getmntopts.c MAN= growfs.8 CFLAGS+=-I${.CURDIR}/../mount .if defined(GFSDBG) SRCS+= debug.c .endif -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .if ${MK_TESTS} != "no" SUBDIR+= tests .endif -.include +.include Index: head/sbin/gvinum/Makefile =================================================================== --- head/sbin/gvinum/Makefile (revision 275029) +++ head/sbin/gvinum/Makefile (revision 275030) @@ -1,15 +1,14 @@ # $FreeBSD$ PROG= gvinum SRCS= gvinum.c gvinum.h geom_vinum_share.c 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 .include Index: head/sbin/hastctl/Makefile =================================================================== --- head/sbin/hastctl/Makefile (revision 275029) +++ head/sbin/hastctl/Makefile (revision 275030) @@ -1,47 +1,45 @@ # $FreeBSD$ .include .PATH: ${.CURDIR}/../hastd PROG= hastctl SRCS= activemap.c SRCS+= crc32.c SRCS+= ebuf.c SRCS+= hast_checksum.c hast_compression.c hast_proto.c hastctl.c SRCS+= lzf.c SRCS+= metadata.c SRCS+= nv.c SRCS+= parse.y pjdlog.c SRCS+= proto.c proto_common.c proto_uds.c SRCS+= token.l SRCS+= subr.c SRCS+= y.tab.h MAN= hastctl.8 NO_WFORMAT= NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= CFLAGS+=-I${.CURDIR}/../hastd CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" CFLAGS+=-DINET6 .endif # This is needed to have WARNS > 1. 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 YFLAGS+=-v CLEANFILES=y.tab.c y.tab.h y.output .include Index: head/sbin/hastd/Makefile =================================================================== --- head/sbin/hastd/Makefile (revision 275029) +++ head/sbin/hastd/Makefile (revision 275030) @@ -1,45 +1,43 @@ # $FreeBSD$ .include PROG= hastd SRCS= activemap.c SRCS+= control.c crc32.c SRCS+= ebuf.c event.c SRCS+= hast_checksum.c hast_compression.c hast_proto.c hastd.c hooks.c SRCS+= lzf.c SRCS+= metadata.c SRCS+= nv.c SRCS+= secondary.c SRCS+= parse.y pjdlog.c primary.c SRCS+= proto.c proto_common.c proto_socketpair.c proto_tcp.c proto_uds.c SRCS+= rangelock.c SRCS+= subr.c SRCS+= token.l SRCS+= y.tab.h MAN= hastd.8 hast.conf.5 NO_WFORMAT= NO_WCAST_ALIGN= NO_WMISSING_VARIABLE_DECLARATIONS= CFLAGS+=-I${.CURDIR} CFLAGS+=-DHAVE_CAPSICUM CFLAGS+=-DPROTO_TCP_DEFAULT_PORT=8457 CFLAGS+=-DINET .if ${MK_INET6_SUPPORT} != "no" 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 YFLAGS+=-v CLEANFILES=y.tab.c y.tab.h y.output .include Index: head/sbin/ifconfig/Makefile =================================================================== --- head/sbin/ifconfig/Makefile (revision 275029) +++ head/sbin/ifconfig/Makefile (revision 275030) @@ -1,71 +1,68 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ .include PROG= ifconfig SRCS= ifconfig.c # base support # # NB: The order here defines the order in which the constructors # are called. This in turn defines the default order in which # status is displayed. Probably should add a priority mechanism # to the registration process so we don't depend on this aspect # of the toolchain. # SRCS+= af_link.c # LLC support .if ${MK_INET_SUPPORT} != "no" SRCS+= af_inet.c # IPv4 support .endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= af_inet6.c # IPv6 support .endif .if ${MK_INET6_SUPPORT} != "no" SRCS+= af_nd6.c # ND6 support .endif SRCS+= ifclone.c # clone device support SRCS+= ifmac.c # MAC support SRCS+= ifmedia.c # SIOC[GS]IFMEDIA support SRCS+= iffib.c # non-default FIB support SRCS+= ifvlan.c # SIOC[GS]ETVLAN support SRCS+= ifvxlan.c # VXLAN support 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 # ... .if ${MK_PF} != "no" SRCS+= ifpfsync.c # pfsync(4) support .endif SRCS+= ifbridge.c # bridge support SRCS+= iflagg.c # lagg support .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif .if ${MK_INET_SUPPORT} != "no" CFLAGS+= -DINET .endif .if ${MK_JAIL} != "no" && !defined(RELEASE_CRUNCH) && !defined(RESCUE) CFLAGS+= -DJAIL -DPADD+= ${LIBJAIL} -LDADD+= -ljail +LIBADD+= jail .endif MAN= ifconfig.8 CFLAGS+= -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs WARNS?= 2 .include Index: head/sbin/init/Makefile =================================================================== --- head/sbin/init/Makefile (revision 275029) +++ head/sbin/init/Makefile (revision 275030) @@ -1,14 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 7/19/93 # $FreeBSD$ PROG= init 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 .include Index: head/sbin/ipf/Makefile.inc =================================================================== --- head/sbin/ipf/Makefile.inc (revision 275029) +++ head/sbin/ipf/Makefile.inc (revision 275030) @@ -1,32 +1,30 @@ # $FreeBSD$ .include WARNS?= 2 NO_WFORMAT= NO_WARRAY_BOUNDS= CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter CFLAGS+= -I${.CURDIR}/../../../contrib/ipfilter/tools CFLAGS+= -I${.CURDIR}/../../../sys CFLAGS+= -I${.CURDIR}/../../../sys/contrib/ipfilter CFLAGS+= -DSTATETOP -D__UIO_EXPOSE .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DUSE_INET6 .else CFLAGS+= -DNOINET6 .endif -LIBIPF= ${.OBJDIR}/../libipf/libipf.a -DPADD+= ${LIBIPF} ${LIBKVM} -LDADD+= ${LIBIPF} -lkvm +LIBADD+= ipf CLEANFILES+= y.tab.c y.tab.h .PATH: ${.CURDIR}/../../../contrib/ipfilter \ ${.CURDIR}/../../../contrib/ipfilter/lib \ ${.CURDIR}/../../../contrib/ipfilter/tools \ ${.CURDIR}/../../../contrib/ipfilter/man .include "../Makefile.inc" Index: head/sbin/ipf/ipf/Makefile =================================================================== --- head/sbin/ipf/ipf/Makefile (revision 275029) +++ head/sbin/ipf/ipf/Makefile (revision 275030) @@ -1,42 +1,41 @@ # $FreeBSD$ PROG= ipf SRCS= ${GENHDRS} ipf.c ipfcomp.c ipf_y.c ipf_l.c bpf_filter.c MAN= ipfilter.4 ipfilter.5 ipf.8 ipf.4 ipf.5 ipl.4 MLINKS= ipf.5 ipf.conf.5 ipf.5 ipf6.conf.5 CFLAGS+= -I. -DIPFILTER_BPF -DHAS_SYS_MD5_H GENHDRS= ipf_l.h ipf_y.h DPSRCS+= ${GENHDRS} CLEANFILES+= ${GENHDRS} ipf_y.c ipf_l.c ipf_y.c: ipf_y.y ${YACC} -d ${.ALLSRC} sed -e 's/yy/ipf_yy/g' \ -e 's/"ipf_y.y"/"..\/tools\/ipf_y.y"/' \ y.tab.c > ${.TARGET} sed -e 's/yy/ipf_yy/g' \ y.tab.h > ${.TARGET:.c=.h} ipf_y.h: ipf_y.c ipf_l.c: lexer.c sed -e 's/yy/ipf_yy/g' \ -e 's/y.tab.h/ipf_y.h/' \ -e 's/lexer.h/ipf_l.h/' \ ${.ALLSRC} > ${.TARGET} ipf_l.h: lexer.h sed -e 's/yy/ipf_yy/g' \ ${.ALLSRC} > ${.TARGET} .if defined(RESCUE) LIBIPF_SRCS!= cd ${.CURDIR}/../libipf && ${MAKE} -V SRCS SRCS+= ${LIBIPF_SRCS} .else -DPADD+= ${LIBPCAP} -LDADD+= -lpcap +LIBADD+= pcap .endif .include Index: head/sbin/ipf/ipfstat/Makefile =================================================================== --- head/sbin/ipf/ipfstat/Makefile (revision 275029) +++ head/sbin/ipf/ipfstat/Makefile (revision 275030) @@ -1,11 +1,10 @@ # $FreeBSD$ NOGCCERROR= # defined PROG= ipfstat SRCS= ipfstat.c MAN= ipfstat.8 -DPADD+= ${LIBCURSES} -LDADD+= -lcurses +LIBADD+= ncursesw .include Index: head/sbin/ipf/ipsend/Makefile =================================================================== --- head/sbin/ipf/ipsend/Makefile (revision 275029) +++ head/sbin/ipf/ipsend/Makefile (revision 275030) @@ -1,39 +1,38 @@ # $FreeBSD$ NOGCCERROR= # defined .include 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 CFLAGS+= -I. CLEANFILES+= iplang_y.c iplang_y.h DPSRCS+= iplang_y.h .PATH: ${NETBSDSRCDIR}/dist/ipf/ipsend \ ${NETBSDSRCDIR}/dist/ipf/iplang iplang_y.c: iplang_y.y ${YACC} -d ${.ALLSRC} mv y.tab.c ${.TARGET} mv y.tab.h ${.TARGET:.c=.h} iplang_y.h: iplang_y.c # XXX # We have a problem with make and linking ipsend # cc -o /home/source/src/usr.sbin/ipf/ipsend/../../../dist/ipf/ipsend ..... # isn't correct. # Use .NOPATH as an workaround for that problem .NOPATH: ipsend .include Index: head/sbin/ipfw/Makefile =================================================================== --- head/sbin/ipfw/Makefile (revision 275029) +++ head/sbin/ipfw/Makefile (revision 275030) @@ -1,18 +1,17 @@ # $FreeBSD$ .include PROG= ipfw SRCS= ipfw2.c dummynet.c ipv6.c main.c nat.c tables.c WARNS?= 2 .if ${MK_PF} != "no" SRCS+= altq.c CFLAGS+=-DPF .endif -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util MAN= ipfw.8 .include Index: head/sbin/iscontrol/Makefile =================================================================== --- head/sbin/iscontrol/Makefile (revision 275029) +++ head/sbin/iscontrol/Makefile (revision 275030) @@ -1,14 +1,13 @@ # $FreeBSD$ 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 CFLAGS+= -I$S MAN= iscsi.conf.5 iscontrol.8 .include Index: head/sbin/md5/Makefile =================================================================== --- head/sbin/md5/Makefile (revision 275029) +++ head/sbin/md5/Makefile (revision 275030) @@ -1,22 +1,21 @@ # @(#)Makefile 8.1 (Berkeley) 6/9/93 # $FreeBSD$ PROG= md5 LINKS= ${BINDIR}/md5 ${BINDIR}/rmd160 \ ${BINDIR}/md5 ${BINDIR}/sha1 \ ${BINDIR}/md5 ${BINDIR}/sha256 \ ${BINDIR}/md5 ${BINDIR}/sha512 MLINKS= md5.1 rmd160.1 \ md5.1 sha1.1 \ md5.1 sha256.1 \ md5.1 sha512.1 NO_WMISSING_VARIABLE_DECLARATIONS= WFORMAT?= 1 -DPADD= ${LIBMD} -LDADD= -lmd +LIBADD= md .include Index: head/sbin/mdconfig/Makefile =================================================================== --- head/sbin/mdconfig/Makefile (revision 275029) +++ head/sbin/mdconfig/Makefile (revision 275030) @@ -1,15 +1,14 @@ # $FreeBSD$ .include PROG= mdconfig MAN= mdconfig.8 -DPADD= ${LIBUTIL} ${LIBGEOM} ${LIBBSDXML} ${LIBSBUF} -LDADD= -lutil -lgeom -lbsdxml -lsbuf +LIBADD= util geom .if ${MK_TESTS} != "no" SUBDIR+= tests .endif .include Index: head/sbin/mount/Makefile =================================================================== --- head/sbin/mount/Makefile (revision 275029) +++ head/sbin/mount/Makefile (revision 275030) @@ -1,12 +1,11 @@ # @(#)Makefile 8.6 (Berkeley) 5/8/95 # $FreeBSD$ PROG= mount 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 Index: head/sbin/mount_cd9660/Makefile =================================================================== --- head/sbin/mount_cd9660/Makefile (revision 275029) +++ head/sbin/mount_cd9660/Makefile (revision 275030) @@ -1,19 +1,18 @@ # @(#)Makefile 8.3 (Berkeley) 3/27/94 # $FreeBSD$ 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} # Needs to be dynamically linked for optional dlopen() access to # userland libiconv NO_SHARED?= NO .PATH: ${MOUNT} .include Index: head/sbin/mount_msdosfs/Makefile =================================================================== --- head/sbin/mount_msdosfs/Makefile (revision 275029) +++ head/sbin/mount_msdosfs/Makefile (revision 275030) @@ -1,20 +1,19 @@ # # $FreeBSD$ # 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} # Needs to be dynamically linked for optional dlopen() access to # userland libiconv NO_SHARED?= NO .PATH: ${MOUNT} .include Index: head/sbin/mount_udf/Makefile =================================================================== --- head/sbin/mount_udf/Makefile (revision 275029) +++ head/sbin/mount_udf/Makefile (revision 275030) @@ -1,17 +1,16 @@ # $FreeBSD$ 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 .PATH: ${MOUNT} # Needs to be dynamically linked for optional dlopen() access to # userland libiconv NO_SHARED?= NO .include Index: head/sbin/nandfs/Makefile =================================================================== --- head/sbin/nandfs/Makefile (revision 275029) +++ head/sbin/nandfs/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ PROG= nandfs SRCS= nandfs.c lssnap.c mksnap.c rmsnap.c MAN= nandfs.8 -DPADD= ${LIBNANDFS} -LDADD= -lnandfs +LIBADD= nandfs .include Index: head/sbin/natd/Makefile =================================================================== --- head/sbin/natd/Makefile (revision 275029) +++ head/sbin/natd/Makefile (revision 275030) @@ -1,10 +1,9 @@ # $FreeBSD$ PROG = natd SRCS = natd.c icmp.c WARNS?= 3 -LDADD = -lalias -DPADD = ${LIBALIAS} +LIBADD = alias MAN = natd.8 .include Index: head/sbin/newfs/Makefile =================================================================== --- head/sbin/newfs/Makefile (revision 275029) +++ head/sbin/newfs/Makefile (revision 275030) @@ -1,20 +1,19 @@ # @(#)Makefile 8.2 (Berkeley) 3/27/94 # $FreeBSD$ .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 MAN= newfs.8 .include test: ${PROG} sh ${.CURDIR}/runtest01.sh sh ${.CURDIR}/runtest00.sh | tee _.test diff --ignore-matching-lines=FreeBSD _.test ${.CURDIR}/ref.test echo All Tests Passed Index: head/sbin/newfs_nandfs/Makefile =================================================================== --- head/sbin/newfs_nandfs/Makefile (revision 275029) +++ head/sbin/newfs_nandfs/Makefile (revision 275030) @@ -1,9 +1,8 @@ # $FreeBSD$ PROG= newfs_nandfs MAN= newfs_nandfs.8 -LDADD+= -lgeom -DPADD+= ${LIBGEOM} +LIBADD= geom .include Index: head/sbin/pfctl/Makefile =================================================================== --- head/sbin/pfctl/Makefile (revision 275029) +++ head/sbin/pfctl/Makefile (revision 275030) @@ -1,34 +1,33 @@ # $FreeBSD$ .include # pf_ruleset.c is shared between kernel and pfctl .PATH: ${.CURDIR}/../../sys/netpfil/pf PROG= pfctl MAN= pfctl.8 SRCS = pfctl.c parse.y pfctl_parser.c pf_print_state.c pfctl_altq.c SRCS+= pfctl_osfp.c pfctl_radix.c pfctl_table.c pfctl_qstats.c SRCS+= pfctl_optimize.c SRCS+= pf_ruleset.c WARNS?= 2 CFLAGS+= -Wall -Wmissing-prototypes -Wno-uninitialized CFLAGS+= -Wstrict-prototypes CFLAGS+= -DENABLE_ALTQ -I${.CURDIR} # Need to use "WITH_" prefix to not conflict with the l/y INET/INET6 keywords .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DWITH_INET6 .endif .if ${MK_INET_SUPPORT} != "no" CFLAGS+= -DWITH_INET .endif YFLAGS= -LDADD+= -lm -lmd -DPADD+= ${LIBM} ${LIBMD} +LIBADD= m md .include Index: head/sbin/pflogd/Makefile =================================================================== --- head/sbin/pflogd/Makefile (revision 275029) +++ head/sbin/pflogd/Makefile (revision 275030) @@ -1,16 +1,15 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../contrib/pf/pflogd PROG= pflogd SRCS= pflogd.c pidfile.c privsep.c privsep_fdpass.c MAN= pflogd.8 CFLAGS+=-include ${.CURDIR}/../../lib/libpcap/config.h -LDADD= -lpcap -DPADD= ${LIBPCAP} +LIBADD= pcap WARNS?= 2 .include Index: head/sbin/ping/Makefile =================================================================== --- head/sbin/ping/Makefile (revision 275029) +++ head/sbin/ping/Makefile (revision 275030) @@ -1,26 +1,23 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ .include PROG= ping 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 Index: head/sbin/ping6/Makefile =================================================================== --- head/sbin/ping6/Makefile (revision 275029) +++ head/sbin/ping6/Makefile (revision 275030) @@ -1,16 +1,15 @@ # $FreeBSD$ PROG= ping6 MAN= ping6.8 CFLAGS+=-DIPSEC -DKAME_SCOPEID -DUSE_RFC2292BIS \ -DHAVE_ARC4RANDOM WARNS?= 3 BINOWN= root BINMODE=4555 -LDADD= -lipsec -lm -lmd -DPADD= ${LIBIPSEC} ${LIBM} ${LIBMD} +LIBADD= ipsec m md .include Index: head/sbin/quotacheck/Makefile =================================================================== --- head/sbin/quotacheck/Makefile (revision 275029) +++ head/sbin/quotacheck/Makefile (revision 275030) @@ -1,13 +1,12 @@ # $FreeBSD$ # @(#)Makefile 8.1 (Berkeley) 6/5/93 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 .include Index: head/sbin/rcorder/Makefile =================================================================== --- head/sbin/rcorder/Makefile (revision 275029) +++ head/sbin/rcorder/Makefile (revision 275030) @@ -1,20 +1,19 @@ # $NetBSD: Makefile,v 1.1 1999/11/23 05:28:20 mrg Exp $ # $FreeBSD$ 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. SRCS+= util.h CLEANFILES+= util.h util.h: ln -sf ${.CURDIR}/../../lib/libutil/libutil.h ${.TARGET} .include Index: head/sbin/routed/Makefile =================================================================== --- head/sbin/routed/Makefile (revision 275029) +++ head/sbin/routed/Makefile (revision 275030) @@ -1,13 +1,12 @@ # Make `routed` for FreeBSD # $FreeBSD$ 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 .include Index: head/sbin/routed/rtquery/Makefile =================================================================== --- head/sbin/routed/rtquery/Makefile (revision 275029) +++ head/sbin/routed/rtquery/Makefile (revision 275030) @@ -1,12 +1,11 @@ # Make `routed` tools for BSD/OS # $Revision: 1.6 $ # $FreeBSD$ PROG= rtquery MAN= rtquery.8 -LDADD= -lmd -DPADD= ${LIBMD} +LIBADD= md WARNS?= 3 NO_WARRAY_BOUNDS= .include Index: head/sbin/savecore/Makefile =================================================================== --- head/sbin/savecore/Makefile (revision 275029) +++ head/sbin/savecore/Makefile (revision 275030) @@ -1,8 +1,7 @@ # $FreeBSD$ PROG= savecore -DPADD= ${LIBZ} -LDADD= -lz +LIBADD= z MAN= savecore.8 .include Index: head/sbin/setkey/Makefile =================================================================== --- head/sbin/setkey/Makefile (revision 275029) +++ head/sbin/setkey/Makefile (revision 275030) @@ -1,69 +1,67 @@ # Copyright (C) 1995, 1996, 1997, 1998, and 1999 WIDE Project. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. Neither the name of the project nor the names of its contributors # may be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF # SUCH DAMAGE. # # $FreeBSD$ .include PROG= setkey MAN= setkey.8 SRCS= setkey.c parse.y token.l 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 # libpfkey # ipsec_strerror.c is for avoiding shlib reference to non-exported function. .PATH: ${.CURDIR}/../../lib/libipsec ${.CURDIR}/../../sys/netipsec SRCS+= pfkey.c pfkey_dump.c key_debug.c ipsec_strerror.c CFLAGS+= -I${.CURDIR}/../../lib/libipsec -I${.CURDIR}/../../sys/netipsec SRCS+= y.tab.h y.tab.h: parse.y CFLAGS+= -DIPSEC_DEBUG -DYY_NO_UNPUT .if ${MK_INET6_SUPPORT} != "no" CFLAGS+= -DINET6 .endif CFLAGS+= -I. -DPADD+= ${LIBIPSEC} -LDADD+= -lipsec +LIBADD+= ipsec CLEANFILES+= scriptdump y.tab.h #SCRIPTS= scriptdump LOCALPREFIX= /usr/local scriptdump: scriptdump.pl sed -e 's#@LOCALPREFIX@#${LOCALPREFIX}#' < $> > scriptdump .include Index: head/sbin/sunlabel/Makefile =================================================================== --- head/sbin/sunlabel/Makefile (revision 275029) +++ head/sbin/sunlabel/Makefile (revision 275030) @@ -1,23 +1,22 @@ # $FreeBSD$ .PATH: ${.CURDIR}/../../sys/geom PROG= sunlabel SRCS= sunlabel.c geom_sunlabel_enc.c MAN= sunlabel.8 .if ${MACHINE_CPUARCH} == "sparc64" LINKS= ${BINDIR}/sunlabel ${BINDIR}/disklabel MLINKS= sunlabel.8 disklabel.8 .endif -DPADD= ${LIBGEOM} -LDADD= -lgeom +LIBADD= geom .include test: ${PROG} sh ${.CURDIR}/runtest.sh testx: ${PROG} sh -x ${.CURDIR}/runtest.sh Index: head/sbin/swapon/Makefile =================================================================== --- head/sbin/swapon/Makefile (revision 275029) +++ head/sbin/swapon/Makefile (revision 275030) @@ -1,14 +1,13 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= swapon MAN= swapon.8 LINKS= ${BINDIR}/swapon ${BINDIR}/swapoff LINKS+= ${BINDIR}/swapon ${BINDIR}/swapctl MLINKS= swapon.8 swapoff.8 MLINKS+=swapon.8 swapctl.8 -DPADD= ${LIBUTIL} -LDADD= -lutil +LIBADD= util .include Index: head/sbin/tunefs/Makefile =================================================================== --- head/sbin/tunefs/Makefile (revision 275029) +++ head/sbin/tunefs/Makefile (revision 275030) @@ -1,11 +1,10 @@ # @(#)Makefile 8.1 (Berkeley) 6/5/93 # $FreeBSD$ PROG= tunefs -DPADD= ${LIBUFS} -LDADD= -lufs +LIBADD= ufs MAN= tunefs.8 WARNS= 3 .include