-# @(#)Makefile 4.5 (Berkeley) %G%
-#
-DESTDIR=
-CFLAGS= -O
+# @(#)Makefile 4.23 (Berkeley) %G%
-# Programs that live in subdirectories, and have makefiles of their own.
-#
-SUBDIR= lib usr.lib bin usr.bin etc ucb new games local
+SUBDIR= bin contrib games include kerberosIV lib libexec old pgrm sbin \
+ share usr.bin usr.sbin
-all: ${SUBDIR}
+build:
+ ${MAKE} cleandir
-${SUBDIR}: FRC
- cd $@; make ${MFLAGS}
+ @echo "+++ includes"
+ cd include; ${MAKE} depend all install clean
-FRC:
+.if ${MACHINE} == "vax" || ${MACHINE} == "tahoe"
+ @echo "+++ C preprocessor, compiler, loader"
+ cd pgrm/cpp; ${MAKE} depend all install clean
+ cd libexec/pcc; ${MAKE} depend all install clean
+ cd pgrm/ld; ${MAKE} depend all install clean
-install:
- for i in ${SUBDIR}; do \
- (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done
+ @echo "+++ C library"
+ cd lib/libc; ${MAKE} depend all install clean
-tags:
- for i in include lib usr.lib; do \
- (cd $$i; make ${MFLAGS} TAGSFILE=../tags tags); \
- done
- sort -u +0 -1 -o tags tags
+ @echo "+++ C preprocessor, compiler, loader (second time)"
+ cd pgrm/cpp; ${MAKE} all install
+ cd libexec/pcc; ${MAKE} all install
+ cd pgrm/ld; ${MAKE} all install
+.endif
-clean:
- rm -f a.out core *.s *.o
- for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done
+ @echo "+++ libraries"
+ cd lib; ${MAKE} depend all install all
+ cd kerberosIV; ${MAKE} depend all install all
+
+ @echo "+++ C library tags"
+ cd lib/libc; rm -f tags; ${MAKE} tags; \
+ install -c -o ${BINOWN} -g ${BINGRP} -m 444 tags /usr/libdata/tags
+
+ ${MAKE} depend all
+
+.include <bsd.subdir.mk>