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