speedup by doing cmpc3 then locc; reduce chance for bogus page fault
[unix-history] / usr / src / lib / libc / Makefile
CommitLineData
c8a54e4e 1# Makefile 4.7 84/11/13
8c7be43d 2#
4e22c84a
BJ
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#
298fecef
BJ
11# Compatibility routines are kept in directories with a prefixing
12# ``compat'' (so they all sort together).
4e22c84a
BJ
13#
14# The C run-time startup code is always machine dependent and expected
15# to be located in ${MACHINE}/csu
29e84943
KM
16#
17DESTDIR=
8c7be43d 18INSTALL=install -m 644
7867d964 19DFLMON= mon.o
4e22c84a 20MACHINE=vax
298fecef 21COMPAT= compat-4.1 compat-sys5
4e22c84a 22ALL= gen inet net stdio ${MACHINE} ${COMPAT}
29e84943 23
4e22c84a 24libc.a libc_p.a: ${MACHINE}/csu ${ALL}
b507d6c0 25 -mkdir tmp
4e22c84a 26 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done
29e84943 27 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 28 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
29e84943 29 ar ma flsbuf.o libc.a exit.o
c8a54e4e 30 ar ma exit.o libc.a fakcu.o
29e84943 31 rm -f t1 tmp/*
4e22c84a 32 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done
29e84943 33 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 34 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
29e84943 35 ar ma flsbuf.o libc_p.a exit.o
c8a54e4e 36 ar ma exit.o libc.a fakcu.o
29e84943
KM
37 rm -rf t1 tmp
38
4e22c84a
BJ
39${MACHINE}/csu ${ALL}: FRC
40 cd $@; make ${MFLAGS}
29e84943 41
4e22c84a
BJ
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
29e84943 48
4e22c84a 49install:
7867d964
SL
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
4e22c84a 54 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install