added SYSLIBC_SCCS condition for sccs ids
[unix-history] / usr / src / lib / libc / Makefile
CommitLineData
1b597941
SL
1#
2# Copyright (c) 1980 Regents of the University of California.
3# All rights reserved. The Berkeley software License Agreement
4# specifies the terms and conditions for redistribution.
5#
f40caa26 6# @(#)Makefile 4.18 (Berkeley) %G%
fb1f04f7 7#
8c7be43d 8#
4e22c84a
BJ
9# The system has two monitoring schemes, utilizing either ``prof''
10# or ``gprof''. DFLMON determines the default profiler; mon.o
11# specifies that ``prof'' is the default, gmon.o specifies that
12# ``gprof'' is the default.
13#
14# Machine dependent routines are located in a subtree which parallels
15# the top directories. This subtree is identified by the machine name.
16#
298fecef
BJ
17# Compatibility routines are kept in directories with a prefixing
18# ``compat'' (so they all sort together).
4e22c84a
BJ
19#
20# The C run-time startup code is always machine dependent and expected
21# to be located in ${MACHINE}/csu
29e84943 22#
311cfb46
KM
23# All files contain sccsid strings. To compile a library that does
24# not include these strings one must add -Dlint to DEFS below.
25#
2cf8fbdc 26# There are two possible methods of doing host name look up. They are
f40caa26 27# to use the name server or /etc/hosts. HOSTLOOKUP defines which method
cc8774b4 28# is to be compiled into libc :
fb1f04f7 29#
cc8774b4 30# defining HOSTLOOKUP to be "named", compiles the
f40caa26 31# host lookup routines that use the BIND name server.
cc8774b4
JB
32#
33# defining HOSTLOOKUP to be "hosttable", compiles
34# the host lookup routines that use /etc/hosts.
35#
3aebf78c
KS
36#HOSTLOOKUP= hosttable
37HOSTLOOKUP= named
cc8774b4 38#
29e84943 39DESTDIR=
8c7be43d 40INSTALL=install -m 644
7867d964 41DFLMON= mon.o
4e22c84a 42MACHINE=vax
311cfb46 43DEFS=
298fecef 44COMPAT= compat-4.1 compat-sys5
3aebf78c 45ALL= gen inet net ns stdio ${MACHINE} ${COMPAT}
818c32a5 46TAGSFILE=tags
29e84943 47
2cf8fbdc 48libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}
ed6a7667 49 rm -rf t1 tmp
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); \
3aebf78c 81 done
2cf8fbdc
JB
82 cd net/${HOSTLOOKUP}; \
83 make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags
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