1# Makefile 6.1 83/08/12 2 3DESTDIR=/ 4CFLAGS= -O -DSTANDALONE ${COPTS} 5COPTS= -DVAX780 -DVAX750 -DVAX730 6730OPTS=-O -DSTANDALONE -DVAX730 7RELOC= 70000 8SRCS= sys.c conf.c prf.c machdep.c \ 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 \ 12 drtest.c format.c up.old.c hp.old.c 13DRIVERS=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 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... 19ODRIVERS=hp.old.o up.old.o 20 21ALL= /usr/lib/libsa.a srt0.o boot tpboot copy tpcopy \ 22 format tpformat drtest boothp boothk bootup bootra bootrl \ 23 730boot 730copy 730format 730drtest 24 25all: ${ALL} 26 27/usr/lib/libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o dkbad.o 28 ar crv /usr/lib/libsa.a $? 29 ranlib /usr/lib/libsa.a 30 31${ODRIVERS} ${DRIVERS}: savax.h 32 cc -c -S ${COPTS} $*.c 33 /lib/c2 -i $*.s | as -o $*.o 34 rm $*.s 35 36dkbad.o: ../vax/dkbad.c 37 ${CC} -c ${CFLAGS} ../vax/dkbad.c 38 39# startups 40 41srt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h 42 cc -E -DRELOC=0x${RELOC} ${COPTS} srt0.c | as -o srt0.o 43 44tpsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h 45 cc -E -DRELOC=0x${RELOC} -DTP ${COPTS} srt0.c | as -o tpsrt0.o 46 47relsrt0.o: srt0.c ../vax/mtpr.h ../vax/cpu.h 48 cc -E -DRELOC=0x${RELOC} -DREL ${COPTS} srt0.c | as -o relsrt0.o 49 50# bootable from tape 51 52tpboot: 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 55 56tpboot.o: boot.c ../h/param.h ../h/inode.h ../h/fs.h 57tpboot.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 61 62tpcopy: copy.o tpsrt0.o /usr/lib/libsa.a 63 ld -N tpsrt0.o copy.o -lsa -lc 64 cp a.out b.out; strip b.out; \ 65 dd if=b.out of=tpcopy ibs=32 skip=1; rm b.out 66 67tpformat: format.o tpsrt0.o confhpup.o /usr/lib/libsa.a 68 cp format.c tpformat.c; chmod +w tpformat.c 69 cc -c -O -DJUSTEXIT tpformat.c 70 rm tpformat.c 71 ld -N tpsrt0.o tpformat.o confhpup.o -lsa -lc 72 cp a.out b.out; strip b.out; \ 73 dd if=b.out of=tpformat ibs=32 skip=1; rm b.out 74 75# bootable from floppy or real disks 76 77boot: 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 79 80bootconf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h 81bootconf.o: ../h/fs.h saio.h ../vaxmba/mbareg.h 82 cp conf.c bootconf.c 83 cc -c ${COPTS} -DBOOT bootconf.c 84 rm bootconf.c 85 86copy: copy.o srt0.o conf.o /usr/lib/libsa.a 87 ld -N -o copy srt0.o copy.o conf.o -lsa -lc 88 89format: format.o srt0.o confhpup.o /usr/lib/libsa.a 90 ld -N -o format srt0.o format.o confhpup.o -lsa -lc 91 92drtest: drtest.o srt0.o confhpup.o /usr/lib/libsa.a 93 ld -N -o drtest srt0.o drtest.o confhpup.o -lsa -lc 94 95# for 730s minimize size to avoid microcode botch 96# (won't load files larger than 12.5 Kbytes) 97 98730boot.o: boot.c ../h/param.h ../h/inode.h ../h/fs.h 99730boot.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 104730boot: 730boot.o relsrt0.o 730bootconf.o /usr/lib/libsa.a 105 ld -N -T ${RELOC} -o 730boot relsrt0.o 730boot.o 730bootconf.o -lsa -lc 106 107730bootconf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h 108730bootconf.o: ../h/fs.h saio.h 109 cp conf.c 730bootconf.c 110 cc -c ${730OPTS} -DBOOT 730bootconf.c 111 rm -f 730bootconf.c 112 113730copy: copy.o srt0.o 730conf.o /usr/lib/libsa.a 114 ld -N -o 730copy srt0.o copy.o 730conf.o -lsa -lc 115 116730drtest: drtest.o srt0.o confup.o /usr/lib/libsa.a 117 ld -N -o 730drtest srt0.o drtest.o confup.o -lsa -lc 118 119730format: format.o srt0.o confup.o /usr/lib/libsa.a 120 ld -N -o 730format srt0.o format.o confup.o -lsa -lc 121 122730conf.o: conf.c ../h/param.h ../h/inode.h ../machine/pte.h 123730conf.o: ../h/fs.h saio.h 124 cp conf.c 730conf.c 125 cc -c ${730OPTS} 730conf.c 126 rm -f 730conf.c 127 128# bootstrap from ether 129 130### not yet, rosin, not yet ### 131 132# getting booted from disc 133 134boothk: relsrt0.o boothk.o confrk.o /usr/lib/libsa.a 135 ld -N -T ${RELOC} relsrt0.o boothk.o confrk.o -lsa -lc 136 cp a.out b.out;strip b.out;dd if=b.out of=boothk ibs=32 skip=1;rm b.out 137 138boothp: 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 140 cp a.out b.out;strip b.out;dd if=b.out of=boothp ibs=32 skip=1;rm b.out 141 142bootup: 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 144 cp a.out b.out;strip b.out;dd if=b.out of=bootup ibs=32 skip=1;rm b.out 145 146bootra: 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 150bootrl: relsrt0.o bootrl.o confrl.o /usr/lib/libsa.a 151 ld -N -T ${RELOC} relsrt0.o bootrl.o confrl.o -lsa -lc 152 cp a.out b.out;strip b.out;dd if=b.out of=bootrl ibs=32 skip=1;rm b.out 153 154boothp.o: boothp.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h 155boothp.o: ../h/fs.h saio.h 156boothk.o: boothk.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h 157boothk.o: ../h/fs.h saio.h 158bootup.o: bootup.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h 159bootup.o: ../h/fs.h saio.h 160bootra.o: bootra.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h 161bootra.o: ../h/fs.h saio.h 162bootrl.o: bootrl.c ../h/param.h ../h/inode.h ../machine/pte.h ../h/reboot.h 163bootrl.o: ../h/fs.h saio.h 164 165boothk.c: bootxx.c 166 sed -e 's/xx/hk/g' <bootxx.c >boothk.c 167boothp.c: bootxx.c 168 sed -e 's/xx/hp/g' <bootxx.c >boothp.c 169bootup.c: bootxx.c 170 sed -e 's/xx/up/g' <bootxx.c >bootup.c 171bootra.c: bootxx.c 172 sed -e 's/xx/ra/g' <bootxx.c >bootra.c 173bootrl.c: bootxx.c 174 sed -e 's/xx/rl/g' <bootxx.c >bootrl.c 175 176confrk.o: confrk.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h 177confhp.o: confhp.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h 178confup.o: confup.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h 179confra.o: confra.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h 180confrl.o: confrl.c ../h/param.h ../h/fs.h ../machine/pte.h ../h/inode.h saio.h 181 182confrk.c: confxx.c 183 sed -e 's/XX/hk/' -e 's/xx/rk/g' <confxx.c >confrk.c 184confhp.c: confxx.c 185 sed -e 's/XX/hp/' -e 's/xx/hp/g' <confxx.c >confhp.c 186confup.c: confxx.c 187 sed -e 's/XX/up/' -e 's/xx/up/g' <confxx.c >confup.c 188confra.c: confxx.c 189 sed -e 's/XX/ra/' -e 's/xx/ra/g' <confxx.c >confra.c 190confrl.c: confxx.c 191 sed -e 's/XX/rl/' -e 's/xx/rl/g' <confxx.c >confrl.c 192 193# utilities 194 195print: 196 @pr makefile 197 @ls -l | pr 198 @pr *.h *.c 199 200clean: 201 rm -f *.o *.exe *.i errs 202 rm -f a.out b.out boot cat tpboot tpcopy copy tpformat 203 rm -f boot[a-z]? boot[a-wyz][a-z].c conf[a-wyz][a-z].c 204 rm -f format drtest core sboot bootconf.c 205 rm -f 730boot 730copy 730drtest 730format 206 207lint: 208 lint ${COPTS} -hxbn boot.c ${SRCS} | \ 209 grep -v 'possible pointer alignment' | \ 210 grep -v 'struct/union .* never defined' 211 212install: ${ALL} 213 cp tpcopy ${DESTDIR}/tp/copy 214 cp tpboot ${DESTDIR}/tp/boot 215 cp tpformat ${DESTDIR}/tp/format 216 cp boot a.out; strip a.out; \ 217 dd if=a.out of=../floppy/boot bs=32 skip=1 218 cp 730boot a.out; strip a.out; \ 219 dd if=a.out of=../cassette/boot.730 bs=32 skip=1 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 223 cp 730copy a.out; strip a.out; \ 224 dd if=a.out of=../cassette/copy.730 bs=32 skip=1 225 cp ../floppy/copy ../cassette/copy.750 226 cp format a.out; strip a.out; \ 227 dd if=a.out of=../floppy/format bs=32 skip=1 228 cp 730format a.out; strip a.out; \ 229 dd if=a.out of=../cassette/format.730 bs=32 skip=1 230 cp ../floppy/format ../cassette/format.750 231 cp drtest a.out; strip a.out; \ 232 dd if=a.out of=../floppy/drtest bs=32 skip=1 233 cp 730drtest a.out; strip a.out; \ 234 dd if=a.out of=../cassette/drtest.730 bs=32 skip=1 235 cp ../floppy/drtest ../cassette/drtest.750 236 cp bootup boothk boothp bootra bootrl ${DESTDIR}/usr/mdec 237 238# beware... 239