1# Makefile 4.8 85/01/08 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 prefixing 12# ``compat'' (so they all sort together). 13# 14# The C run-time startup code is always machine dependent and expected 15# to be located in ${MACHINE}/csu 16# 17DESTDIR= 18INSTALL=install -m 644 19DFLMON= mon.o 20MACHINE=vax 21COMPAT= compat-4.1 compat-sys5 22ALL= gen inet net stdio ${MACHINE} ${COMPAT} 23 24libc.a libc_p.a: ${MACHINE}/csu ${ALL} 25 -mkdir tmp 26 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done 27 ls tmp/*.o | sort -t/ +1 > t1 28 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 29 ar ma flsbuf.o libc.a exit.o 30 ar ma exit.o libc.a fakcu.o 31 rm -f t1 tmp/* 32 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done 33 ls tmp/*.o | sort -t/ +1 > t1 34 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 35 ar ma flsbuf.o libc_p.a exit.o 36 ar ma exit.o libc_p.a fakcu.o 37 rm -rf t1 tmp 38 39${MACHINE}/csu ${ALL}: FRC 40 cd $@; make ${MFLAGS} 41 42FRC: 43 44clean: 45 for i in ${MACHINE}/csu ${ALL}; do (cd $$i; make ${MFLAGS} clean); done 46 rm -f t1 tmp/*.o 47 -rmdir tmp 48 49install: 50 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a 51 ranlib ${DESTDIR}/lib/libc.a 52 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a 53 ranlib ${DESTDIR}/usr/lib/libc_p.a 54 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install 55