1# Makefile 4.13 81/12/01 2 3DESTDIR= 4CFLAGS= -O -DSTANDALONE ${COPTS} 5COPTS= -DVAX780 -DVAX750 -DVAX7ZZ 6RELOC= 70000 7SRCS= sys.c conf.c prf.c machdep.c \ 8 autoconf.c hp.c ht.c mba.c mt.c rk.c tm.c ts.c up.c uba.c uda.c ut.c 9DRIVERS=autoconf.o hp.o ht.o mba.o mt.o rk.o tm.o ts.o up.o uba.o uda.o ut.o 10 11ALL= /usr/lib/libsa.a srt0.o boot cat ls icheck mkfs restor \ 12 tpicheck tpmkfs tprestor sboot 13 14all: ${ALL} 15 16/usr/lib/libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o 17 ar crv ${DESTDIR}/usr/lib/libsa.a $? 18 ranlib ${DESTDIR}/usr/lib/libsa.a 19 20${DRIVERS}: 21 cc -c -S ${COPTS} $*.c 22 /lib/c2 -i $*.s | as -o $*.o 23 rm $*.s 24 25boot: boot.o relsrt0.o ${DESTDIR}/usr/lib/libsa.a 26 ld -N -T ${RELOC} relsrt0.o boot.o -lsa -lc 27 cp a.out b.out; strip b.out; dd if=b.out of=boot ibs=32 skip=1; rm b.out 28 29sboot: boot.c relsrt0.o ${DESTDIR}/usr/lib/libsa.a 30 cp boot.c sboot.c; chmod +w sboot.c 31 cc -c -O -DJUSTASK sboot.c 32 rm sboot.c 33 ld -N -T ${RELOC} relsrt0.o sboot.o -lsa -lc 34 cp a.out b.out; strip b.out; dd if=b.out of=sboot ibs=32 skip=1; rm b.out 35 36cat: cat.o srt0.o ${DESTDIR}/usr/lib/libsa.a 37 ld -N srt0.o cat.o -lsa -lc 38 cp a.out b.out; strip b.out; dd if=b.out of=cat ibs=32 skip=1; rm b.out 39 40ls: ls.o srt0.o ${DESTDIR}/usr/lib/libsa.a 41 ld -N srt0.o ls.o -lsa -lc 42 cp a.out b.out; strip b.out; dd if=b.out of=ls ibs=32 skip=1; rm b.out 43 44imptst: imptst.o srt0.o 45 ld -N srt0.o imptst.o -lsa -lc 46 cp a.out b.out; strip b.out; dd if=b.out of=imptst ibs=32 skip=1; rm b.out 47 48mkfs.o: /usr/src/cmd/mkfs.c 49 cc ${CFLAGS} -c /usr/src/cmd/mkfs.c 50 51mkfs: mkfs.o srt0.o ${DESTDIR}/usr/lib/libsa.a 52 ld -N srt0.o mkfs.o -lsa -lc 53 cp a.out b.out; strip b.out; dd if=b.out of=mkfs ibs=32 skip=1; rm b.out 54 55restor.o: /usr/src/cmd/restor.c 56 cc ${CFLAGS} -c /usr/src/cmd/restor.c 57 58restor: restor.o srt0.o ${DESTDIR}/usr/lib/libsa.a 59 ld -N srt0.o restor.o -lsa -lc 60 cp a.out b.out; strip b.out; dd if=b.out of=restor ibs=32 skip=1; rm b.out 61 62icheck.o: /usr/src/cmd/icheck.c 63 cc ${CFLAGS} -c /usr/src/cmd/icheck.c 64 65icheck: icheck.o srt0.o ${DESTDIR}/usr/lib/libsa.a 66 ld -N srt0.o icheck.o -lsa -lc 67 cp a.out b.out; strip b.out; dd if=b.out of=icheck ibs=32 skip=1; rm b.out 68 69tpmkfs: mkfs.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a 70 ld -N tpsrt0.o mkfs.o -lsa -lc 71 cp a.out b.out; strip b.out; dd if=b.out of=tpmkfs ibs=32 skip=1; rm b.out 72 73tprestor: restor.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a 74 ld -N tpsrt0.o restor.o -lsa -lc 75 cp a.out b.out; strip b.out; dd if=b.out of=tprestor ibs=32 skip=1; rm b.out 76 77tpicheck: icheck.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a 78 ld -N tpsrt0.o icheck.o -lsa -lc 79 cp a.out b.out; strip b.out; dd if=b.out of=tpicheck ibs=32 skip=1; rm b.out 80 81srt0.o: srt0.c 82 cc -E -DRELOC=0x${RELOC} ${COPTS} srt0.c | as -o srt0.o 83 84tpsrt0.o: srt0.c 85 cc -E -DRELOC=0x${RELOC} -DTP ${COPTS} srt0.c | as -o tpsrt0.o 86 87relsrt0.o: srt0.c 88 cc -E -DRELOC=0x${RELOC} -DREL ${COPTS} srt0.c | as -o relsrt0.o 89 90print: 91 @pr -f makefile 92 @/usr/ucb/ls -l | pr -f 93 @pr -f *.h *.c 94 95clean: 96 rm -f *.o *.exe *.i 97 rm -f a.out b.out boot cat ls icheck mkfs restor rpboot \ 98 tpicheck tpmkfs tprestor sboot 99 100lint: 101 lint ${COPTS} -hxbn boot.c ${SRCS} | \ 102 grep -v 'possible pointer alignment' | \ 103 grep -v 'struct/union .* never defined' 104 105install: ${ALL} 106 cp tprestor ${DESTDIR}/tp/restor 107 cp tpicheck ${DESTDIR}/tp/icheck 108 cp tpmkfs ${DESTDIR}/tp/mkfs 109 cp sboot ${DESTDIR}/tp/boot 110 cp boot icheck mkfs restor cat ls ../floppy 111