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.
This commit is contained in:
bde 1998-03-07 08:55:00 +00:00
parent 1bc27d9539
commit 6682846885
8 changed files with 46 additions and 91 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.28 1997/05/02 11:22:51 gj Exp $
# $Id: Makefile,v 1.29 1997/10/05 09:39:10 jkh Exp $
PROG = gdb
@ -43,34 +43,21 @@ CLEANFILES+= c-exp.c f-exp.c m2-exp.c init.c y.tab.h init.c-tmp
.ORDER: c-exp.c f-exp.c m2-exp.c
.if exists(${.OBJDIR}/../bfd)
LDADD+= -L${.OBJDIR}/../bfd -lbfd
DPADD+= ${.OBJDIR}/../bfd/libbfd.a
LIBBFD= ${.OBJDIR}/../bfd/libbfd.a
.else
LDADD+= -L${.CURDIR}/../bfd/ -lbfd
DPADD+= ${.CURDIR}/../bfd/libbfd.a
LIBBFD= ${.CURDIR}/../bfd/libbfd.a
.endif
DPADD+= ${LIBREADLINE} ${LIBGNUREGEX}
LDADD+= -lreadline -lgnuregex
.if exists(${.OBJDIR}/../libiberty)
LDADD+= -L${.OBJDIR}/../libiberty -liberty
DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
.endif
DPADD+= ${LIBTERMCAP}
LDADD+= -ltermcap
.if exists(${.OBJDIR}/../libiberty)
LDADD+= -L${.OBJDIR}/../libiberty -liberty
DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
.endif
DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP}
LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap
DPADD+= ${LIBIBERTY}
LDADD+= ${LIBIBERTY}
# We do this by grepping through sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an initialization routine

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.28 1997/05/02 11:22:51 gj Exp $
# $Id: Makefile,v 1.29 1997/10/05 09:39:10 jkh Exp $
PROG = gdb
@ -43,34 +43,21 @@ CLEANFILES+= c-exp.c f-exp.c m2-exp.c init.c y.tab.h init.c-tmp
.ORDER: c-exp.c f-exp.c m2-exp.c
.if exists(${.OBJDIR}/../bfd)
LDADD+= -L${.OBJDIR}/../bfd -lbfd
DPADD+= ${.OBJDIR}/../bfd/libbfd.a
LIBBFD= ${.OBJDIR}/../bfd/libbfd.a
.else
LDADD+= -L${.CURDIR}/../bfd/ -lbfd
DPADD+= ${.CURDIR}/../bfd/libbfd.a
LIBBFD= ${.CURDIR}/../bfd/libbfd.a
.endif
DPADD+= ${LIBREADLINE} ${LIBGNUREGEX}
LDADD+= -lreadline -lgnuregex
.if exists(${.OBJDIR}/../libiberty)
LDADD+= -L${.OBJDIR}/../libiberty -liberty
DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a
.endif
DPADD+= ${LIBTERMCAP}
LDADD+= -ltermcap
.if exists(${.OBJDIR}/../libiberty)
LDADD+= -L${.OBJDIR}/../libiberty -liberty
DPADD+= ${.OBJDIR}/../libiberty/libiberty.a
.else
LDADD+= -L${.CURDIR}/../libiberty/ -liberty
DPADD+= ${.CURDIR}/../libiberty/libiberty.a
.endif
DPADD= ${LIBBFD} ${LIBREADLINE} ${LIBGNUREGEX} ${LIBIBERTY} ${LIBTERMCAP}
LDADD= ${LIBBFD} -lreadline -lgnuregex ${LIBIBERTY} -ltermcap
DPADD+= ${LIBIBERTY}
LDADD+= ${LIBIBERTY}
# We do this by grepping through sources. If that turns out to be too slow,
# maybe we could just require every .o file to have an initialization routine

View File

@ -3,15 +3,12 @@ DEVICE= /dev/ttyv0
CFLAGS+= -I${.CURDIR}/../keycap -DKEYB_DEVICE=\"${DEVICE}\"
.if exists(${.OBJDIR}/../keycap)
LIBDESTDIR= ${.OBJDIR}/../keycap
LIBKEYCAP= ${.OBJDIR}/../keycap/libkeycap.a
.else
LIBDESTDIR= ${.CURDIR}/../keycap
LIBKEYCAP= ${.CURDIR}/../keycap/libkeycap.a
.endif
# the -Lfoo could be omitted if libkeycap.a were installed before
# making those programs here
DPADD = ${LIBDESTDIR}/libkeycap.a
LDADD = -L${LIBDESTDIR} -lkeycap
DPADD= ${LIBKEYCAP}
LDADD= ${LIBKEYCAP}
.include <bsd.prog.mk>

View File

@ -1,2 +1,10 @@
# $Id$
.if exists(${.OBJDIR}/../lib)
LIBINSTALL= ${.OBJDIR}/../lib/libinstall.a
.else
LIBINSTALL= ${.CURDIR}/../lib/libinstall.a
.endif
# Inherit BINDIR from one level up.
.include "../Makefile.inc"

View File

@ -1,17 +1,11 @@
# $Id$
PROG= pkg_add
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
.if exists(${.OBJDIR}/../lib)
LDADD+= -L${.OBJDIR}/../lib -linstall
DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
.endif
LDADD+= -lftpio -lmd
DPADD+= ${LIBFTPIO} ${LIBMD}
DPADD= ${LIBINSTALL} ${LIBFTPIO} ${LIBMD}
LDADD= ${LIBINSTALL} -lftpio -lmd
SRCS= main.c perform.c futil.c extract.c

View File

@ -1,17 +1,11 @@
# $Id$
PROG= pkg_create
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
.if exists(${.OBJDIR}/../lib)
LDADD+= -L${.OBJDIR}/../lib -linstall
DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
.endif
LDADD+= -lftpio -lmd
DPADD+= ${LIBFTPIO} ${LIBMD}
DPADD= ${LIBINSTALL} ${LIBFTPIO} ${LIBMD}
LDADD= ${LIBINSTALL} -lftpio -lmd
SRCS= main.c perform.c pl.c

View File

@ -1,16 +1,10 @@
# $Id$
PROG= pkg_delete
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
.if exists(${.OBJDIR}/../lib)
LDADD+= -L${.OBJDIR}/../lib -linstall
DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
.endif
LDADD+= -lftpio -lmd
DPADD+= ${LIBFTPIO} ${LIBMD}
DPADD= ${LIBINSTALL} ${LIBFTPIO} ${LIBMD}
LDADD= ${LIBINSTALL} -lftpio -lmd
SRCS= main.c perform.c

View File

@ -1,16 +1,10 @@
# $Id$
PROG= pkg_info
CFLAGS+= ${DEBUG} -I${.CURDIR}/../lib
.if exists(${.OBJDIR}/../lib)
LDADD+= -L${.OBJDIR}/../lib -linstall
DPADD+= ${.OBJDIR}/../lib/libinstall.a
.else
LDADD+= -L${.CURDIR}/../lib -linstall
DPADD+= ${.CURDIR}/../lib/libinstall.a
.endif
LDADD+= -lftpio -lmd
DPADD+= ${LIBFTPIO} ${LIBMD}
DPADD= ${LIBINSTALL} ${LIBFTPIO} ${LIBMD}
LDADD= ${LIBINSTALL} -lftpio -lmd
SRCS= main.c perform.c show.c