Commit | Line | Data |
---|---|---|
fb1f04f7 | 1 | |
1b597941 SL |
2 | # |
3 | # Copyright (c) 1980 Regents of the University of California. | |
4 | # All rights reserved. The Berkeley software License Agreement | |
5 | # specifies the terms and conditions for redistribution. | |
6 | # | |
fb1f04f7 KD |
7 | # @(#)Makefile 4.13 (Berkeley) %G% |
8 | # | |
8c7be43d | 9 | # |
4e22c84a BJ |
10 | # The system has two monitoring schemes, utilizing either ``prof'' |
11 | # or ``gprof''. DFLMON determines the default profiler; mon.o | |
12 | # specifies that ``prof'' is the default, gmon.o specifies that | |
13 | # ``gprof'' is the default. | |
14 | # | |
15 | # Machine dependent routines are located in a subtree which parallels | |
16 | # the top directories. This subtree is identified by the machine name. | |
17 | # | |
298fecef BJ |
18 | # Compatibility routines are kept in directories with a prefixing |
19 | # ``compat'' (so they all sort together). | |
4e22c84a BJ |
20 | # |
21 | # The C run-time startup code is always machine dependent and expected | |
22 | # to be located in ${MACHINE}/csu | |
29e84943 | 23 | # |
311cfb46 KM |
24 | # All files contain sccsid strings. To compile a library that does |
25 | # not include these strings one must add -Dlint to DEFS below. | |
26 | # | |
fb1f04f7 KD |
27 | #********************************************************************* |
28 | #===================================================================== | |
29 | # | |
30 | # There are two types of resolvers, 'res_named' which uses the | |
31 | # nameserver and 'res_static' which uses /etc/hosts. | |
32 | # | |
33 | # RESOLVER defines which resolver is to be compiled into libc | |
34 | # | |
35 | # defining RESOLVER to res_named, compiles the | |
36 | # routines which the BIND nameserver uses into libc | |
37 | #--------------------------------------------------------------------- | |
38 | #RESOLVER= res_named | |
39 | #--------------------------------------------------------------------- | |
40 | # defining RESOLVER to res_static, compiles # | |
41 | # the routines which use the old method of # | |
42 | # hostname resolveing. (ie /etc/HOSTS ) # | |
43 | #--------------------------------------------------------------------- | |
44 | RESOLVER= res_static | |
29e84943 | 45 | DESTDIR= |
8c7be43d | 46 | INSTALL=install -m 644 |
7867d964 | 47 | DFLMON= mon.o |
4e22c84a | 48 | MACHINE=vax |
311cfb46 | 49 | DEFS= |
298fecef | 50 | COMPAT= compat-4.1 compat-sys5 |
4e22c84a | 51 | ALL= gen inet net stdio ${MACHINE} ${COMPAT} |
818c32a5 | 52 | TAGSFILE=tags |
29e84943 | 53 | |
4e22c84a | 54 | libc.a libc_p.a: ${MACHINE}/csu ${ALL} |
b507d6c0 | 55 | -mkdir tmp |
4e22c84a | 56 | for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done |
29e84943 | 57 | ls tmp/*.o | sort -t/ +1 > t1 |
4e22c84a | 58 | ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} |
1b597941 | 59 | ar ma findiop.o libc.a exit.o |
c8a54e4e | 60 | ar ma exit.o libc.a fakcu.o |
29e84943 | 61 | rm -f t1 tmp/* |
4e22c84a | 62 | for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done |
29e84943 | 63 | ls tmp/*.o | sort -t/ +1 > t1 |
4e22c84a | 64 | ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} |
1b597941 | 65 | ar ma findiop.o libc_p.a exit.o |
d92dfcf8 | 66 | ar ma exit.o libc_p.a fakcu.o |
29e84943 KM |
67 | rm -rf t1 tmp |
68 | ||
4e22c84a | 69 | ${MACHINE}/csu ${ALL}: FRC |
311cfb46 | 70 | cd $@; make ${MFLAGS} DEFS=${DEFS} |
29e84943 | 71 | |
4e22c84a BJ |
72 | FRC: |
73 | ||
4e22c84a | 74 | install: |
7867d964 SL |
75 | ${INSTALL} libc.a ${DESTDIR}/lib/libc.a |
76 | ranlib ${DESTDIR}/lib/libc.a | |
77 | ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a | |
78 | ranlib ${DESTDIR}/usr/lib/libc_p.a | |
4e22c84a | 79 | cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install |
818c32a5 SL |
80 | |
81 | tags: | |
82 | for i in ${ALL}; do \ | |
83 | (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ | |
84 | done | |
818c32a5 SL |
85 | |
86 | clean: | |
87 | for i in ${MACHINE}/csu ${ALL}; do (cd $$i; make ${MFLAGS} clean); done | |
88 | rm -f t1 tmp/*.o | |
89 | -rmdir tmp |