xref: /original-bsd/sys/vax/stand/Makefile (revision 100ae74e)
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#
6#	@(#)Makefile	7.7 (Berkeley) 01/28/88
7#
8DESTDIR=/
9INCPATH=-I. -I../h
10CFLAGS=	-O ${COPTS}
11COPTS=	${INCPATH} -DSTANDALONE -DCOMPAT_42 \
12	-DVAX8600 -DVAX780 -DVAX750 -DVAX730 -DVAX630
13730OPTS=-O ${INCPATH} -DSTANDALONE -DCOMPAT_42 -DVAX730
14RELOC=	70000
15
16SRCS=	boot.c bootxx.c format.c copy.c drtest.c \
17	sys.c conf.c prf.c machdep.c \
18	autoconf.c hp.c hpmaptype.c ht.c idc.c mba.c mt.c rk.c \
19	rl.c tm.c tmscp.c ts.c up.c upmaptype.c uba.c uda.c ut.c \
20	drtest.c format.c ../vax/dkbad.c
21DUMMIES= confxx.c
22DRIVERS=autoconf.o hp.o hpmaptype.o ht.o idc.o mba.o mt.o \
23	rk.o rl.o tm.o tmscp.o ts.o \
24	up.o upmaptype.o uba.o uda.o ut.o
25# These drivers don't have ecc correction and bad sector forwarding;
26# they are placed in the file system boot area for 750's.  If your
27# root has bad sectors you can try and squeeze the newer drivers in...
28ODRIVERS=sm_hp.o sm_up.o
29LIBSA=	libsa.a
30
31ALL=	boot tpboot copy tpcopy \
32	format tpformat drtest boothp boothk bootup bootra bootrl \
33	730boot 730copy 730format 730drtest
34
35all: ${ALL}
36
37${LIBSA}: sys.o conf.o ${DRIVERS} prf.o machdep.o dkbad.o
38	ar crv ${LIBSA} $?
39	ranlib ${LIBSA}
40
41${DRIVERS}: savax.h
42	cc -c -S ${COPTS} $*.c
43	/lib/c2 -i $*.s | as -o $*.o
44	rm -f $*.s
45
46dkbad.o: ../vax/dkbad.c
47	${CC} -c ${CFLAGS} ../vax/dkbad.c
48# startups
49
50srt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h
51	cc -E -DRELOC=0x${RELOC} ${COPTS} srt0.c | as -o srt0.o
52
53tpsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h
54	cc -E -DRELOC=0x${RELOC} -DTP ${COPTS} srt0.c | as -o tpsrt0.o
55
56relsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h
57	cc -E -DRELOC=0x${RELOC} -DREL ${COPTS} srt0.c | as -o relsrt0.o
58
59# bootable from tape
60
61tpboot:	tpboot.o relsrt0.o ${LIBSA}
62	ld -N -T ${RELOC} relsrt0.o tpboot.o ${LIBSA} -lc
63	strip a.out; dd if=a.out of=tpboot ibs=32 skip=1; rm -f a.out
64
65tpboot.o: boot.c ../h/param.h ../h/inode.h ../h/fs.h
66tpboot.o: saio.h ../h/reboot.h ../h/vm.h
67	cp boot.c tpboot.c; chmod +w tpboot.c
68	cc -c ${CFLAGS} -DJUSTASK tpboot.c
69	rm -f tpboot.c
70
71tpcopy:	copy.o tpsrt0.o ${LIBSA}
72	ld -N tpsrt0.o copy.o ${LIBSA} -lc
73	strip a.out; dd if=a.out of=tpcopy ibs=32 skip=1; rm -f a.out
74
75tpformat: format.o tpsrt0.o confhpup.o ${LIBSA}
76	cp format.c tpformat.c; chmod +w tpformat.c
77	cc -c ${CFLAGS} -DJUSTEXIT tpformat.c
78	rm -f tpformat.c
79	ld -N tpsrt0.o tpformat.o confhpup.o ${LIBSA} -lc
80	strip a.out; dd if=a.out of=tpformat ibs=32 skip=1; rm -f a.out
81
82# bootable from floppy or real disks
83
84boot:	boot.o relsrt0.o bootconf.o ${LIBSA}
85	ld -N -T ${RELOC} -o boot relsrt0.o boot.o bootconf.o ${LIBSA} -lc
86
87bootconf.o: conf.o
88	cp conf.c bootconf.c
89	cc -c ${CFLAGS} -DBOOT bootconf.c
90	rm -f bootconf.c
91
92copy:	copy.o srt0.o conf.o ${LIBSA}
93	ld -N -o copy srt0.o copy.o conf.o ${LIBSA} -lc
94
95format:	format.o srt0.o confhpup.o ${LIBSA}
96	ld -N -o format srt0.o format.o confhpup.o ${LIBSA} -lc
97
98drtest:	drtest.o srt0.o confhpup.o ${LIBSA}
99	ld -N -o drtest srt0.o drtest.o confhpup.o ${LIBSA} -lc
100
101# for 730s minimize size to avoid microcode botch
102# (won't load files larger than 12.5 Kbytes)
103
104730boot.o: boot.o
105	cp boot.c 730boot.c; chmod +w 730boot.c
106	cc -c ${730OPTS} 730boot.c
107	rm -f 730boot.c
108
109730boot: 730boot.o relsrt0.o 730bootconf.o ${LIBSA}
110	ld -N -T ${RELOC} -o 730boot relsrt0.o 730boot.o 730bootconf.o ${LIBSA} -lc
111
112730bootconf.o: conf.o
113	cp conf.c 730bootconf.c
114	cc -c ${730OPTS} -DBOOT 730bootconf.c
115	rm -f 730bootconf.c
116
117730copy: copy.o srt0.o 730conf.o ${LIBSA}
118	ld -N -o 730copy srt0.o copy.o 730conf.o ${LIBSA} -lc
119
120730drtest: drtest.o srt0.o confup.o ${LIBSA}
121	ld -N -o 730drtest srt0.o drtest.o confup.o ${LIBSA} -lc
122
123730format: format.o srt0.o confup.o ${LIBSA}
124	ld -N -o 730format srt0.o format.o confup.o ${LIBSA} -lc
125
126730conf.o: conf.o
127	cp conf.c 730conf.c
128	cc -c ${730OPTS} 730conf.c
129	rm -f 730conf.c
130
131# bootstrap from ether
132
133### not yet, rosin, not yet ###
134
135# getting booted from disc
136
137boothk: relsrt0.o bootxx.o confrk.o sm_sys.o ${LIBSA}
138	ld -N -T ${RELOC} relsrt0.o bootxx.o confrk.o sm_sys.o ${LIBSA} -lc
139	size a.out
140	strip a.out;dd if=a.out of=boothk ibs=32 skip=1;rm -f a.out
141	ls -l boothk
142
143boothp: relsrt0.o bootxx.o confhp.o sm_hp.o sm_sys.o ${LIBSA}
144	ld -N -T ${RELOC} relsrt0.o bootxx.o confhp.o sm_hp.o sm_sys.o ${LIBSA} -lc
145	size a.out
146	strip a.out;dd if=a.out of=boothp ibs=32 skip=1;rm -f a.out
147	ls -l boothp
148
149bootup: relsrt0.o bootxx.o confup.o sm_up.o sm_sys.o ${LIBSA}
150	ld -N -T ${RELOC} relsrt0.o bootxx.o confup.o sm_up.o sm_sys.o ${LIBSA} -lc
151	size a.out
152	strip a.out;dd if=a.out of=bootup ibs=32 skip=1;rm -f a.out
153	ls -l bootup
154
155bootra: relsrt0.o bootxx.o confra.o sm_sys.o ${LIBSA}
156	ld -N -T ${RELOC} relsrt0.o bootxx.o confra.o sm_sys.o ${LIBSA} -lc
157	size a.out
158	strip a.out;dd if=a.out of=bootra ibs=32 skip=1;rm -f a.out
159	ls -l bootra
160
161bootrl: relsrt0.o bootxx.o confrl.o sm_sys.o ${LIBSA}
162	ld -N -T ${RELOC} relsrt0.o bootxx.o confrl.o sm_sys.o ${LIBSA} -lc
163	size a.out
164	strip a.out;dd if=a.out of=bootrl ibs=32 skip=1;rm -f a.out
165	ls -l bootrl
166
167sm_hp.o: hp.o
168	-rm -f sm_hp.c
169	-ln -s hp.c sm_hp.c
170	cc -S -DSMALL ${CFLAGS} sm_hp.c
171	/lib/c2 -i sm_hp.s | as -o sm_hp.o
172	rm -f sm_hp.s sm_hp.c
173
174sm_up.o: up.o
175	-rm -f sm_up.c
176	-ln -s up.c sm_up.c
177	cc -S -DSMALL ${CFLAGS} sm_up.c
178	/lib/c2 -i sm_up.s | as -o sm_up.o
179	rm -f sm_up.s sm_up.c
180
181sm_sys.o: sys.o
182	-rm -f sm_sys.c
183	-ln -s sys.c sm_sys.c
184	cc -c -DSMALL ${CFLAGS} sm_sys.c
185	-rm -f sm_sys.c
186
187confrk.o: confrk.c confxx.o
188confhp.o: confhp.c confxx.o
189confup.o: confup.c confxx.o
190confra.o: confra.c confxx.o
191confrl.o: confrl.c confxx.o
192
193confxx.o:
194	touch confxx.o
195
196confrk.c: confxx.c
197	-rm -f confrk.c
198	sed -e 's/XX/hk/' -e 's/xx/rk/g' <confxx.c >confrk.c
199confhp.c: confxx.c
200	-rm -f confhp.c
201	sed -e 's/XX/hp/' -e 's/xx/hp/g' <confxx.c >confhp.c
202confup.c: confxx.c
203	-rm -f confup.c
204	sed -e 's/XX/up/' -e 's/xx/up/g' <confxx.c >confup.c
205confra.c: confxx.c
206	-rm -f confra.c
207	sed -e 's/XX/ra/' -e 's/xx/ra/g' <confxx.c >confra.c
208confrl.c: confxx.c
209	-rm -f confrl.c
210	sed -e 's/XX/rl/' -e 's/xx/rl/g' <confxx.c >confrl.c
211
212# utilities
213
214print:
215	@pr makefile
216	@ls -l | pr
217	@pr *.h *.c
218
219clean:
220	rm -f *.o *.exe *.i errs sm_*.c libsa.a
221	rm -f a.out boot cat tpboot tpcopy copy tpformat
222	rm -f boot[a-z]? boot[a-wyz][a-z].c conf[a-wyz][a-z].c
223	rm -f format drtest core sboot bootconf.c
224	rm -f 730boot 730copy 730drtest 730format
225
226lint:
227	lint ${COPTS} -hxbn boot.c ${SRCS} | \
228	    grep -v 'possible pointer alignment' | \
229	    grep -v 'struct/union .* never defined'
230
231install: ${ALL}
232	cp boot ${DESTDIR}/boot
233	cp format ${DESTDIR}/format
234	cp copy ${DESTDIR}/copy
235	cp drtest ${DESTDIR}/drtest
236	strip ${DESTDIR}/format ${DESTDIR}/copy ${DESTDIR}/drtest
237	cp pcs750.bin ${DESTDIR}/pcs750.bin
238	cp tpcopy ../dist/tp/copy
239	cp tpboot ../dist/tp/boot
240	cp tpformat ../dist/tp/format
241	cp boot a.out; strip a.out; \
242		dd if=a.out of=../floppy/boot bs=32 skip=1; rm a.out
243	cp 730boot a.out; strip a.out; \
244		dd if=a.out of=../cassette/boot.730 bs=32 skip=1; rm a.out
245	cp ../floppy/boot ../cassette/boot.750
246	cp ../floppy/boot ../consolerl/boot
247	cp copy a.out; strip a.out; \
248		dd if=a.out of=../floppy/copy bs=32 skip=1; rm a.out
249	cp 730copy a.out; strip a.out; \
250		dd if=a.out of=../cassette/copy.730 bs=32 skip=1; rm a.out
251	cp ../floppy/copy ../cassette/copy.750
252	cp ../floppy/copy ../consolerl/copy
253	cp format a.out; strip a.out; \
254		dd if=a.out of=../floppy/format bs=32 skip=1; rm a.out
255	cp 730format a.out; strip a.out; \
256		dd if=a.out of=../cassette/format.730 bs=32 skip=1; rm a.out
257	cp ../floppy/format ../cassette/format.750
258	cp ../floppy/format ../consolerl/format
259	cp drtest a.out; strip a.out; \
260		dd if=a.out of=../floppy/drtest bs=32 skip=1; rm a.out
261	cp 730drtest a.out; strip a.out; \
262		dd if=a.out of=../cassette/drtest.730 bs=32 skip=1; rm a.out
263	cp ../floppy/drtest ../cassette/drtest.750
264	cp ../floppy/drtest ../consolerl/drtest
265	cp bootup boothk boothp bootra bootrl ${DESTDIR}/usr/mdec
266	ln ${DESTDIR}/usr/mdec/bootra ${DESTDIR}/usr/mdec/bootrd
267
268depend:
269	mkdep ${INCPATH} -DSTANDALONE ${SRCS} ${DUMMIES}
270
271# DO NOT DELETE THIS LINE -- make depend uses it
272
273
274sys.o: sys.c ./../h/param.h /usr/include/machine/machparam.h ../h/signal.h
275sys.o: /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h ./../h/dir.h
276sys.o: ./saio.h
277
278conf.o: conf.c ./../machine/pte.h ./../h/param.h
279conf.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h
280conf.o: ./../h/inode.h ./../h/fs.h ./../vaxmba/mbareg.h ./saio.h
281
282prf.o: prf.c ./../h/param.h /usr/include/machine/machparam.h ../h/signal.h
283prf.o: /usr/include/sys/types.h ./../vax/mtpr.h ./../vax/cons.h
284
285machdep.o: machdep.c ./../h/param.h /usr/include/machine/machparam.h
286machdep.o: ../h/signal.h /usr/include/sys/types.h ./../vax/mtpr.h
287
288autoconf.o: autoconf.c ./../machine/pte.h ./../h/param.h
289autoconf.o: /usr/include/machine/machparam.h ../h/signal.h
290autoconf.o: /usr/include/sys/types.h ./../vax/cpu.h ./../vax/nexus.h
291autoconf.o: ./../vaxuba/ubareg.h ./../vaxmba/mbareg.h ./../vax/mtpr.h ./savax.h
292
293hp.o: hp.c ./../h/param.h /usr/include/machine/machparam.h ../h/signal.h
294hp.o: /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h ./../h/dkbad.h
295hp.o: ./../vax/pte.h ./../vaxmba/hpreg.h ./../vaxmba/mbareg.h ./saio.h
296hp.o: ./savax.h
297
298hpmaptype.o: hpmaptype.c ./../machine/pte.h ./../h/param.h
299hpmaptype.o: /usr/include/machine/machparam.h ../h/signal.h
300hpmaptype.o: /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
301hpmaptype.o: ./../vaxmba/hpreg.h ./../vaxmba/mbareg.h ./saio.h ./savax.h
302
303ht.o: ht.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
304ht.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
305ht.o: ./../vaxmba/htreg.h ./../vaxmba/mbareg.h ./saio.h ./savax.h
306
307idc.o: idc.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
308idc.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
309idc.o: ./../vaxuba/idcreg.h ./../vaxuba/ubareg.h ./saio.h ./savax.h
310
311mba.o: mba.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
312mba.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
313mba.o: ./../h/vm.h /usr/include/sys/vmparam.h /usr/include/machine/vmparam.h
314mba.o: /usr/include/sys/vmmac.h /usr/include/sys/vmmeter.h
315mba.o: /usr/include/sys/vmsystm.h ./../vax/mtpr.h ./../vaxmba/mbareg.h
316mba.o: ./../vaxmba/hpreg.h ./saio.h ./savax.h
317
318mt.o: mt.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
319mt.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
320mt.o: ./../vaxmba/mtreg.h ./../vaxmba/mbareg.h ./saio.h ./savax.h
321
322rk.o: rk.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
323rk.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
324rk.o: ./../vaxuba/ubareg.h ./../vaxuba/rkreg.h ./saio.h ./savax.h
325
326rl.o: rl.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
327rl.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
328rl.o: ./../vaxuba/rlreg.h ./../vaxuba/ubareg.h ./saio.h ./savax.h
329
330tm.o: tm.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
331tm.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
332tm.o: ./../vaxuba/ubareg.h ./../vaxuba/tmreg.h ./saio.h ./savax.h
333
334ts.o: ts.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
335ts.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
336ts.o: ./../vaxuba/tsreg.h ./../vaxuba/ubareg.h ./saio.h ./savax.h
337
338up.o: up.c ./../h/param.h /usr/include/machine/machparam.h ../h/signal.h
339up.o: /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h ./../h/dkbad.h
340up.o: ./../h/vmmac.h ./../vax/pte.h ./../vaxuba/upreg.h ./../vaxuba/ubareg.h
341up.o: ./saio.h ./savax.h
342
343upmaptype.o: upmaptype.c ./../h/param.h /usr/include/machine/machparam.h
344upmaptype.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
345upmaptype.o: ./../h/dkbad.h ./../h/vmmac.h ./../vax/pte.h ./../vaxuba/upreg.h
346upmaptype.o: ./../vaxuba/ubareg.h ./saio.h ./savax.h
347
348uba.o: uba.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
349uba.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/vm.h
350uba.o: /usr/include/sys/vmparam.h /usr/include/machine/vmparam.h
351uba.o: /usr/include/sys/vmmac.h /usr/include/sys/vmmeter.h
352uba.o: /usr/include/sys/vmsystm.h ./../h/fs.h ./../vax/cpu.h
353uba.o: ./../vaxuba/ubareg.h ./saio.h ./savax.h
354
355uda.o: uda.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
356uda.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
357uda.o: ./saio.h ./savax.h ./../vaxuba/udareg.h ./../vaxuba/ubareg.h
358uda.o: ./../vax/mscp.h
359
360ut.o: ut.c ./../machine/pte.h ./../h/param.h /usr/include/machine/machparam.h
361ut.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
362ut.o: ./../vaxuba/ubareg.h ./../vaxuba/utreg.h ./saio.h ./savax.h
363
364drtest.o: drtest.c ./../h/param.h /usr/include/machine/machparam.h
365drtest.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
366drtest.o: ./saio.h
367
368format.o: format.c ./../h/param.h /usr/include/machine/machparam.h
369format.o: ../h/signal.h /usr/include/sys/types.h ./../h/fs.h ./../h/inode.h
370format.o: ./../h/dkbad.h ./../h/vmmac.h ./saio.h ./savax.h
371
372dkbad.o: ../vax/dkbad.c ../h/param.h /usr/include/machine/machparam.h
373dkbad.o: ../h/signal.h /usr/include/sys/types.h ../h/buf.h ../h/dkbad.h
374
375bootxx.o: bootxx.c ./../h/param.h /usr/include/machine/machparam.h
376bootxx.o: ../h/signal.h /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h
377bootxx.o: ./../h/vm.h /usr/include/sys/vmparam.h /usr/include/machine/vmparam.h
378bootxx.o: /usr/include/sys/vmmac.h /usr/include/sys/vmmeter.h
379bootxx.o: /usr/include/sys/vmsystm.h /usr/include/a.out.h
380bootxx.o: /usr/include/sys/exec.h ./saio.h ./../h/reboot.h
381
382confxx.o: confxx.c ./../machine/pte.h ./../h/param.h
383confxx.o: /usr/include/machine/machparam.h ../h/signal.h
384confxx.o: /usr/include/sys/types.h ./../h/inode.h ./../h/fs.h ./saio.h
385# DEPENDENCIES MUST END AT END OF FILE
386# IF YOU PUT STUFF HERE IT WILL GO AWAY
387# see make depend above
388