Commit | Line | Data |
---|---|---|
1f312495 DF |
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 | # | |
db9cd0b2 | 6 | # @(#)Makefile 5.24 (Berkeley) %G% |
ed4eaf26 | 7 | # |
79854fee | 8 | DESTDIR= |
ed4eaf26 | 9 | CFLAGS= -O |
6588680f | 10 | LIBC= /lib/libc.a |
ed4eaf26 | 11 | |
79854fee KM |
12 | # Programs that live in subdirectories, and have makefiles of their own. |
13 | # | |
6588680f | 14 | SUBDIR= adb as awk csh diff make passwd sed sh tp |
ed4eaf26 | 15 | |
79854fee KM |
16 | # Shell scripts that need only be installed and are never removed. |
17 | # | |
18 | SCRIPT= false true | |
ed4eaf26 | 19 | |
0981a644 KB |
20 | # C source that lives in the current directory |
21 | # | |
6588680f KB |
22 | SRCS= ar.c cat.c cc.c chgrp.c chmod.c cmp.c cp.c date.c dd.c df.c du.c \ |
23 | echo.c ed.c expr.c hostid.c hostname.c kill.c ld.c ln.c login.c \ | |
24 | ls.c machine.c mail.c mkdir.c mt.c mv.c nice.c nm.c od.c pagesize.c \ | |
25 | pr.c ps.c pwd.c rcp.c rm.c rmail.c rmdir.c size.c strip.c \ | |
26 | stty.c su.c sync.c tar.c tee.c test.c time.c wall.c who.c write.c | |
0981a644 | 27 | |
79854fee KM |
28 | # C programs that live in the current directory and do not need |
29 | # explicit make lines. | |
30 | # | |
6588680f KB |
31 | STD= ar cat cc chgrp chmod cmp cp date dd du echo ed hostid \ |
32 | hostname kill ld ln ls machine mkdir mt mv nice nm od pagesize pr \ | |
33 | pwd rm rmail rmdir size strip stty sync tar tee test time who | |
ed4eaf26 | 34 | |
e4cc2084 RC |
35 | # C programs that live in the current directory and need explicit make lines. |
36 | # | |
0981a644 | 37 | NSTD= expr ps |
79854fee | 38 | |
0981a644 | 39 | # Programs that get installed with special permissions |
c89291e2 | 40 | # |
6588680f | 41 | PERM= df login mail rcp su wall write |
c89291e2 | 42 | |
6588680f | 43 | all: ${SUBDIR} ${STD} ${NSTD} ${PERM} |
79854fee | 44 | |
7e2bf8ce | 45 | ${SUBDIR}: FRC |
79854fee KM |
46 | cd $@; make ${MFLAGS} |
47 | ||
6588680f | 48 | ${STD} ${PERM}: ${LIBC} |
ff17818f | 49 | ${CC} ${CFLAGS} -o $@ $@.c |
79854fee | 50 | |
0981a644 | 51 | install: FRC |
bcefba14 | 52 | -for i in ${SUBDIR}; do \ |
79854fee | 53 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done |
0981a644 KB |
54 | -for i in ${SCRIPT}; do \ |
55 | (install -c -o bin -g bin -m 755 $$i.sh ${DESTDIR}/bin/$$i); \ | |
56 | done | |
6588680f | 57 | install -o bin -g bin -m 755 ${STD} ${DESTDIR}/bin |
0981a644 | 58 | # programs that run with special permissions |
851091a0 KB |
59 | install -s -o root -g bin -m 4755 login ${DESTDIR}/bin/login |
60 | install -s -o root -g bin -m 4755 mail ${DESTDIR}/bin/mail | |
851091a0 KB |
61 | install -s -o root -g bin -m 4755 rcp ${DESTDIR}/bin/rcp |
62 | install -s -o root -g bin -m 4755 su ${DESTDIR}/bin/su | |
0981a644 KB |
63 | install -s -o bin -g operator -m 2755 df ${DESTDIR}/bin/df |
64 | install -s -o bin -g kmem -m 2755 ps ${DESTDIR}/bin/ps | |
65 | install -s -o bin -g tty -m 2755 wall ${DESTDIR}/bin/wall | |
66 | install -s -o bin -g tty -m 2755 write ${DESTDIR}/bin/write | |
67 | install -s -o bin -g bin -m 755 expr ${DESTDIR}/bin/expr | |
68 | # directories and links | |
79854fee KM |
69 | rm -f ${DESTDIR}/bin/[; ln ${DESTDIR}/bin/test ${DESTDIR}/bin/[ |
70 | rm -f ${DESTDIR}/bin/e; ln ${DESTDIR}/bin/ed ${DESTDIR}/bin/e | |
71 | ||
0981a644 | 72 | clean: FRC |
6588680f | 73 | rm -f ${STD} ${NSTD} ${PERM} expr.c a.out core *.s *.o errs |
79854fee | 74 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done |
79854fee | 75 | |
6588680f | 76 | depend: ldepend |
5d3e745d | 77 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done |
6588680f KB |
78 | |
79 | ldepend: expr.c FRC | |
851091a0 | 80 | mkdep -p ${CFLAGS} ${SRCS} |
0981a644 KB |
81 | |
82 | FRC: | |
79854fee KM |
83 | |
84 | # Files listed in ${NSTD} have explicit make lines given below. | |
85 | ||
43ccba50 | 86 | expr: expr.o |
0981a644 | 87 | ${CC} ${CFLAGS} -o $@ expr.o |
43ccba50 | 88 | |
79854fee | 89 | ps: |
0981a644 KB |
90 | ${CC} ${CFLAGS} -o $@ ps.c -lm |
91 | ||
92 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
93 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
94 | ||
851091a0 | 95 | ar: ar.c /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
96 | ar: /usr/include/signal.h /usr/include/machine/trap.h |
97 | ar: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
98 | ar: /usr/include/sys/time.h /usr/include/time.h /usr/include/stdio.h | |
99 | ar: /usr/include/ar.h | |
851091a0 KB |
100 | cat: cat.c /usr/include/stdio.h /usr/include/sys/types.h |
101 | cat: /usr/include/sys/stat.h | |
102 | cc: cc.c /usr/include/sys/param.h /usr/include/sys/types.h | |
6588680f KB |
103 | cc: /usr/include/signal.h /usr/include/machine/trap.h |
104 | cc: /usr/include/machine/machparam.h /usr/include/stdio.h /usr/include/ctype.h | |
105 | cc: /usr/include/signal.h /usr/include/sys/dir.h | |
851091a0 KB |
106 | chgrp: chgrp.c /usr/include/stdio.h /usr/include/ctype.h |
107 | chgrp: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/grp.h | |
108 | chgrp: /usr/include/pwd.h /usr/include/sys/dir.h | |
109 | chmod: chmod.c /usr/include/stdio.h /usr/include/sys/types.h | |
110 | chmod: /usr/include/sys/stat.h /usr/include/sys/dir.h | |
111 | cmp: cmp.c /usr/include/sys/param.h /usr/include/sys/types.h | |
6588680f KB |
112 | cmp: /usr/include/signal.h /usr/include/machine/trap.h |
113 | cmp: /usr/include/machine/machparam.h /usr/include/sys/file.h | |
114 | cmp: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h | |
115 | cp: cp.c /usr/include/stdio.h /usr/include/sys/param.h /usr/include/sys/types.h | |
116 | cp: /usr/include/signal.h /usr/include/machine/trap.h | |
117 | cp: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
118 | cp: /usr/include/sys/dir.h /usr/include/sys/time.h /usr/include/time.h | |
851091a0 | 119 | date: date.c /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
120 | date: /usr/include/signal.h /usr/include/machine/trap.h |
121 | date: /usr/include/machine/machparam.h /usr/include/sys/time.h | |
122 | date: /usr/include/time.h /usr/include/sys/file.h /usr/include/errno.h | |
123 | date: /usr/include/syslog.h /usr/include/utmp.h /usr/include/tzfile.h | |
124 | date: /usr/include/stdio.h /usr/include/ctype.h /usr/include/strings.h | |
125 | date: /usr/include/sys/socket.h /usr/include/netinet/in.h /usr/include/netdb.h | |
851091a0 KB |
126 | date: /usr/include/protocols/timed.h |
127 | dd: dd.c /usr/include/sys/file.h /usr/include/stdio.h /usr/include/signal.h | |
6588680f KB |
128 | dd: /usr/include/machine/trap.h |
129 | df: df.c /usr/include/sys/param.h /usr/include/sys/types.h | |
130 | df: /usr/include/signal.h /usr/include/machine/trap.h | |
131 | df: /usr/include/machine/machparam.h /usr/include/sys/fs.h | |
132 | df: /usr/include/sys/stat.h /usr/include/errno.h /usr/include/stdio.h | |
133 | df: /usr/include/fstab.h /usr/include/mtab.h | |
851091a0 | 134 | du: du.c /usr/include/stdio.h /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
135 | du: /usr/include/signal.h /usr/include/machine/trap.h |
136 | du: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
137 | du: /usr/include/sys/dir.h | |
851091a0 | 138 | echo: echo.c /usr/include/stdio.h |
6588680f KB |
139 | ed: ed.c /usr/include/signal.h /usr/include/machine/trap.h /usr/include/sgtty.h |
140 | ed: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
141 | ed: /usr/include/sys/ttydev.h /usr/include/setjmp.h | |
851091a0 | 142 | expr: expr.c /usr/include/stdio.h |
851091a0 KB |
143 | hostid: hostid.c /usr/include/sys/types.h /usr/include/stdio.h |
144 | hostid: /usr/include/ctype.h /usr/include/netdb.h | |
145 | hostname: hostname.c /usr/include/stdio.h | |
6588680f KB |
146 | kill: kill.c /usr/include/signal.h /usr/include/machine/trap.h |
147 | kill: /usr/include/ctype.h | |
851091a0 | 148 | ld: ld.c /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
149 | ld: /usr/include/signal.h /usr/include/machine/trap.h |
150 | ld: /usr/include/machine/machparam.h /usr/include/signal.h /usr/include/stdio.h | |
151 | ld: /usr/include/ctype.h /usr/include/ar.h /usr/include/a.out.h | |
152 | ld: /usr/include/sys/exec.h /usr/include/ranlib.h /usr/include/sys/stat.h | |
153 | ld: /usr/include/sys/file.h | |
851091a0 KB |
154 | ln: ln.c /usr/include/stdio.h /usr/include/sys/types.h /usr/include/sys/stat.h |
155 | ln: /usr/include/errno.h | |
6588680f KB |
156 | login: login.c /usr/include/sys/param.h /usr/include/sys/types.h |
157 | login: /usr/include/signal.h /usr/include/machine/trap.h | |
158 | login: /usr/include/machine/machparam.h /usr/include/sys/quota.h | |
159 | login: /usr/include/sys/stat.h /usr/include/sys/time.h /usr/include/time.h | |
160 | login: /usr/include/sys/resource.h /usr/include/sys/file.h /usr/include/sgtty.h | |
161 | login: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
162 | login: /usr/include/sys/ttydev.h /usr/include/utmp.h /usr/include/signal.h | |
163 | login: /usr/include/pwd.h /usr/include/stdio.h /usr/include/lastlog.h | |
164 | login: /usr/include/errno.h /usr/include/ttyent.h /usr/include/syslog.h | |
165 | login: /usr/include/grp.h | |
851091a0 | 166 | ls: ls.c /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
167 | ls: /usr/include/signal.h /usr/include/machine/trap.h |
168 | ls: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
169 | ls: /usr/include/sys/dir.h /usr/include/stdio.h /usr/include/sgtty.h | |
170 | ls: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
851091a0 KB |
171 | ls: /usr/include/sys/ttydev.h /usr/include/pwd.h /usr/include/grp.h |
172 | ls: /usr/include/utmp.h | |
173 | machine: machine.c /usr/include/sys/param.h /usr/include/sys/types.h | |
6588680f KB |
174 | machine: /usr/include/signal.h /usr/include/machine/trap.h |
175 | machine: /usr/include/machine/machparam.h | |
176 | mail: mail.c /usr/include/sys/param.h /usr/include/sys/types.h | |
177 | mail: /usr/include/signal.h /usr/include/machine/trap.h | |
178 | mail: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
179 | mail: /usr/include/sys/file.h /usr/include/ctype.h /usr/include/stdio.h | |
180 | mail: /usr/include/pwd.h /usr/include/utmp.h /usr/include/signal.h | |
181 | mail: /usr/include/setjmp.h /usr/include/sysexits.h /usr/include/sys/socket.h | |
182 | mail: /usr/include/netinet/in.h /usr/include/netdb.h | |
851091a0 KB |
183 | mkdir: mkdir.c /usr/include/stdio.h |
184 | mt: mt.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/sys/types.h | |
185 | mt: /usr/include/sys/mtio.h /usr/include/sys/ioctl.h | |
186 | mt: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
187 | mt: /usr/include/tahoevba/cyreg.h | |
6588680f KB |
188 | mv: mv.c /usr/include/sys/param.h /usr/include/sys/types.h |
189 | mv: /usr/include/signal.h /usr/include/machine/trap.h | |
190 | mv: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
191 | mv: /usr/include/sys/time.h /usr/include/time.h /usr/include/stdio.h | |
192 | mv: /usr/include/sys/dir.h /usr/include/errno.h /usr/include/signal.h | |
851091a0 KB |
193 | nice: nice.c /usr/include/stdio.h /usr/include/sys/time.h /usr/include/time.h |
194 | nice: /usr/include/sys/resource.h | |
195 | nm: nm.c /usr/include/sys/types.h /usr/include/sys/file.h /usr/include/ar.h | |
196 | nm: /usr/include/stdio.h /usr/include/ctype.h /usr/include/a.out.h | |
197 | nm: /usr/include/sys/exec.h /usr/include/stab.h /usr/include/ranlib.h | |
198 | od: od.c /usr/include/stdio.h /usr/include/sys/types.h /usr/include/sys/stat.h | |
199 | pagesize: pagesize.c | |
6588680f KB |
200 | pr: pr.c /usr/include/stdio.h /usr/include/signal.h /usr/include/machine/trap.h |
201 | pr: /usr/include/sys/types.h /usr/include/sys/stat.h | |
851091a0 KB |
202 | ps: ps.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/a.out.h |
203 | ps: /usr/include/sys/exec.h /usr/include/pwd.h /usr/include/sys/param.h | |
6588680f | 204 | ps: /usr/include/sys/types.h /usr/include/signal.h /usr/include/machine/trap.h |
851091a0 KB |
205 | ps: /usr/include/machine/machparam.h /usr/include/sys/ioctl.h |
206 | ps: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
207 | ps: /usr/include/sys/tty.h /usr/include/sys/ttychars.h | |
208 | ps: /usr/include/sys/ttydev.h /usr/include/sys/dir.h /usr/include/sys/user.h | |
209 | ps: /usr/include/machine/pcb.h /usr/include/sys/dmap.h /usr/include/sys/time.h | |
210 | ps: /usr/include/time.h /usr/include/sys/resource.h /usr/include/sys/namei.h | |
211 | ps: /usr/include/sys/uio.h /usr/include/errno.h /usr/include/sys/proc.h | |
212 | ps: /usr/include/machine/pte.h /usr/include/sys/vm.h /usr/include/sys/vmparam.h | |
213 | ps: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h | |
214 | ps: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h | |
215 | ps: /usr/include/sys/text.h /usr/include/sys/stat.h /usr/include/sys/mbuf.h | |
216 | ps: /usr/include/math.h /usr/include/errno.h /usr/include/utmp.h | |
217 | pwd: pwd.c /usr/include/stdio.h /usr/include/sys/param.h | |
6588680f | 218 | pwd: /usr/include/sys/types.h /usr/include/signal.h /usr/include/machine/trap.h |
851091a0 | 219 | pwd: /usr/include/machine/machparam.h |
6588680f KB |
220 | rcp: rcp.c /usr/include/sys/param.h /usr/include/sys/types.h |
221 | rcp: /usr/include/signal.h /usr/include/machine/trap.h | |
222 | rcp: /usr/include/machine/machparam.h /usr/include/sys/file.h | |
223 | rcp: /usr/include/sys/stat.h /usr/include/sys/time.h /usr/include/time.h | |
224 | rcp: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
225 | rcp: /usr/include/sys/ttydev.h /usr/include/netinet/in.h /usr/include/stdio.h | |
226 | rcp: /usr/include/signal.h /usr/include/pwd.h /usr/include/ctype.h | |
227 | rcp: /usr/include/netdb.h /usr/include/errno.h /usr/include/sys/dir.h | |
851091a0 | 228 | rm: rm.c /usr/include/stdio.h /usr/include/sys/param.h /usr/include/sys/types.h |
6588680f KB |
229 | rm: /usr/include/signal.h /usr/include/machine/trap.h |
230 | rm: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
231 | rm: /usr/include/sys/dir.h /usr/include/sys/file.h | |
851091a0 KB |
232 | rmail: rmail.c /usr/include/stdio.h /usr/include/sysexits.h |
233 | rmdir: rmdir.c /usr/include/stdio.h | |
234 | size: size.c /usr/include/stdio.h /usr/include/a.out.h /usr/include/sys/exec.h | |
6588680f KB |
235 | strip: strip.c /usr/include/a.out.h /usr/include/sys/exec.h |
236 | strip: /usr/include/signal.h /usr/include/machine/trap.h /usr/include/stdio.h | |
237 | strip: /usr/include/sys/file.h | |
851091a0 KB |
238 | stty: stty.c /usr/include/stdio.h /usr/include/sys/ioctl.h |
239 | stty: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
6588680f KB |
240 | su: su.c /usr/include/stdio.h /usr/include/pwd.h /usr/include/grp.h |
241 | su: /usr/include/syslog.h /usr/include/sys/types.h /usr/include/sys/time.h | |
242 | su: /usr/include/time.h /usr/include/sys/resource.h | |
851091a0 KB |
243 | sync: sync.c |
244 | tar: tar.c /usr/include/stdio.h /usr/include/sys/param.h | |
6588680f | 245 | tar: /usr/include/sys/types.h /usr/include/signal.h /usr/include/machine/trap.h |
851091a0 KB |
246 | tar: /usr/include/machine/machparam.h /usr/include/sys/stat.h |
247 | tar: /usr/include/sys/dir.h /usr/include/sys/ioctl.h | |
248 | tar: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
249 | tar: /usr/include/sys/mtio.h /usr/include/sys/time.h /usr/include/time.h | |
250 | tar: /usr/include/signal.h /usr/include/errno.h /usr/include/fcntl.h | |
6588680f KB |
251 | tee: tee.c /usr/include/signal.h /usr/include/machine/trap.h |
252 | tee: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/errno.h | |
851091a0 KB |
253 | test: test.c /usr/include/stdio.h /usr/include/sys/types.h |
254 | test: /usr/include/sys/stat.h | |
255 | time: time.c /usr/include/stdio.h /usr/include/signal.h | |
6588680f KB |
256 | time: /usr/include/machine/trap.h /usr/include/sys/types.h |
257 | time: /usr/include/sys/time.h /usr/include/time.h /usr/include/sys/resource.h | |
258 | wall: wall.c /usr/include/stdio.h /usr/include/utmp.h /usr/include/errno.h | |
259 | wall: /usr/include/signal.h /usr/include/machine/trap.h /usr/include/sys/time.h | |
260 | wall: /usr/include/time.h /usr/include/fcntl.h /usr/include/sys/types.h | |
261 | wall: /usr/include/sys/stat.h | |
851091a0 KB |
262 | who: who.c /usr/include/stdio.h /usr/include/utmp.h /usr/include/pwd.h |
263 | who: /usr/include/ctype.h | |
6588680f KB |
264 | write: write.c /usr/include/stdio.h /usr/include/ctype.h |
265 | write: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/signal.h | |
266 | write: /usr/include/machine/trap.h /usr/include/utmp.h /usr/include/sys/time.h | |
267 | write: /usr/include/time.h | |
0981a644 KB |
268 | |
269 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |