get rid of conflicting definitions from param.h
[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#
c8b1460c 6# @(#)Makefile 4.11 (Berkeley) %G%
8c7be43d 7#
4e22c84a
BJ
8# The system has two monitoring schemes, utilizing either ``prof''
9# or ``gprof''. DFLMON determines the default profiler; mon.o
10# specifies that ``prof'' is the default, gmon.o specifies that
11# ``gprof'' is the default.
12#
13# Machine dependent routines are located in a subtree which parallels
14# the top directories. This subtree is identified by the machine name.
15#
298fecef
BJ
16# Compatibility routines are kept in directories with a prefixing
17# ``compat'' (so they all sort together).
4e22c84a
BJ
18#
19# The C run-time startup code is always machine dependent and expected
20# to be located in ${MACHINE}/csu
29e84943
KM
21#
22DESTDIR=
8c7be43d 23INSTALL=install -m 644
7867d964 24DFLMON= mon.o
4e22c84a 25MACHINE=vax
298fecef 26COMPAT= compat-4.1 compat-sys5
4e22c84a 27ALL= gen inet net stdio ${MACHINE} ${COMPAT}
818c32a5 28TAGSFILE=tags
29e84943 29
4e22c84a 30libc.a libc_p.a: ${MACHINE}/csu ${ALL}
b507d6c0 31 -mkdir tmp
4e22c84a 32 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib); done
29e84943 33 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 34 ar cr libc.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
1b597941 35 ar ma findiop.o libc.a exit.o
c8a54e4e 36 ar ma exit.o libc.a fakcu.o
29e84943 37 rm -f t1 tmp/*
4e22c84a 38 for i in ${ALL}; do (cd tmp; ar x ../$$i/$${i}lib_p); done
29e84943 39 ls tmp/*.o | sort -t/ +1 > t1
4e22c84a 40 ar cr libc_p.a `lorder \`cat t1\` | tsort` ${MACHINE}/csu/${DFLMON}
1b597941 41 ar ma findiop.o libc_p.a exit.o
d92dfcf8 42 ar ma exit.o libc_p.a fakcu.o
29e84943
KM
43 rm -rf t1 tmp
44
4e22c84a
BJ
45${MACHINE}/csu ${ALL}: FRC
46 cd $@; make ${MFLAGS}
29e84943 47
4e22c84a
BJ
48FRC:
49
4e22c84a 50install:
7867d964
SL
51 ${INSTALL} libc.a ${DESTDIR}/lib/libc.a
52 ranlib ${DESTDIR}/lib/libc.a
53 ${INSTALL} libc_p.a ${DESTDIR}/usr/lib/libc_p.a
54 ranlib ${DESTDIR}/usr/lib/libc_p.a
4e22c84a 55 cd ${MACHINE}/csu; make DESTDIR=${DESTDIR} install
818c32a5
SL
56
57tags:
58 for i in ${ALL}; do \
59 (cd $$i; make ${MFLAGS} TAGSFILE=../${TAGSFILE} tags); \
60 done
818c32a5
SL
61
62clean:
63 for i in ${MACHINE}/csu ${ALL}; do (cd $$i; make ${MFLAGS} clean); done
64 rm -f t1 tmp/*.o
65 -rmdir tmp