Commit | Line | Data |
---|---|---|
dda7c879 | 1 | # Makefile 4.17 83/08/19 |
ed4eaf26 | 2 | # |
79854fee | 3 | DESTDIR= |
ed4eaf26 | 4 | CFLAGS= -O |
ed4eaf26 | 5 | |
79854fee KM |
6 | # Programs that live in subdirectories, and have makefiles of their own. |
7 | # | |
7ddb6d53 | 8 | SUBDIR= adb as awk csh diff make sed sh tp |
ed4eaf26 | 9 | |
79854fee KM |
10 | # Shell scripts that need only be installed and are never removed. |
11 | # | |
12 | SCRIPT= false true | |
ed4eaf26 | 13 | |
79854fee KM |
14 | # C programs that live in the current directory and do not need |
15 | # explicit make lines. | |
16 | # | |
d89146d3 | 17 | STD= ar cat cc chgrp chmod cmp date dd df du echo ed expr \ |
d497fe9f | 18 | grep hostid hostname kill ld ln login ls mail mkdir mt nice \ |
d89146d3 | 19 | nm od pagesize passwd pr pwd rm rmail rmdir size strip stty su sync \ |
3e7f9b9e | 20 | tar tee test time wall who write |
ed4eaf26 | 21 | |
79854fee KM |
22 | # Programs that must run setuid to root |
23 | # | |
66a05c49 | 24 | SETUID= chgrp df login mail passwd su |
ed4eaf26 | 25 | |
79854fee KM |
26 | # C programs that live in the current directory and need explicit make lines. |
27 | # | |
3e7f9b9e | 28 | NSTD= ps |
79854fee | 29 | |
3e7f9b9e | 30 | all: ${SUBDIR} ${STD} ${NSTD} cp mv |
79854fee KM |
31 | |
32 | ${SUBDIR}: /tmp | |
33 | cd $@; make ${MFLAGS} | |
34 | ||
3e7f9b9e | 35 | ${STD} mv cp: |
ff17818f | 36 | ${CC} ${CFLAGS} -o $@ $@.c |
79854fee | 37 | |
d497fe9f | 38 | # take care with cp and mv, install uses them |
79854fee | 39 | install: |
5ef6ff74 SL |
40 | install -s cp ${DESTDIR}/bin/newcp; \ |
41 | mv ${DESTDIR}/bin/newcp ${DESTDIR}/bin/cp; | |
56f5b7b8 SL |
42 | rm -f ${DESTDIR}/bin/mv; cp mv ${DESTDIR}/bin/mv; rm -f mv; \ |
43 | strip ${DESTDIR}/bin/mv | |
79854fee KM |
44 | for i in ${SUBDIR}; do \ |
45 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install); done | |
46 | for i in ${SCRIPT}; do (install -c $$i.sh ${DESTDIR}/bin/$$i); done | |
5ef6ff74 | 47 | for i in ${STD} ${NSTD}; do (install -s $$i ${DESTDIR}/bin/$$i); done |
79854fee KM |
48 | for i in ${SETUID}; do (chown root ${DESTDIR}/bin/$$i; \ |
49 | chmod 4755 ${DESTDIR}/bin/$$i); done | |
50 | rm -f ${DESTDIR}/bin/[; ln ${DESTDIR}/bin/test ${DESTDIR}/bin/[ | |
51 | rm -f ${DESTDIR}/bin/e; ln ${DESTDIR}/bin/ed ${DESTDIR}/bin/e | |
52 | ||
53 | clean: | |
54 | rm -f a.out core *.s *.o errs | |
55 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done | |
56 | rm -f ${STD} ${NSTD} expr.c | |
57 | ||
58 | depend: | |
59 | cat </dev/null >x.c | |
60 | for i in ${STD} ${NSTD}; do \ | |
61 | (echo $$i: $$i.c >>makedep; \ | |
62 | /bin/grep '^#[ ]*include' x.c $$i.c | sed \ | |
63 | -e 's,<\(.*\)>,"/usr/include/\1",' \ | |
64 | -e 's/:[^"]*"\([^"]*\)".*/: \1/' \ | |
65 | -e 's/\.c//' >>makedep); done | |
66 | echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep | |
67 | echo '$$r makedep' >>eddep | |
68 | echo 'w' >>eddep | |
69 | cp Makefile Makefile.bak | |
70 | ed - Makefile < eddep | |
71 | rm eddep makedep x.c | |
72 | echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile | |
73 | echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile | |
74 | echo '# see make depend above' >> Makefile | |
75 | ||
76 | # Files listed in ${NSTD} have explicit make lines given below. | |
77 | ||
78 | ps: | |
79 | cc ${CFLAGS} -o ps ps.c -lm | |
80 | ||
81 | # DO NOT DELETE THIS LINE -- make depend uses it | |
82 | ||
83 | ar: ar.c | |
79854fee KM |
84 | ar: /usr/include/sys/types.h |
85 | ar: /usr/include/sys/stat.h | |
72cf2549 BJ |
86 | ar: /usr/include/sys/time.h |
87 | ar: /usr/include/stdio.h | |
79854fee KM |
88 | ar: /usr/include/ar.h |
89 | ar: /usr/include/signal.h | |
90 | cat: cat.c | |
91 | cat: /usr/include/stdio.h | |
92 | cat: /usr/include/sys/types.h | |
93 | cat: /usr/include/sys/stat.h | |
94 | cc: cc.c | |
95 | cc: /usr/include/sys/param.h | |
96 | cc: /usr/include/stdio.h | |
97 | cc: /usr/include/ctype.h | |
98 | cc: /usr/include/signal.h | |
72cf2549 | 99 | cc: /usr/include/sys/dir.h |
79854fee KM |
100 | chgrp: chgrp.c |
101 | chgrp: /usr/include/stdio.h | |
102 | chgrp: /usr/include/ctype.h | |
103 | chgrp: /usr/include/sys/types.h | |
104 | chgrp: /usr/include/sys/stat.h | |
105 | chgrp: /usr/include/grp.h | |
106 | chgrp: /usr/include/pwd.h | |
107 | chmod: chmod.c | |
108 | chmod: /usr/include/stdio.h | |
109 | chmod: /usr/include/sys/types.h | |
110 | chmod: /usr/include/sys/stat.h | |
111 | cmp: cmp.c | |
112 | cmp: /usr/include/stdio.h | |
113 | cmp: /usr/include/ctype.h | |
79854fee KM |
114 | date: date.c |
115 | date: /usr/include/stdio.h | |
72cf2549 | 116 | date: /usr/include/sys/time.h |
79854fee KM |
117 | date: /usr/include/utmp.h |
118 | dd: dd.c | |
119 | dd: /usr/include/stdio.h | |
120 | dd: /usr/include/signal.h | |
121 | df: df.c | |
79854fee KM |
122 | df: /usr/include/sys/param.h |
123 | df: /usr/include/sys/fs.h | |
124 | df: /usr/include/sys/stat.h | |
72cf2549 BJ |
125 | df: /usr/include/stdio.h |
126 | df: /usr/include/fstab.h | |
127 | df: /usr/include/mtab.h | |
79854fee KM |
128 | du: du.c |
129 | du: /usr/include/stdio.h | |
130 | du: /usr/include/sys/param.h | |
131 | du: /usr/include/sys/stat.h | |
72cf2549 | 132 | du: /usr/include/sys/dir.h |
79854fee KM |
133 | echo: echo.c |
134 | echo: /usr/include/stdio.h | |
135 | ed: ed.c | |
136 | ed: /usr/include/signal.h | |
137 | ed: /usr/include/sgtty.h | |
138 | ed: /usr/include/setjmp.h | |
139 | expr: expr.c | |
140 | expr: /usr/include/stdio.h | |
141 | grep: grep.c | |
142 | grep: /usr/include/stdio.h | |
143 | grep: /usr/include/ctype.h | |
56f5b7b8 | 144 | hostid: hostid.c |
79854fee KM |
145 | hostname: hostname.c |
146 | hostname: /usr/include/stdio.h | |
147 | kill: kill.c | |
148 | kill: /usr/include/signal.h | |
149 | kill: /usr/include/ctype.h | |
150 | ld: ld.c | |
151 | ld: /usr/include/sys/types.h | |
152 | ld: /usr/include/signal.h | |
153 | ld: /usr/include/stdio.h | |
154 | ld: /usr/include/ctype.h | |
155 | ld: /usr/include/ar.h | |
156 | ld: /usr/include/a.out.h | |
157 | ld: /usr/include/ranlib.h | |
72cf2549 | 158 | ld: /usr/include/sys/stat.h |
79854fee KM |
159 | ln: ln.c |
160 | ln: /usr/include/stdio.h | |
161 | ln: /usr/include/sys/types.h | |
162 | ln: /usr/include/sys/stat.h | |
56f5b7b8 | 163 | ln: /usr/include/errno.h |
79854fee | 164 | login: login.c |
72cf2549 | 165 | login: /usr/include/sys/param.h |
56f5b7b8 SL |
166 | login: /usr/include/sys/quota.h |
167 | login: /usr/include/sys/stat.h | |
168 | login: /usr/include/sys/time.h | |
169 | login: /usr/include/sys/resource.h | |
79854fee KM |
170 | login: /usr/include/sgtty.h |
171 | login: /usr/include/utmp.h | |
172 | login: /usr/include/signal.h | |
173 | login: /usr/include/pwd.h | |
174 | login: /usr/include/stdio.h | |
79854fee | 175 | login: /usr/include/lastlog.h |
56f5b7b8 | 176 | login: /usr/include/errno.h |
79854fee KM |
177 | ls: ls.c |
178 | ls: /usr/include/sys/param.h | |
179 | ls: /usr/include/sys/stat.h | |
72cf2549 | 180 | ls: /usr/include/sys/dir.h |
79854fee KM |
181 | ls: /usr/include/stdio.h |
182 | ls: /usr/include/sgtty.h | |
183 | ls: /usr/include/pwd.h | |
184 | ls: /usr/include/grp.h | |
185 | ls: /usr/include/utmp.h | |
186 | mail: mail.c | |
187 | mail: /usr/include/ctype.h | |
188 | mail: /usr/include/stdio.h | |
189 | mail: /usr/include/pwd.h | |
190 | mail: /usr/include/utmp.h | |
191 | mail: /usr/include/signal.h | |
192 | mail: /usr/include/sys/types.h | |
193 | mail: /usr/include/sys/stat.h | |
194 | mail: /usr/include/setjmp.h | |
195 | mail: /usr/include/sysexits.h | |
196 | mail: /usr/include/sys/socket.h | |
d89146d3 | 197 | mail: /usr/include/netinet/in.h |
56f5b7b8 | 198 | mail: /usr/include/netdb.h |
79854fee | 199 | mkdir: mkdir.c |
79854fee | 200 | mkdir: /usr/include/stdio.h |
79854fee KM |
201 | mt: mt.c |
202 | mt: /usr/include/stdio.h | |
203 | mt: /usr/include/ctype.h | |
204 | mt: /usr/include/sys/types.h | |
205 | mt: /usr/include/sys/mtio.h | |
206 | mt: /usr/include/sys/ioctl.h | |
df0c1398 SL |
207 | mt: /usr/include/vaxmba/mtreg.h |
208 | mt: /usr/include/vaxmba/htreg.h | |
209 | mt: /usr/include/vaxuba/utreg.h | |
210 | mt: /usr/include/vaxuba/tmreg.h | |
211 | mt: /usr/include/vaxuba/tsreg.h | |
79854fee KM |
212 | nice: nice.c |
213 | nice: /usr/include/stdio.h | |
56f5b7b8 SL |
214 | nice: /usr/include/sys/time.h |
215 | nice: /usr/include/sys/resource.h | |
79854fee KM |
216 | nm: nm.c |
217 | nm: /usr/include/sys/types.h | |
218 | nm: /usr/include/ar.h | |
219 | nm: /usr/include/stdio.h | |
220 | nm: /usr/include/ctype.h | |
221 | nm: /usr/include/a.out.h | |
222 | nm: /usr/include/stab.h | |
72cf2549 | 223 | nm: /usr/include/sys/stat.h |
79854fee KM |
224 | od: od.c |
225 | od: /usr/include/stdio.h | |
56f5b7b8 SL |
226 | od: /usr/include/sys/types.h |
227 | od: /usr/include/sys/stat.h | |
228 | pagesize: pagesize.c | |
79854fee | 229 | passwd: passwd.c |
56f5b7b8 | 230 | passwd: /usr/include/sys/file.h |
79854fee KM |
231 | passwd: /usr/include/stdio.h |
232 | passwd: /usr/include/signal.h | |
233 | passwd: /usr/include/pwd.h | |
56f5b7b8 | 234 | passwd: /usr/include/errno.h |
79854fee KM |
235 | pr: pr.c |
236 | pr: /usr/include/stdio.h | |
237 | pr: /usr/include/signal.h | |
238 | pr: /usr/include/sys/types.h | |
239 | pr: /usr/include/sys/stat.h | |
240 | pwd: pwd.c | |
241 | pwd: /usr/include/stdio.h | |
242 | pwd: /usr/include/sys/param.h | |
79854fee KM |
243 | rm: rm.c |
244 | rm: /usr/include/stdio.h | |
245 | rm: /usr/include/sys/param.h | |
246 | rm: /usr/include/sys/stat.h | |
72cf2549 | 247 | rm: /usr/include/sys/dir.h |
79854fee KM |
248 | rmail: rmail.c |
249 | rmail: /usr/include/stdio.h | |
56f5b7b8 | 250 | rmail: /usr/include/sysexits.h |
79854fee | 251 | rmdir: rmdir.c |
79854fee KM |
252 | rmdir: /usr/include/stdio.h |
253 | size: size.c | |
254 | size: /usr/include/stdio.h | |
255 | size: /usr/include/a.out.h | |
256 | strip: strip.c | |
257 | strip: /usr/include/a.out.h | |
258 | strip: /usr/include/signal.h | |
dda7c879 SL |
259 | strip: /usr/include/stdio.h |
260 | strip: /usr/include/sys/file.h | |
79854fee KM |
261 | stty: stty.c |
262 | stty: /usr/include/stdio.h | |
263 | stty: /usr/include/sgtty.h | |
264 | su: su.c | |
265 | su: /usr/include/stdio.h | |
266 | su: /usr/include/pwd.h | |
72cf2549 BJ |
267 | su: /usr/include/sys/types.h |
268 | su: /usr/include/sys/time.h | |
269 | su: /usr/include/sys/resource.h | |
79854fee KM |
270 | sync: sync.c |
271 | tar: tar.c | |
272 | tar: /usr/include/stdio.h | |
273 | tar: /usr/include/sys/param.h | |
274 | tar: /usr/include/sys/stat.h | |
56f5b7b8 | 275 | tar: /usr/include/sys/dir.h |
79854fee KM |
276 | tar: /usr/include/sys/ioctl.h |
277 | tar: /usr/include/sys/mtio.h | |
72cf2549 | 278 | tar: /usr/include/sys/time.h |
79854fee | 279 | tar: /usr/include/signal.h |
56f5b7b8 | 280 | tar: /usr/include/errno.h |
79854fee KM |
281 | tee: tee.c |
282 | tee: /usr/include/signal.h | |
283 | tee: /usr/include/sys/types.h | |
284 | tee: /usr/include/sys/stat.h | |
285 | tee: /usr/include/errno.h | |
79854fee KM |
286 | test: test.c |
287 | test: /usr/include/stdio.h | |
288 | test: /usr/include/sys/types.h | |
289 | test: /usr/include/sys/stat.h | |
72cf2549 BJ |
290 | time: time.c |
291 | time: /usr/include/stdio.h | |
292 | time: /usr/include/signal.h | |
293 | time: /usr/include/sys/types.h | |
294 | time: /usr/include/sys/time.h | |
295 | time: /usr/include/sys/resource.h | |
79854fee KM |
296 | wall: wall.c |
297 | wall: /usr/include/stdio.h | |
298 | wall: /usr/include/utmp.h | |
72cf2549 | 299 | wall: /usr/include/sys/time.h |
79854fee KM |
300 | wall: /usr/include/signal.h |
301 | who: who.c | |
302 | who: /usr/include/stdio.h | |
303 | who: /usr/include/utmp.h | |
304 | who: /usr/include/pwd.h | |
305 | who: /usr/include/ctype.h | |
306 | write: write.c | |
307 | write: /usr/include/stdio.h | |
308 | write: /usr/include/sys/types.h | |
309 | write: /usr/include/sys/stat.h | |
310 | write: /usr/include/signal.h | |
311 | write: /usr/include/utmp.h | |
72cf2549 | 312 | write: /usr/include/sys/time.h |
79854fee KM |
313 | ps: ps.c |
314 | ps: /usr/include/stdio.h | |
315 | ps: /usr/include/ctype.h | |
316 | ps: /usr/include/nlist.h | |
317 | ps: /usr/include/pwd.h | |
318 | ps: /usr/include/sys/param.h | |
319 | ps: /usr/include/sys/tty.h | |
56f5b7b8 | 320 | ps: /usr/include/sys/dir.h |
79854fee KM |
321 | ps: /usr/include/sys/user.h |
322 | ps: /usr/include/sys/proc.h | |
0bc29a7d | 323 | ps: /usr/include/machine/pte.h |
79854fee KM |
324 | ps: /usr/include/sys/vm.h |
325 | ps: /usr/include/sys/text.h | |
326 | ps: /usr/include/sys/stat.h | |
56f5b7b8 | 327 | ps: /usr/include/sys/mbuf.h |
79854fee | 328 | ps: /usr/include/math.h |
dda7c879 SL |
329 | # DEPENDENCIES MUST END AT END OF FILE |
330 | # IF YOU PUT STUFF HERE IT WILL GO AWAY | |
331 | # see make depend above |