|
|
1.1 root 1: # makefile 4.13 81/12/01
2:
3: DESTDIR=
4: CFLAGS= -O -DSTANDALONE ${COPTS}
5: COPTS= -DVAX780 -DVAX750 -DVAX7ZZ
6: RELOC= 70000
7: SRCS= 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
9: DRIVERS=autoconf.o hp.o ht.o mba.o mt.o rk.o tm.o ts.o up.o uba.o uda.o
10:
11: ALL= /usr/lib/libsa.a srt0.o boot cat ls icheck mkfs restor \
12: tpicheck tpmkfs tprestor sboot
13:
14: all: ${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:
25: boot: boot.o bootconf.o relsrt0.o ${DESTDIR}/usr/lib/libsa.a
26: ld -N -T ${RELOC} relsrt0.o boot.o bootconf.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:
29: bootconf.o: conf.c
30: cp conf.c bootconf.c
31: cc -c ${COPTS} -DBOOT bootconf.c
32: rm bootconf.c
33:
34: sboot: boot.c relsrt0.o ${DESTDIR}/usr/lib/libsa.a
35: cp boot.c sboot.c; chmod +w sboot.c
36: cc -c -O -DJUSTASK sboot.c
37: rm sboot.c
38: ld -N -T ${RELOC} relsrt0.o sboot.o -lsa -lc
39: cp a.out b.out; strip b.out; dd if=b.out of=sboot ibs=32 skip=1; rm b.out
40:
41: cat: cat.o srt0.o ${DESTDIR}/usr/lib/libsa.a
42: ld -N srt0.o cat.o -lsa -lc
43: cp a.out b.out; strip b.out; dd if=b.out of=cat ibs=32 skip=1; rm b.out
44:
45: ls: ls.o srt0.o ${DESTDIR}/usr/lib/libsa.a
46: ld -N srt0.o ls.o -lsa -lc
47: cp a.out b.out; strip b.out; dd if=b.out of=ls ibs=32 skip=1; rm b.out
48:
49: imptst: imptst.o srt0.o
50: ld -N srt0.o imptst.o -lsa -lc
51: cp a.out b.out; strip b.out; dd if=b.out of=imptst ibs=32 skip=1; rm b.out
52:
53: mkfs.o: /usr/src/cmd/mkfs.c
54: cc ${CFLAGS} -c /usr/src/cmd/mkfs.c
55:
56: mkfs: mkfs.o srt0.o ${DESTDIR}/usr/lib/libsa.a
57: ld -N srt0.o mkfs.o -lsa -lc
58: cp a.out b.out; strip b.out; dd if=b.out of=mkfs ibs=32 skip=1; rm b.out
59:
60: restor.o: /usr/src/cmd/restor.c
61: cc ${CFLAGS} -c /usr/src/cmd/restor.c
62:
63: restor: restor.o srt0.o ${DESTDIR}/usr/lib/libsa.a
64: ld -N srt0.o restor.o -lsa -lc
65: cp a.out b.out; strip b.out; dd if=b.out of=restor ibs=32 skip=1; rm b.out
66:
67: icheck.o: /usr/src/cmd/icheck.c
68: cc ${CFLAGS} -c /usr/src/cmd/icheck.c
69:
70: icheck: icheck.o srt0.o ${DESTDIR}/usr/lib/libsa.a
71: ld -N srt0.o icheck.o -lsa -lc
72: cp a.out b.out; strip b.out; dd if=b.out of=icheck ibs=32 skip=1; rm b.out
73:
74: tpmkfs: mkfs.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a
75: ld -N tpsrt0.o mkfs.o -lsa -lc
76: cp a.out b.out; strip b.out; dd if=b.out of=tpmkfs ibs=32 skip=1; rm b.out
77:
78: tprestor: restor.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a
79: ld -N tpsrt0.o restor.o -lsa -lc
80: cp a.out b.out; strip b.out; dd if=b.out of=tprestor ibs=32 skip=1; rm b.out
81:
82: tpicheck: icheck.o tpsrt0.o ${DESTDIR}/usr/lib/libsa.a
83: ld -N tpsrt0.o icheck.o -lsa -lc
84: cp a.out b.out; strip b.out; dd if=b.out of=tpicheck ibs=32 skip=1; rm b.out
85:
86: srt0.o: srt0.c
87: cc -E -DRELOC=0x${RELOC} ${COPTS} srt0.c | as -o srt0.o
88:
89: tpsrt0.o: srt0.c
90: cc -E -DRELOC=0x${RELOC} -DTP ${COPTS} srt0.c | as -o tpsrt0.o
91:
92: relsrt0.o: srt0.c
93: cc -E -DRELOC=0x${RELOC} -DREL ${COPTS} srt0.c | as -o relsrt0.o
94:
95: print:
96: @pr -f makefile
97: @/usr/ucb/ls -l | pr -f
98: @pr -f *.h *.c
99:
100: clean:
101: rm -f *.o *.exe *.i
102: rm -f a.out b.out boot cat ls icheck mkfs restor rpboot \
103: tpicheck tpmkfs tprestor sboot
104:
105: lint:
106: lint ${COPTS} -hxbn boot.c ${SRCS} | \
107: grep -v 'possible pointer alignment' | \
108: grep -v 'struct/union .* never defined'
109:
110: install: ${ALL}
111: cp tprestor $$DESTDIR/tp/restor
112: cp tpicheck $$DESTDIR/tp/icheck
113: cp tpmkfs $$DESTDIR/tp/mkfs
114: cp sboot $$DESTDIR/tp/boot
115: cp boot icheck mkfs restor cat ls ../floppy
116: cp boot $$DESTDIR
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.