Commit | Line | Data |
---|---|---|
ca67e7b4 C |
1 | # |
2 | # Copyright (c) 1987 Regents of the University of California. | |
3 | # All rights reserved. The Berkeley software License Agreement | |
4 | # specifies the terms and conditions for redistribution. | |
5 | # | |
6 | # @(#)Makefile 4.43.1.1 (Berkeley) 6/8/88 | |
9e78675a C |
7 | # |
8 | DESTDIR= | |
9 | CFLAGS= -O | |
ca67e7b4 | 10 | LIBC= /lib/libc.a |
9e78675a C |
11 | |
12 | # Programs that live in subdirectories, and have makefiles of their own. | |
13 | # | |
14 | SUBDIR= at calendar dc diction diff3 efl eqn f77 find graph learn lex lint \ | |
ca67e7b4 | 15 | m4 plot prof ratfor refer roff spell struct tbl tip uucp xsend yacc |
9e78675a C |
16 | |
17 | # Shell scripts that need only be installed and are never removed. | |
18 | # | |
ca67e7b4 C |
19 | SCRIPT= lorder mkdep nohup |
20 | ||
21 | # C source that lives in the current directory | |
22 | # | |
23 | SRCS= ar11.c basename.c bc.c cal.c cb.c checkeq.c col.c comm.c crypt.c \ | |
24 | deroff.c file.c install.c join.c look.c mesg.c ptx.c \ | |
25 | ranlib.c rev.c sleep.c sort.c spline.c split.c sum.c tabs.c \ | |
26 | tc.c tk.c touch.c tr.c tsort.c tty.c uniq.c units.c | |
9e78675a C |
27 | |
28 | # C programs that live in the current directory and do not need | |
29 | # explicit make lines. | |
30 | # | |
ca67e7b4 C |
31 | STD= ar11 basename bc cal cb checkeq col comm crypt deroff \ |
32 | file join look mesg ptx ranlib rev sleep sort spline split \ | |
33 | sum tabs tc tk touch tr tsort tty uniq units | |
9e78675a C |
34 | |
35 | # C programs that live in the current directory and need explicit make lines. | |
9e78675a | 36 | # |
ca67e7b4 | 37 | NSTD= xinstall |
9e78675a | 38 | |
ca67e7b4 | 39 | # Programs that get installed with special permissions |
9e78675a | 40 | # |
ca67e7b4 | 41 | PERM= iostat |
9e78675a | 42 | |
ca67e7b4 | 43 | all: ${SUBDIR} ${STD} ${PERM} ${NSTD} |
9e78675a C |
44 | |
45 | ${SUBDIR}: FRC | |
46 | cd $@; make ${MFLAGS} | |
47 | ||
ca67e7b4 C |
48 | bc: bc.c ${LIBC} |
49 | ${STD} ${PERM}: ${LIBC} | |
9e78675a C |
50 | ${CC} ${CFLAGS} -o $@ $@.c |
51 | ||
ca67e7b4 | 52 | install: FRC |
9e78675a C |
53 | -for i in ${SUBDIR}; do \ |
54 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done | |
55 | -for i in ${SCRIPT}; do \ | |
ca67e7b4 C |
56 | (install -c -o bin -g bin -m 555 $$i.sh ${DESTDIR}/usr/bin/$$i); done |
57 | install -s -o bin -g bin -m 755 ${STD} ${DESTDIR}/usr/bin | |
58 | install -s -o bin -g bin -m 755 install ${DESTDIR}/usr/bin/install | |
59 | install -s -o bin -g kmem -m 2755 iostat ${DESTDIR}/usr/bin/iostat | |
60 | install -c -o bin -g bin -m 755 units.lib ${DESTDIR}/usr/lib/units | |
61 | ||
62 | clean: FRC | |
9e78675a | 63 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done |
ca67e7b4 C |
64 | rm -f a.out core *.s *.o bc.c y.tab.c install ${STD} ${NSTD} ${PERM} |
65 | ||
66 | depend: ldepend | |
67 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done | |
68 | ||
69 | ldepend: ${SRCS} FRC | |
70 | mkdep -p ${CFLAGS} ${SRCS} | |
71 | ||
72 | FRC: | |
9e78675a C |
73 | |
74 | # Files listed in ${NSTD} have explicit make lines given below. | |
75 | ||
ca67e7b4 C |
76 | xinstall: |
77 | ${CC} ${CFLAGS} install.c -o install | |
78 | ||
79 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
80 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
9e78675a | 81 | |
ca67e7b4 C |
82 | ar11: ar11.c /usr/include/signal.h /usr/include/machine/trap.h |
83 | ar11: /usr/include/stdio.h /usr/include/sys/types.h /usr/include/sys/stat.h | |
84 | basename: basename.c | |
85 | bc: bc.c /usr/include/stdio.h /usr/include/varargs.h | |
86 | cal: cal.c /usr/include/sys/types.h /usr/include/time.h /usr/include/stdio.h | |
9e78675a C |
87 | cb: cb.c /usr/include/stdio.h |
88 | checkeq: checkeq.c /usr/include/stdio.h | |
89 | col: col.c /usr/include/stdio.h | |
90 | comm: comm.c /usr/include/stdio.h | |
91 | crypt: crypt.c /usr/include/stdio.h | |
92 | deroff: deroff.c /usr/include/stdio.h | |
ca67e7b4 C |
93 | file: file.c /usr/include/sys/param.h /usr/include/sys/types.h |
94 | file: /usr/include/signal.h /usr/include/machine/trap.h | |
95 | file: /usr/include/machine/machparam.h /usr/include/machine/endian.h | |
96 | file: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h | |
97 | file: /usr/include/a.out.h /usr/include/sys/exec.h | |
98 | install: install.c /usr/include/sys/param.h /usr/include/sys/types.h | |
99 | install: /usr/include/signal.h /usr/include/machine/trap.h | |
100 | install: /usr/include/machine/machparam.h /usr/include/machine/endian.h | |
101 | install: /usr/include/sys/stat.h /usr/include/sys/file.h /usr/include/a.out.h | |
102 | install: /usr/include/sys/exec.h /usr/include/grp.h /usr/include/pwd.h | |
103 | install: /usr/include/stdio.h /usr/include/ctype.h | |
9e78675a | 104 | join: join.c /usr/include/stdio.h |
ca67e7b4 C |
105 | look: look.c /usr/include/sys/types.h /usr/include/sys/file.h |
106 | look: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h | |
107 | mesg: mesg.c /usr/include/sys/types.h /usr/include/sys/stat.h | |
108 | mesg: /usr/include/stdio.h | |
9e78675a | 109 | ptx: ptx.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h |
ca67e7b4 | 110 | ptx: /usr/include/machine/trap.h |
9e78675a C |
111 | ranlib: ranlib.c /usr/include/sys/types.h /usr/include/ar.h |
112 | ranlib: /usr/include/ranlib.h /usr/include/a.out.h /usr/include/sys/exec.h | |
113 | ranlib: /usr/include/stdio.h | |
114 | rev: rev.c /usr/include/stdio.h | |
ca67e7b4 C |
115 | sleep: sleep.c /usr/include/stdio.h |
116 | sort: sort.c /usr/include/sys/param.h /usr/include/sys/types.h | |
117 | sort: /usr/include/signal.h /usr/include/machine/trap.h | |
118 | sort: /usr/include/machine/machparam.h /usr/include/machine/endian.h | |
119 | sort: /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h | |
120 | sort: /usr/include/sys/stat.h | |
9e78675a | 121 | spline: spline.c /usr/include/stdio.h /usr/include/math.h |
ca67e7b4 C |
122 | split: split.c /usr/include/sys/param.h /usr/include/sys/types.h |
123 | split: /usr/include/signal.h /usr/include/machine/trap.h | |
124 | split: /usr/include/machine/machparam.h /usr/include/machine/endian.h | |
125 | split: /usr/include/sys/file.h /usr/include/stdio.h /usr/include/ctype.h | |
9e78675a C |
126 | sum: sum.c /usr/include/stdio.h |
127 | tabs: tabs.c /usr/include/stdio.h /usr/include/sgtty.h /usr/include/sys/ioctl.h | |
128 | tabs: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
ca67e7b4 C |
129 | tc: tc.c /usr/include/signal.h /usr/include/machine/trap.h /usr/include/stdio.h |
130 | tk: tk.c /usr/include/stdio.h /usr/include/signal.h /usr/include/machine/trap.h | |
9e78675a | 131 | touch: touch.c /usr/include/stdio.h /usr/include/sys/types.h |
ca67e7b4 | 132 | touch: /usr/include/sys/file.h /usr/include/sys/stat.h |
9e78675a C |
133 | tr: tr.c /usr/include/stdio.h |
134 | tsort: tsort.c /usr/include/stdio.h | |
ca67e7b4 | 135 | tty: tty.c /usr/include/stdio.h |
9e78675a C |
136 | uniq: uniq.c /usr/include/stdio.h /usr/include/ctype.h |
137 | units: units.c /usr/include/stdio.h | |
ca67e7b4 C |
138 | |
139 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |