1# 2# Copyright (c) 1988 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that this notice is preserved and that due credit is given 7# to the University of California at Berkeley. The name of the University 8# may not be used to endorse or promote products derived from this 9# software without specific prior written permission. This software 10# is provided ``as is'' without express or implied warranty. 11# 12# @(#)Makefile 4.31 (Berkeley) 05/24/88 13# 14# Compatibility routines are kept in directories with a prefixing 15# ``compat'' (so they all sort together). 16# 17# The C run-time startup code is always machine dependent and expected 18# to be located in ${MACHINE}/csu 19# 20# There are two possible methods of doing host name look up. They are 21# to use the name server or /etc/hosts. HOSTLOOKUP defines which method 22# is to be compiled into libc : 23# 24# defining HOSTLOOKUP to be "named", compiles the 25# host lookup routines that use the BIND name server. 26# 27# defining HOSTLOOKUP to be "hosttable", compiles 28# the host lookup routines that use /etc/hosts. 29# 30#HOSTLOOKUP= hosttable 31HOSTLOOKUP= named 32# 33# The system has two monitoring schemes, utilizing either ``prof'' 34# or ``gprof''. DFLMON determines the default profiler; mon.o 35# specifies that ``prof'' is the default, gmon.o specifies that 36# ``gprof'' is the default. 37#DFLMON= gmon.o 38DFLMON= mon.o 39# 40# All library object contain sccsid strings by default; they may be 41# excluded as a space-saving measure. To produce a library that does 42# not contain these strings, remove -DLIBC_SCCS and -DSYSLIBC_SCCS 43# from DEFS below. To remove these strings from just the system call 44# stubs, remove -DSYSLIBC_SCCS from DEFS below. 45#DEFS= 46DEFS="-DLIBC_SCCS -DSYSLIBC_SCCS" 47 48ALL= compat-4.1 compat-4.1/compat-4.1.${MACHINE} compat-4.3 \ 49 compat-sys5 gen gen/gen.${MACHINE} inet net net/net.${MACHINE} \ 50 net/${HOSTLOOKUP} ns stdio stdio/stdio.${MACHINE} \ 51 ${MACHINE}/csu ${MACHINE}/sys 52SUBDIR= ${ALL} net/hosttable net/named 53ONE= compat-4.1 compat-4.3 compat-sys5 gen inet net ns stdio 54TWO= compat-4.1/compat-4.1.${MACHINE} gen/gen.${MACHINE} \ 55 net/net.${MACHINE} net/${HOSTLOOKUP} stdio/stdio.${MACHINE} \ 56 ${MACHINE}/csu ${MACHINE}/sys 57TAGSFILE=tags 58 59libc.a libc_p.a: mkdir ${ALL} 60 ls library/*.o | sort -t/ +1 > t1 61 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 62 ar ma findiop.o libc.a exit.o 63 ar ma exit.o libc.a fakcu.o 64 ls profiled/*.o | sort -t/ +1 > t1 65 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON} 66 ar ma findiop.o libc_p.a exit.o 67 ar ma exit.o libc_p.a fakcu.o 68 rm -rf t1 library profiled 69 70mkdir: FRC 71 rm -rf library profiled 72 mkdir library profiled 73 74${ALL}: FRC 75 cd $@; make ${MFLAGS} DEFS=${DEFS} link 76 77install: 78 install -o bin -g bin -m 644 libc.a ${DESTDIR}/lib/libc.a 79 ranlib ${DESTDIR}/lib/libc.a 80 install -o bin -g bin -m 644 libc_p.a ${DESTDIR}/usr/lib/libc_p.a 81 ranlib ${DESTDIR}/usr/lib/libc_p.a 82 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install 83 84tags: 85 for i in ${ONE}; do \ 86 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \ 87 done 88 for i in ${TWO}; do \ 89 (cd $$i; make ${MFLAGS} TAGSFILE=../../${TAGSFILE} tags); \ 90 done 91 sort -o ${TAGSFILE} ${TAGSFILE} 92 93clean: 94 for i in ${SUBDIR}; \ 95 do (cd $$i; make ${MFLAGS} clean); done 96 rm -rf libc.a libc_p.a library profiled 97 98depend: 99 for i in ${SUBDIR}; \ 100 do (cd $$i; make ${MFLAGS} DEFS=${DEFS} depend); done 101 102FRC: 103 104