From 4b07d8e78226e63a874eb615588dd84dbdd8e2e0 Mon Sep 17 00:00:00 2001 From: bde Date: Sun, 28 Aug 1994 18:49:06 +0000 Subject: Add dependencies on libraries to DPADD. Someday this should be done automagically. -lfoo has to be right to work, but ${LIBFO0} is too easy to forget or misspell; nothing checks it and it should be different for shared libraries. --- gnu/usr.bin/cc/Makefile.inc | 10 ++++++++++ gnu/usr.bin/cc/c++/Makefile | 3 +-- gnu/usr.bin/cc/cc/Makefile | 3 +-- gnu/usr.bin/cc/cc1/Makefile | 3 +-- gnu/usr.bin/cc/cc1plus/Makefile | 3 +-- gnu/usr.bin/cc/cccp/Makefile | 3 +-- gnu/usr.bin/cc/cpp/Makefile | 3 +-- gnu/usr.bin/ld/rtld/Makefile | 5 +++-- 8 files changed, 19 insertions(+), 14 deletions(-) (limited to 'gnu/usr.bin') diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 39ae7e7..d3a8b22 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -10,3 +10,13 @@ CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"i386--freebsd\" CFLAGS+= -DMD_EXEC_PREFIX=\"/usr/libexec/\" CFLAGS+= -DSTANDARD_STARTFILE_PREFIX=\"/usr/lib\" CFLAGS+= -DGCC_NAME=\"cc\" + +.if exists(${.CURDIR}/../cc_int/obj) +LIBDESTDIR= ${.CURDIR}/../cc_int/obj +.else +LIBDESTDIR= ${.CURDIR}/../cc_int +.endif + +# XXX LDDESTDIR isn't a directory and there is no standard name for the dir +LDDESTDIR= -L${LIBDESTDIR} +LIBCC_INT= ${LIBDESTDIR}/libcc_int.a diff --git a/gnu/usr.bin/cc/c++/Makefile b/gnu/usr.bin/cc/c++/Makefile index 71fb59e..6b400b6 100644 --- a/gnu/usr.bin/cc/c++/Makefile +++ b/gnu/usr.bin/cc/c++/Makefile @@ -6,8 +6,7 @@ PROG = c++ SRCS = g++.c BINDIR= /usr/bin NOMAN= 1 -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/cc/cc/Makefile b/gnu/usr.bin/cc/cc/Makefile index dc503ab..44fabc5 100644 --- a/gnu/usr.bin/cc/cc/Makefile +++ b/gnu/usr.bin/cc/cc/Makefile @@ -5,8 +5,7 @@ PROG = cc SRCS = gcc.c BINDIR= /usr/bin -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/cc/cc1/Makefile b/gnu/usr.bin/cc/cc1/Makefile index 667e454..745dc27 100644 --- a/gnu/usr.bin/cc/cc1/Makefile +++ b/gnu/usr.bin/cc/cc1/Makefile @@ -6,8 +6,7 @@ PROG = cc1 SRCS = c-aux-info.c c-convert.c c-decl.c c-iterate.c c-lang.c c-lex.c c-parse.c c-pragma.c c-typeck.c BINDIR= /usr/libexec NOMAN= 1 -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/cc/cc1plus/Makefile b/gnu/usr.bin/cc/cc1plus/Makefile index a03330d..5e43626 100644 --- a/gnu/usr.bin/cc/cc1plus/Makefile +++ b/gnu/usr.bin/cc/cc1plus/Makefile @@ -6,8 +6,7 @@ PROG = cc1plus SRCS = call.c class.c cvt.c decl.c decl2.c edsel.c errfn.c error.c except.c expr.c gc.c init.c lex.c method.c parse.c pt.c ptree.c search.c sig.c spew.c tree.c typeck.c typeck2.c xref.c BINDIR= /usr/libexec NOMAN= 1 -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/cc/cccp/Makefile b/gnu/usr.bin/cc/cccp/Makefile index 8467da4..b7e09c2 100644 --- a/gnu/usr.bin/cc/cccp/Makefile +++ b/gnu/usr.bin/cc/cccp/Makefile @@ -5,8 +5,7 @@ PROG = cpp SRCS = cccp.c cexp.c BINDIR= /usr/libexec -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/cc/cpp/Makefile b/gnu/usr.bin/cc/cpp/Makefile index 8467da4..b7e09c2 100644 --- a/gnu/usr.bin/cc/cpp/Makefile +++ b/gnu/usr.bin/cc/cpp/Makefile @@ -5,8 +5,7 @@ PROG = cpp SRCS = cccp.c cexp.c BINDIR= /usr/libexec -LDDESTDIR+= -L${.CURDIR}/../cc_int/obj -LDDESTDIR+= -L${.CURDIR}/../cc_int +DPADD+= ${LIBCC_INT} LDADD+= -lcc_int .include diff --git a/gnu/usr.bin/ld/rtld/Makefile b/gnu/usr.bin/ld/rtld/Makefile index d77c817..ac6c892 100644 --- a/gnu/usr.bin/ld/rtld/Makefile +++ b/gnu/usr.bin/ld/rtld/Makefile @@ -1,4 +1,4 @@ -# $Id: Makefile,v 1.10 1994/03/10 23:19:54 ats Exp $ +# $Id: Makefile,v 1.11 1994/08/26 19:11:14 wollman Exp $ PROG= ld.so SRCS= mdprologue.S rtld.c malloc.c shlib.c etc.c md.c @@ -9,6 +9,7 @@ PICFLAG=-fpic CFLAGS+=-I$(LDDIR) -I$(.CURDIR) -I$(LDDIR)/$(MACHINE) $(PICFLAG) -DRTLD LDFLAGS+=-Bshareable -Bsymbolic -assert nosymbolic ASFLAGS+=-k +DPADD+= ${LIBC:S/c.a/c_pic.a/} ${LIBC:S/c.a/gcc_pic.a/} LDADD+= -lc_pic -lgcc_pic BINDIR= /usr/libexec INSTALLFLAGS+= -fschg @@ -17,7 +18,7 @@ INSTALLFLAGS+= -fschg .PATH: $(LDDIR) $(LDDIR)/$(MACHINE) -$(PROG): +$(PROG): ${OBJS} ${DPADD} $(LD) -o $(PROG) $(LDFLAGS) $(OBJS) $(LDADD) .S.o: -- cgit v1.1