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'.
This commit is contained in:
Bruce Evans 1998-05-06 13:23:39 +00:00
parent ddb437cf93
commit d15d315c11

View File

@ -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