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