1# @(#)Makefile 4.5 {Berkeley} 83/06/27 2# 3# The system has two monitoring schemes, utilizing either ``prof'' 4# or ``gprof''. DFLMON determines the default profiler; mon.o 5# specifies that ``prof'' is the default, gmon.o specifies that 6# ``gprof'' is the default. 7# 8# Machine dependent routines are located in a subtree which parallels 9# the top directories. This subtree is identified by the machine name. 10# 11# Compatibility routines are kept in directories with a trailing ``compat'' 12# 13# The C run-time startup code is always machine dependent and expected 14# to be located in ${MACHINE}/csu 15# 16DESTDIR= 17INSTALL=install -m 644 18DFLMON= mon.o 19MACHINE=vax 20COPMAT= 4.1compat 21ALL= gen inet net stdio ${MACHINE} ${COMPAT} 22 23libc.a libc_p.a: ${MACHINE}/csu ${ALL} 24 -mkdir tmp 25 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done 26 ls tmp/*.o | sort -t/ +1 > t1 27 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 28 ar ma flsbuf.o libc.a exit.o 29 rm -f t1 tmp/* 30 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done 31 ls tmp/*.o | sort -t/ +1 > t1 32 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 33 ar ma flsbuf.o libc_p.a exit.o 34 rm -rf t1 tmp 35 36${MACHINE}/csu ${ALL}: FRC 37 cd $@; make ${MFLAGS} 38 39FRC: 40 41clean: 42 for i in ${MACHINE}/csu ${ALL}; do (cd $$i; make ${MFLAGS} clean); done 43 rm -f t1 tmp/*.o 44 -rmdir tmp 45 46install: 47 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a 48 ranlib ${DESTDIR}/lib/libc.a 49 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a 50 ranlib ${DESTDIR}/usr/lib/libc_p.a 51 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install 52