summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1995-06-30 15:30:35 +0000
committerwollman <wollman@FreeBSD.org>1995-06-30 15:30:35 +0000
commitceb5359a6a5eb2c01ad774c9f329de66865a9962 (patch)
tree806adad3567e360c381f693f7a7705179f755a0f /lib
parent3eb68ab44ebfc2dd59de05c6d3b5d0f27250c738 (diff)
downloadFreeBSD-src-ceb5359a6a5eb2c01ad774c9f329de66865a9962.zip
FreeBSD-src-ceb5359a6a5eb2c01ad774c9f329de66865a9962.tar.gz
Numerous Makefile fixes:
1) Do dependencies. 2) Install all appropriate links to manual pages. 3) Install header file in `beforeinstall' like all the rest. 4) Install header file only if changed. 5) Install object files only if changed.
Diffstat (limited to 'lib')
-rw-r--r--lib/csu/i386/Makefile41
1 files changed, 30 insertions, 11 deletions
diff --git a/lib/csu/i386/Makefile b/lib/csu/i386/Makefile
index f7ec74b..43383cc 100644
--- a/lib/csu/i386/Makefile
+++ b/lib/csu/i386/Makefile
@@ -1,34 +1,53 @@
# from: @(#)Makefile 5.6 (Berkeley) 5/22/91
-# $Id: Makefile,v 1.14 1995/02/09 08:00:20 jkh Exp $
+# $Id: Makefile,v 1.15 1995/03/30 06:40:31 phk Exp $
CFLAGS+= -DLIBC_SCCS -DDYNAMIC
OBJS= crt0.o gcrt0.o c++rt0.o
CLEANFILES+= a.out
MAN3+= dlopen.3
+MLINKS+= dlopen.3 dlsym.3 \
+ dlopen.3 dlerror.3 \
+ dlopen.3 dlclose.3
all: ${OBJS}
crt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DCRT0 ${.ALLSRC} -o ${.TARGET}
+ ${CC} ${CFLAGS} -c -DCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
${LD} -x -r ${.TARGET}
mv a.out ${.TARGET}
c++rt0.o: c++rt0.c
- ${CC} ${CFLAGS} -fpic -c ${.ALLSRC}
+ ${CC} ${CFLAGS} -fpic -c ${.CURDIR}/c++rt0.c
@${LD} -x -r ${.TARGET}
@mv a.out ${.TARGET}
-gcrt0.o: crt0.c
- ${CC} ${CFLAGS} -c -DMCRT0 ${.ALLSRC} -o ${.TARGET}
+#
+# gcrt0.o doesn't really depend on crt0.o, but this is the easiest way
+# to get the dependencies mostly correct.
+#
+gcrt0.o: crt0.o
+ ${CC} ${CFLAGS} -c -DMCRT0 ${.CURDIR}/crt0.c -o ${.TARGET}
${LD} -x -r ${.TARGET}
mv a.out ${.TARGET}
-install: maninstall
- install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${OBJS} \
- ${DESTDIR}/usr/lib
- install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/dlfcn.h \
- ${DESTDIR}/usr/include
+beforeinstall:
+ cmp -s ${.CURDIR}/dlfcn.h ${DESTDIR}/usr/include/dlfcn.h || \
+ install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
+ ${.CURDIR}/dlfcn.h ${DESTDIR}/usr/include
-depend lint tags:
+realinstall:
+.for i in ${OBJS}
+ cmp -s $i ${DESTDIR}/usr/lib/$i || \
+ install ${COPY} -o ${BINOWN} -g ${BINGRP} -m 444 $i ${DESTDIR}/usr/lib
+.endfor
+
+depend: .depend
+
+.depend: crt0.c c++rt0.c
+ rm -f .depend
+ mkdep ${CFLAGS} -DCRT0 ${.CURDIR}/crt0.c
+ mkdep -a ${CFLAGS} ${.CURDIR}/c++rt0.c
+
+lint tags:
.include <bsd.prog.mk>
OpenPOWER on IntegriCloud