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