| 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 | # |
| 17 | DESTDIR= |
| 18 | INSTALL=install -m 644 |
| 19 | DFLMON= mon.o |
| 20 | MACHINE=vax |
| 21 | COMPAT= compat-4.1 compat-sys5 |
| 22 | ALL= gen inet net stdio ${MACHINE} ${COMPAT} |
| 23 | |
| 24 | libc.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 | |
| 42 | FRC: |
| 43 | |
| 44 | clean: |
| 45 | for i in ${MACHINE}/csu ${ALL}; do (cd $$i; make ${MFLAGS} clean); done |
| 46 | rm -f t1 tmp/*.o |
| 47 | -rmdir tmp |
| 48 | |
| 49 | install: |
| 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 |