1. when raising windows, let those frozen out know
[unix-history] / usr / src / lib / libc / Makefile
CommitLineData
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#
cc8774b4 7# @(#)Makefile 4.15 (Berkeley) %G%
fb1f04f7 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#
2cf8fbdc 27# There are two possible methods of doing host name look up. They are
cc8774b4
JB
28# to use the nameserver or /etc/hosts. HOSTLOOKUP defines which method
29# is to be compiled into libc :
fb1f04f7 30#
cc8774b4
JB
31# defining HOSTLOOKUP to be "named", compiles the
32# host lookup routines that use the BIND nameserver.
33#
34# defining HOSTLOOKUP to be "hosttable", compiles
35# the host lookup routines that use /etc/hosts.
36#
2cf8fbdc 37HOSTLOOKUP= hosttable
cc8774b4
JB
38#HOSTLOOKUP= named
39#
29e84943 40DESTDIR=
8c7be43d 41INSTALL=install -m 644
7867d964 42DFLMON= mon.o
4e22c84a 43MACHINE=vax
311cfb46 44DEFS=
298fecef 45COMPAT= compat-4.1 compat-sys5
4e22c84a 46ALL= gen inet net stdio ${MACHINE} ${COMPAT}
818c32a5 47TAGSFILE=tags
29e84943 48
2cf8fbdc 49libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}
b507d6c0 50 -mkdir tmp
4e22c84a 51 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done
2cf8fbdc 52 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib
29e84943 53 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 54 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
1b597941 55 ar ma findiop.o libc.a exit.o
c8a54e4e 56 ar ma exit.o libc.a fakcu.o
29e84943 57 rm -f t1 tmp/*
4e22c84a 58 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done
2cf8fbdc 59 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib_p
29e84943 60 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 61 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
1b597941 62 ar ma findiop.o libc_p.a exit.o
d92dfcf8 63 ar ma exit.o libc_p.a fakcu.o
29e84943
KM
64 rm -rf t1 tmp
65
2cf8fbdc 66${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}: FRC
311cfb46 67 cd $@; make ${MFLAGS} DEFS=${DEFS}
29e84943 68
4e22c84a
BJ
69FRC:
70
4e22c84a 71install:
7867d964
SL
72 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
73 ranlib ${DESTDIR}/lib/libc.a
74 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
75 ranlib ${DESTDIR}/usr/lib/libc_p.a
4e22c84a 76 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install
818c32a5
SL
77
78tags:
79 for i in ${ALL}; do \
80 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \
2cf8fbdc
JB
81 cd net/${HOSTLOOKUP}; \
82 make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags
818c32a5 83 done
818c32a5
SL
84
85clean:
cc8774b4 86 for i in ${MACHINE}/csu ${ALL} net/hosttable net/named; \
2cf8fbdc 87 do (cd $$i; make ${MFLAGS} clean); done
818c32a5
SL
88 rm -f t1 tmp/*.o
89 -rmdir tmp
cc8774b4
JB
90
91depend:
92 for i in ${MACHINE}/csu ${ALL} net/hosttable net/named; \
93 do (cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done