From d15d315c11701a90922251ac1c0c9a3dce4af303 Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Wed, 6 May 1998 13:23:39 +0000 Subject: [PATCH] Use `foo/bar.a' instead of `-Lfoo -lbar' for linking to static internal libraries, so that `ld -f' in can create correct dependencies for yet-to-be-built libraries. Use `DIR!= cd ...libbind; make -V .OBJDIR' to find libbind's object dir if it doesn't seem to be in its usual place relative to ${.OBJDIR}. This fixes `cd /usr/src/usr.sbin/nslookup; mkdir obj; make'. --- usr.sbin/named/Makefile.inc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/usr.sbin/named/Makefile.inc b/usr.sbin/named/Makefile.inc index 5389509d0415..b0cf3a2df544 100644 --- a/usr.sbin/named/Makefile.inc +++ b/usr.sbin/named/Makefile.inc @@ -1,5 +1,5 @@ # From: Id: Makefile.inc,v 8.4 1996/03/03 17:42:43 vixie Exp -# $Id: Makefile.inc,v 1.5 1997/05/17 11:53:03 peter Exp $ +# $Id: Makefile.inc,v 1.6 1998/05/03 05:09:12 peter Exp $ .ifndef (Mk.Inc) Mk.Inc?=defined @@ -20,12 +20,14 @@ INCLUDE= -I${BIND_DIR}/port/freebsd/include -I${BIND_DIR}/include -I. CFLAGS+= ${INCLUDE} ${CONFIG} .if exists(${.OBJDIR}/../../lib/libbind) -LDADD+= -L${.OBJDIR}/../../lib/libbind -lbind -DPADD+= ${.OBJDIR}/../../lib/libbind/libbind.a +LIBBINDDIR:= ${.OBJDIR}/../../lib/libbind .else -LDADD+= -L${.CURDIR}/../../lib/libbind -lbind -DPADD+= ${.CURDIR}/../../lib/libbind/libbind.a +LIBBINDDIR!= cd ${.CURDIR}/../../lib/libbind; make -V .OBJDIR .endif +LIBBIND:= ${LIBBINDDIR}/libbind.a + +DPADD+= ${LIBBIND} +LDADD+= ${LIBBIND} CLEANFILES+= tmp_version.c pathnames.h