1 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# 7# @(#)Makefile 4.16 (Berkeley) 09/15/85 8# 9# 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# 18# Compatibility routines are kept in directories with a prefixing 19# ``compat'' (so they all sort together). 20# 21# The C run-time startup code is always machine dependent and expected 22# to be located in ${MACHINE}/csu 23# 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# 27# There are two possible methods of doing host name look up. They are 28# to use the nameserver or /etc/hosts. HOSTLOOKUP defines which method 29# is to be compiled into libc : 30# 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# 37HOSTLOOKUP= hosttable 38#HOSTLOOKUP= named 39# 40DESTDIR= 41INSTALL=install -m 644 42DFLMON= mon.o 43MACHINE=vax 44DEFS= 45COMPAT= compat-4.1 compat-sys5 46ALL= gen inet net stdio ${MACHINE} ${COMPAT} 47TAGSFILE=tags 48 49libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP} 50 rm -rf t1 tmp 51 -mkdir tmp 52 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done 53 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib 54 ls tmp/*.o | sort -t/ +1 > t1 55 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 56 ar ma findiop.o libc.a exit.o 57 ar ma exit.o libc.a fakcu.o 58 rm -f t1 tmp/* 59 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done 60 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib_p 61 ls tmp/*.o | sort -t/ +1 > t1 62 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 63 ar ma findiop.o libc_p.a exit.o 64 ar ma exit.o libc_p.a fakcu.o 65 rm -rf t1 tmp 66 67${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}: FRC 68 cd $@; make ${MFLAGS} DEFS=${DEFS} 69 70FRC: 71 72install: 73 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a 74 ranlib ${DESTDIR}/lib/libc.a 75 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a 76 ranlib ${DESTDIR}/usr/lib/libc_p.a 77 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install 78 79tags: 80 for i in ${ALL}; do \ 81 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ 82 cd net/${HOSTLOOKUP}; \ 83 make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags 84 done 85 86clean: 87 for i in ${MACHINE}/csu ${ALL} net/hosttable net/named; \ 88 do (cd $$i; make ${MFLAGS} clean); done 89 rm -f t1 tmp/*.o 90 -rmdir tmp 91 92depend: 93 for i in ${MACHINE}/csu ${ALL} net/hosttable net/named; \ 94 do (cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done 95