Commit | Line | Data |
---|---|---|
1b597941 | 1 | # |
d443e9f1 KB |
2 | # Copyright (c) 1988 Regents of the University of California. |
3 | # All rights reserved. | |
1b597941 | 4 | # |
d443e9f1 | 5 | # Redistribution and use in source and binary forms are permitted |
57a981eb KB |
6 | # provided that the above copyright notice and this paragraph are |
7 | # duplicated in all such forms and that any documentation, | |
8 | # advertising materials, and other materials related to such | |
9 | # distribution and use acknowledge that the software was developed | |
10 | # by the University of California, Berkeley. The name of the | |
11 | # University may not be used to endorse or promote products derived | |
12 | # from this software without specific prior written permission. | |
13 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
14 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
15 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
16 | # | |
17 | # @(#)Makefile 4.34 (Berkeley) %G% | |
4e22c84a | 18 | # |
298fecef BJ |
19 | # Compatibility routines are kept in directories with a prefixing |
20 | # ``compat'' (so they all sort together). | |
4e22c84a BJ |
21 | # |
22 | # The C run-time startup code is always machine dependent and expected | |
23 | # to be located in ${MACHINE}/csu | |
29e84943 | 24 | # |
2cf8fbdc | 25 | # There are two possible methods of doing host name look up. They are |
f40caa26 | 26 | # to use the name server or /etc/hosts. HOSTLOOKUP defines which method |
cc8774b4 | 27 | # is to be compiled into libc : |
fb1f04f7 | 28 | # |
cc8774b4 | 29 | # defining HOSTLOOKUP to be "named", compiles the |
f40caa26 | 30 | # host lookup routines that use the BIND name server. |
cc8774b4 JB |
31 | # |
32 | # defining HOSTLOOKUP to be "hosttable", compiles | |
33 | # the host lookup routines that use /etc/hosts. | |
34 | # | |
3aebf78c KS |
35 | #HOSTLOOKUP= hosttable |
36 | HOSTLOOKUP= named | |
e564300a | 37 | # |
d443e9f1 KB |
38 | # The system has two monitoring schemes, utilizing either ``prof'' |
39 | # or ``gprof''. DFLMON determines the default profiler; mon.o | |
40 | # specifies that ``prof'' is the default, gmon.o specifies that | |
41 | # ``gprof'' is the default. | |
42 | #DFLMON= gmon.o | |
43 | DFLMON= mon.o | |
44 | # | |
45 | # All library object contain sccsid strings by default; they may be | |
46 | # excluded as a space-saving measure. To produce a library that does | |
47 | # not contain these strings, remove -DLIBC_SCCS and -DSYSLIBC_SCCS | |
48 | # from DEFS below. To remove these strings from just the system call | |
49 | # stubs, remove -DSYSLIBC_SCCS from DEFS below. | |
50 | #DEFS= | |
51 | DEFS="-DLIBC_SCCS -DSYSLIBC_SCCS" | |
52 | ||
d443e9f1 | 53 | SUBDIR= ${ALL} net/hosttable net/named |
69970ce1 KB |
54 | ONE= compat-4.1 compat-4.3 compat-sys5 gen inet net ns stdio |
55 | TWO= compat-4.1/compat-4.1.${MACHINE} gen/gen.${MACHINE} \ | |
56 | net/net.${MACHINE} net/${HOSTLOOKUP} stdio/stdio.${MACHINE} \ | |
c980a65d KB |
57 | compat-sys5/compat-sys5.${MACHINE} ${MACHINE}/csu ${MACHINE}/sys |
58 | ALL= ${ONE} ${TWO} | |
818c32a5 | 59 | TAGSFILE=tags |
29e84943 | 60 | |
1ba07a3c | 61 | libc.a libc_p.a: mkdir ${ALL} tags |
d443e9f1 | 62 | ls library/*.o | sort -t/ +1 > t1 |
4e22c84a | 63 | ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} |
1b597941 | 64 | ar ma findiop.o libc.a exit.o |
c8a54e4e | 65 | ar ma exit.o libc.a fakcu.o |
d443e9f1 | 66 | ls profiled/*.o | sort -t/ +1 > t1 |
4e22c84a | 67 | ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} |
1b597941 | 68 | ar ma findiop.o libc_p.a exit.o |
d92dfcf8 | 69 | ar ma exit.o libc_p.a fakcu.o |
d443e9f1 | 70 | rm -rf t1 library profiled |
29e84943 | 71 | |
d443e9f1 KB |
72 | mkdir: FRC |
73 | rm -rf library profiled | |
74 | mkdir library profiled | |
29e84943 | 75 | |
d443e9f1 KB |
76 | ${ALL}: FRC |
77 | cd $@; make ${MFLAGS} DEFS=${DEFS} link | |
4e22c84a | 78 | |
4e22c84a | 79 | install: |
e564300a | 80 | install -o bin -g bin -m 644 libc.a ${DESTDIR}/lib/libc.a |
7867d964 | 81 | ranlib ${DESTDIR}/lib/libc.a |
e564300a | 82 | install -o bin -g bin -m 644 libc_p.a ${DESTDIR}/usr/lib/libc_p.a |
7867d964 | 83 | ranlib ${DESTDIR}/usr/lib/libc_p.a |
4e22c84a | 84 | cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install |
1ba07a3c | 85 | install -o bin -g bin -m 444 ${TAGSFILE} ${DESTDIR}/usr/lib/${TAGSFILE} |
818c32a5 SL |
86 | |
87 | tags: | |
69970ce1 KB |
88 | for i in ${ONE}; do \ |
89 | (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ | |
90 | done | |
91 | for i in ${TWO}; do \ | |
92 | (cd $$i; make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags); \ | |
3aebf78c | 93 | done |
90dfbb64 | 94 | /usr/bin/sort -o ${TAGSFILE} ${TAGSFILE} |
818c32a5 SL |
95 | |
96 | clean: | |
d443e9f1 | 97 | for i in ${SUBDIR}; \ |
2cf8fbdc | 98 | do (cd $$i; make ${MFLAGS} clean); done |
d443e9f1 | 99 | rm -rf libc.a libc_p.a library profiled |
cc8774b4 JB |
100 | |
101 | depend: | |
d443e9f1 | 102 | for i in ${SUBDIR}; \ |
cc8774b4 | 103 | do (cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done |
d443e9f1 KB |
104 | |
105 | FRC: | |
106 |