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.14 (Berkeley) 09/04/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#********************************************************************* 28#===================================================================== 29# 30# There are two possible methods of doing host name look up. They are 31# to use the nameserver or /etc/hosts. 32# 33# HOSTLOOKUP defines which method is to be compiled into libc 34# 35# defining HOSTLOOKUP to be "named", compiles the 36# routines which the BIND nameserver uses into libc 37#--------------------------------------------------------------------- 38#HOSTLOOKUP= named 39#--------------------------------------------------------------------- 40# defining HOSTLOOKUP to "hosttable", compiles 41# the routines which use the old method of 42# hostname lookup. (ie /etc/hosts ) 43#--------------------------------------------------------------------- 44HOSTLOOKUP= hosttable 45DESTDIR= 46INSTALL=install -m 644 47DFLMON= mon.o 48MACHINE=vax 49DEFS= 50COMPAT= compat-4.1 compat-sys5 51ALL= gen inet net stdio ${MACHINE} ${COMPAT} 52TAGSFILE=tags 53 54libc.a libc_p.a: ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP} 55 -mkdir tmp 56 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done 57 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib 58 ls tmp/*.o | sort -t/ +1 > t1 59 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 60 ar ma findiop.o libc.a exit.o 61 ar ma exit.o libc.a fakcu.o 62 rm -f t1 tmp/* 63 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done 64 cd tmp; ar x ../net/${HOSTLOOKUP}/hostlib_p 65 ls tmp/*.o | sort -t/ +1 > t1 66 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 67 ar ma findiop.o libc_p.a exit.o 68 ar ma exit.o libc_p.a fakcu.o 69 rm -rf t1 tmp 70 71${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}: FRC 72 cd $@; make ${MFLAGS} DEFS=${DEFS} 73 74FRC: 75 76install: 77 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a 78 ranlib ${DESTDIR}/lib/libc.a 79 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a 80 ranlib ${DESTDIR}/usr/lib/libc_p.a 81 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install 82 83tags: 84 for i in ${ALL}; do \ 85 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ 86 cd net/${HOSTLOOKUP}; \ 87 make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags 88 done 89 90clean: 91 for i in ${MACHINE}/csu ${ALL} net/${HOSTLOOKUP}; \ 92 do (cd $$i; make ${MFLAGS} clean); done 93 rm -f t1 tmp/*.o 94 -rmdir tmp 95