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