Commit | Line | Data |
---|---|---|
bd2f236f | 1 | # Makefile 4.34 83/08/11 |
e05d064d | 2 | |
b5d17f4d | 3 | DESTDIR=/ |
faf25b5b | 4 | CFLAGS= -O -DSTANDALONE ${COPTS} |
b5d17f4d | 5 | COPTS= -DVAX780 -DVAX750 -DVAX730 |
6fe57a65 | 6 | 730OPTS=-O -DSTANDALONE -DVAX730 |
bd5ddd44 | 7 | RELOC= 70000 |
c140a385 | 8 | SRCS= sys.c conf.c prf.c machdep.c \ |
3b9afe4f SL |
9 | autoconf.c hp.c hpmaptype.c ht.c idc.c mba.c mt.c rk.c \ |
10 | rl.c tm.c ts.c \ | |
11 | up.c upmaptype.c uba.c uda.c ut.c \ | |
6fe57a65 | 12 | drtest.c format.c up.old.c hp.old.c |
3b9afe4f SL |
13 | DRIVERS=autoconf.o hp.o hpmaptype.o ht.o idc.o mba.o mt.o \ |
14 | rk.o rl.o tm.o ts.o \ | |
15 | up.o upmaptype.o uba.o uda.o ut.o | |
6fe57a65 SL |
16 | # These drivers don't have ecc correction and bad sector forwarding; |
17 | # they are placed in the file system boot area for 750's. If your | |
18 | # root has bad sectors you can try and squeeze the newer drivers in... | |
19 | ODRIVERS=hp.old.o up.old.o | |
e05d064d | 20 | |
0839bdeb | 21 | ALL= /usr/lib/libsa.a srt0.o boot tpboot copy tpcopy \ |
76780d43 | 22 | format tpformat drtest boothp boothk bootup bootra bootrl \ |
d5e22e3a | 23 | 730boot 730copy 730format 730drtest |
e05d064d | 24 | |
9e3a67c5 BJ |
25 | all: ${ALL} |
26 | ||
6fe57a65 | 27 | /usr/lib/libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o dkbad.o |
b5d17f4d BJ |
28 | ar crv /usr/lib/libsa.a $? |
29 | ranlib /usr/lib/libsa.a | |
e05d064d | 30 | |
6fe57a65 | 31 | ${ODRIVERS} ${DRIVERS}: savax.h |
e05d064d | 32 | cc -c -S ${COPTS} $*.c |
c140a385 BJ |
33 | /lib/c2 -i $*.s | as -o $*.o |
34 | rm $*.s | |
e05d064d | 35 | |
6fe57a65 SL |
36 | dkbad.o: ../vax/dkbad.c |
37 | ${CC} -c ${CFLAGS} ../vax/dkbad.c | |
38 | ||
b5d17f4d | 39 | # startups |
e05d064d | 40 | |
a031a31b | 41 | srt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h |
b5d17f4d | 42 | cc -E -DRELOC=0x${RELOC} ${COPTS} srt0.c | as -o srt0.o |
faf25b5b | 43 | |
a031a31b | 44 | tpsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h |
b5d17f4d | 45 | cc -E -DRELOC=0x${RELOC} -DTP ${COPTS} srt0.c | as -o tpsrt0.o |
35e7506c | 46 | |
a031a31b | 47 | relsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h |
b5d17f4d | 48 | cc -E -DRELOC=0x${RELOC} -DREL ${COPTS} srt0.c | as -o relsrt0.o |
e05d064d | 49 | |
b5d17f4d | 50 | # bootable from tape |
35e7506c | 51 | |
b5d17f4d BJ |
52 | tpboot: tpboot.o relsrt0.o /usr/lib/libsa.a |
53 | ld -N -T ${RELOC} relsrt0.o tpboot.o -lsa -lc | |
54 | cp a.out b.out; strip b.out; dd if=b.out of=tpboot ibs=32 skip=1; rm b.out | |
e05d064d | 55 | |
b5d17f4d BJ |
56 | tpboot.o: boot.c ../h/param.h ../h/inode.h ../h/fs.h |
57 | tpboot.o: saio.h ../h/reboot.h ../h/vm.h | |
58 | cp boot.c tpboot.c; chmod +w tpboot.c | |
59 | cc -c -O -DJUSTASK tpboot.c | |
60 | rm tpboot.c | |
35e7506c | 61 | |
d5e22e3a SL |
62 | tpcopy: copy.o tpsrt0.o /usr/lib/libsa.a |
63 | ld -N tpsrt0.o copy.o -lsa -lc | |
2493f9f8 SL |
64 | cp a.out b.out; strip b.out; \ |
65 | dd if=b.out of=tpcopy ibs=32 skip=1; rm b.out | |
35e7506c | 66 | |
6fe57a65 | 67 | tpformat: format.o tpsrt0.o confhpup.o /usr/lib/libsa.a |
077a9f49 | 68 | cp format.c tpformat.c; chmod +w tpformat.c |
a7fd309c | 69 | cc -c -O -DJUSTEXIT tpformat.c |
077a9f49 | 70 | rm tpformat.c |
6fe57a65 | 71 | ld -N tpsrt0.o tpformat.o confhpup.o -lsa -lc |
2493f9f8 SL |
72 | cp a.out b.out; strip b.out; \ |
73 | dd if=b.out of=tpformat ibs=32 skip=1; rm b.out | |
077a9f49 | 74 | |
b5d17f4d | 75 | # bootable from floppy or real disks |
e05d064d | 76 | |
b5d17f4d BJ |
77 | boot: boot.o relsrt0.o bootconf.o /usr/lib/libsa.a |
78 | ld -N -T ${RELOC} -o boot relsrt0.o boot.o bootconf.o -lsa -lc | |
e05d064d | 79 | |
d737d5e5 | 80 | bootconf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h |
a031a31b | 81 | bootconf.o: ../h/fs.h saio.h ../vaxmba/mbareg.h |
b5d17f4d BJ |
82 | cp conf.c bootconf.c |
83 | cc -c ${COPTS} -DBOOT bootconf.c | |
84 | rm bootconf.c | |
35e7506c | 85 | |
b5d17f4d BJ |
86 | copy: copy.o srt0.o conf.o /usr/lib/libsa.a |
87 | ld -N -o copy srt0.o copy.o conf.o -lsa -lc | |
e05d064d | 88 | |
6fe57a65 SL |
89 | format: format.o srt0.o confhpup.o /usr/lib/libsa.a |
90 | ld -N -o format srt0.o format.o confhpup.o -lsa -lc | |
0839bdeb | 91 | |
6fe57a65 SL |
92 | drtest: drtest.o srt0.o confhpup.o /usr/lib/libsa.a |
93 | ld -N -o drtest srt0.o drtest.o confhpup.o -lsa -lc | |
0839bdeb | 94 | |
2493f9f8 SL |
95 | # for 730s minimize size to avoid microcode botch |
96 | # (won't load files larger than 12.5 Kbytes) | |
76780d43 | 97 | |
2493f9f8 SL |
98 | 730boot.o: boot.c ../h/param.h ../h/inode.h ../h/fs.h |
99 | 730boot.o: saio.h ../h/reboot.h ../h/vm.h | |
100 | cp boot.c 730boot.c; chmod +w 730boot.c | |
101 | cc -c ${730OPTS} -DJUSTASK 730boot.c | |
102 | rm 730boot.c | |
103 | ||
104 | 730boot: 730boot.o relsrt0.o 730bootconf.o /usr/lib/libsa.a | |
bd2f236f | 105 | ld -N -T ${RELOC} -o 730boot relsrt0.o 730boot.o 730bootconf.o -lsa -lc |
76780d43 SL |
106 | |
107 | 730bootconf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h | |
108 | 730bootconf.o: ../h/fs.h saio.h | |
109 | cp conf.c 730bootconf.c | |
110 | cc -c ${730OPTS} -DBOOT 730bootconf.c | |
d5e22e3a | 111 | rm -f 730bootconf.c |
76780d43 SL |
112 | |
113 | 730copy: copy.o srt0.o 730conf.o /usr/lib/libsa.a | |
114 | ld -N -o 730copy srt0.o copy.o 730conf.o -lsa -lc | |
115 | ||
6fe57a65 SL |
116 | 730drtest: drtest.o srt0.o confup.o /usr/lib/libsa.a |
117 | ld -N -o 730drtest srt0.o drtest.o confup.o -lsa -lc | |
d5e22e3a | 118 | |
6fe57a65 SL |
119 | 730format: format.o srt0.o confup.o /usr/lib/libsa.a |
120 | ld -N -o 730format srt0.o format.o confup.o -lsa -lc | |
d5e22e3a | 121 | |
76780d43 SL |
122 | 730conf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h |
123 | 730conf.o: ../h/fs.h saio.h | |
124 | cp conf.c 730conf.c | |
6fe57a65 | 125 | cc -c ${730OPTS} 730conf.c |
d5e22e3a | 126 | rm -f 730conf.c |
76780d43 | 127 | |
b5d17f4d | 128 | # bootstrap from ether |
7eed1b32 | 129 | |
b5d17f4d | 130 | ### not yet, rosin, not yet ### |
e05d064d | 131 | |
9b4d040b | 132 | # getting booted from disc |
af93b5dd | 133 | |
9b4d040b | 134 | boothk: relsrt0.o boothk.o confrk.o /usr/lib/libsa.a |
b5d17f4d | 135 | ld -N -T ${RELOC} relsrt0.o boothk.o confrk.o -lsa -lc |
9b4d040b | 136 | cp a.out b.out;strip b.out;dd if=b.out of=boothk ibs=32 skip=1;rm b.out |
b5d17f4d | 137 | |
6fe57a65 SL |
138 | boothp: relsrt0.o boothp.o confhp.o hp.old.o /usr/lib/libsa.a |
139 | ld -N -T ${RELOC} relsrt0.o boothp.o confhp.o hp.old.o -lsa -lc | |
9b4d040b | 140 | cp a.out b.out;strip b.out;dd if=b.out of=boothp ibs=32 skip=1;rm b.out |
b5d17f4d | 141 | |
6fe57a65 SL |
142 | bootup: relsrt0.o bootup.o confup.o up.old.o /usr/lib/libsa.a |
143 | ld -N -T ${RELOC} relsrt0.o bootup.o confup.o up.old.o -lsa -lc | |
9b4d040b SL |
144 | cp a.out b.out;strip b.out;dd if=b.out of=bootup ibs=32 skip=1;rm b.out |
145 | ||
76780d43 SL |
146 | bootra: relsrt0.o bootra.o confra.o /usr/lib/libsa.a |
147 | ld -N -T ${RELOC} relsrt0.o bootra.o confra.o -lsa -lc | |
148 | cp a.out b.out;strip b.out;dd if=b.out of=bootra ibs=32 skip=1;rm b.out | |
149 | ||
76780d43 | 150 | bootrl: relsrt0.o bootrl.o confrl.o /usr/lib/libsa.a |
05ec64d7 | 151 | ld -N -T ${RELOC} relsrt0.o bootrl.o confrl.o -lsa -lc |
76780d43 SL |
152 | cp a.out b.out;strip b.out;dd if=b.out of=bootrl ibs=32 skip=1;rm b.out |
153 | ||
d5e22e3a | 154 | boothp.o: boothp.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h |
b5d17f4d | 155 | boothp.o: ../h/fs.h saio.h |
d5e22e3a | 156 | boothk.o: boothk.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h |
b5d17f4d | 157 | boothk.o: ../h/fs.h saio.h |
d5e22e3a | 158 | bootup.o: bootup.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h |
76780d43 | 159 | bootup.o: ../h/fs.h saio.h |
d5e22e3a | 160 | bootra.o: bootra.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h |
76780d43 | 161 | bootra.o: ../h/fs.h saio.h |
d5e22e3a | 162 | bootrl.o: bootrl.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h |
76780d43 | 163 | bootrl.o: ../h/fs.h saio.h |
d737d5e5 | 164 | |
d5e22e3a SL |
165 | boothk.c: bootxx.c |
166 | sed -e 's/xx/hk/g' <bootxx.c >boothk.c | |
167 | boothp.c: bootxx.c | |
168 | sed -e 's/xx/hp/g' <bootxx.c >boothp.c | |
169 | bootup.c: bootxx.c | |
170 | sed -e 's/xx/up/g' <bootxx.c >bootup.c | |
171 | bootra.c: bootxx.c | |
172 | sed -e 's/xx/ra/g' <bootxx.c >bootra.c | |
173 | bootrl.c: bootxx.c | |
174 | sed -e 's/xx/rl/g' <bootxx.c >bootrl.c | |
175 | ||
d737d5e5 | 176 | confrk.o: confrk.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h |
d737d5e5 | 177 | confhp.o: confhp.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h |
d737d5e5 | 178 | confup.o: confup.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h |
76780d43 | 179 | confra.o: confra.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h |
76780d43 | 180 | confrl.o: confrl.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h |
b5d17f4d BJ |
181 | |
182 | confrk.c: confxx.c | |
183 | sed -e 's/XX/hk/' -e 's/xx/rk/g' <confxx.c >confrk.c | |
184 | confhp.c: confxx.c | |
185 | sed -e 's/XX/hp/' -e 's/xx/hp/g' <confxx.c >confhp.c | |
186 | confup.c: confxx.c | |
187 | sed -e 's/XX/up/' -e 's/xx/up/g' <confxx.c >confup.c | |
76780d43 SL |
188 | confra.c: confxx.c |
189 | sed -e 's/XX/ra/' -e 's/xx/ra/g' <confxx.c >confra.c | |
190 | confrl.c: confxx.c | |
191 | sed -e 's/XX/rl/' -e 's/xx/rl/g' <confxx.c >confrl.c | |
9b4d040b SL |
192 | |
193 | # utilities | |
194 | ||
195 | print: | |
196 | @pr makefile | |
197 | @ls -l | pr | |
198 | @pr *.h *.c | |
199 | ||
200 | clean: | |
201 | rm -f *.o *.exe *.i errs | |
077a9f49 | 202 | rm -f a.out b.out boot cat tpboot tpcopy copy tpformat |
d5e22e3a | 203 | rm -f boot[a-z]? boot[a-wyz][a-z].c conf[a-wyz][a-z].c |
077a9f49 | 204 | rm -f format drtest core sboot bootconf.c |
d5e22e3a | 205 | rm -f 730boot 730copy 730drtest 730format |
9b4d040b SL |
206 | |
207 | lint: | |
208 | lint ${COPTS} -hxbn boot.c ${SRCS} | \ | |
209 | grep -v 'possible pointer alignment' | \ | |
210 | grep -v 'struct/union .* never defined' | |
211 | ||
212 | install: ${ALL} | |
213 | cp tpcopy ${DESTDIR}/tp/copy | |
214 | cp tpboot ${DESTDIR}/tp/boot | |
a7fd309c | 215 | cp tpformat ${DESTDIR}/tp/format |
2493f9f8 SL |
216 | cp boot a.out; strip a.out; \ |
217 | dd if=a.out of=../floppy/boot bs=32 skip=1 | |
76780d43 | 218 | cp 730boot a.out; strip a.out; \ |
a67bb785 | 219 | dd if=a.out of=../cassette/boot.730 bs=32 skip=1 |
2493f9f8 SL |
220 | cp ../floppy/boot ../cassette/boot.750 |
221 | cp copy a.out; strip a.out; \ | |
222 | dd if=a.out of=../floppy/copy bs=32 skip=1 | |
76780d43 | 223 | cp 730copy a.out; strip a.out; \ |
a67bb785 | 224 | dd if=a.out of=../cassette/copy.730 bs=32 skip=1 |
2493f9f8 | 225 | cp ../floppy/copy ../cassette/copy.750 |
077a9f49 SL |
226 | cp format a.out; strip a.out; \ |
227 | dd if=a.out of=../floppy/format bs=32 skip=1 | |
d5e22e3a | 228 | cp 730format a.out; strip a.out; \ |
a67bb785 | 229 | dd if=a.out of=../cassette/format.730 bs=32 skip=1 |
2493f9f8 | 230 | cp ../floppy/format ../cassette/format.750 |
077a9f49 SL |
231 | cp drtest a.out; strip a.out; \ |
232 | dd if=a.out of=../floppy/drtest bs=32 skip=1 | |
d5e22e3a | 233 | cp 730drtest a.out; strip a.out; \ |
a67bb785 | 234 | dd if=a.out of=../cassette/drtest.730 bs=32 skip=1 |
2493f9f8 | 235 | cp ../floppy/drtest ../cassette/drtest.750 |
76780d43 | 236 | cp bootup boothk boothp bootra bootrl ${DESTDIR}/usr/mdec |
9b4d040b SL |
237 | |
238 | # beware... |