Commit | Line | Data |
---|---|---|
e05d064d BJ |
1 | # Makefile 1.1 %G% |
2 | ||
3 | CFLAGS = -O -DSTANDALONE | |
4 | RELOC= 50000 | |
5 | DRIVERS=hp.o ht.o mba.o up.o uba.o | |
6 | ||
7 | all: /usr/lib/libsa.a srt0.o boot cat ls mkfs restor tpmkfs tprestor | |
8 | ||
9 | /usr/lib/libsa.a: sys.o conf.o hp.o ht.o mba.o up.o uba.o prf.o machdep.o | |
10 | ar crv /usr/lib/libsa.a $? | |
11 | ||
12 | ${DRIVERS}: | |
13 | cc -c -S ${COPTS} $*.c | |
14 | /lib/c2 -i $*.s $*.os | |
15 | as -o $*.o $*.os | |
16 | rm $*.s $*.os | |
17 | ||
18 | boot: boot.o relsrt0.o /usr/lib/libsa.a | |
19 | ld -N -T ${RELOC} relsrt0.o boot.o -lsa -lc | |
20 | cp a.out b.out; strip b.out; dd if=b.out of=boot ibs=32 skip=1; rm b.out | |
21 | ||
22 | cat: cat.o srt0.o /usr/lib/libsa.a | |
23 | ld -N srt0.o cat.o -lsa -lc | |
24 | cp a.out b.out; strip b.out; dd if=b.out of=cat ibs=32 skip=1; rm b.out | |
25 | ||
26 | ls: ls.o srt0.o /usr/lib/libsa.a | |
27 | ld -N srt0.o ls.o -lsa -lc | |
28 | cp a.out b.out; strip b.out; dd if=b.out of=ls ibs=32 skip=1; rm b.out | |
29 | ||
30 | mkfs: mkfs.o srt0.o /usr/lib/libsa.a | |
31 | ld -N srt0.o mkfs.o -lsa -lc | |
32 | cp a.out b.out; strip b.out; dd if=b.out of=mkfs ibs=32 skip=1; rm b.out | |
33 | ||
34 | restor: restor.o srt0.o /usr/lib/libsa.a | |
35 | ld -N srt0.o restor.o -lsa -lc | |
36 | cp a.out b.out; strip b.out; dd if=b.out of=restor ibs=32 skip=1; rm b.out | |
37 | ||
38 | tpmkfs: mkfs.o tpsrt0.o /usr/lib/libsa.a | |
39 | ld -N tpsrt0.o mkfs.o -lsa -lc | |
40 | cp a.out b.out; strip b.out; dd if=b.out of=tpmkfs ibs=32 skip=1; rm b.out | |
41 | ||
42 | tprestor: restor.o tpsrt0.o /usr/lib/libsa.a | |
43 | ld -N tpsrt0.o restor.o -lsa -lc | |
44 | cp a.out b.out; strip b.out; dd if=b.out of=tprestor ibs=32 skip=1; rm b.out | |
45 | ||
46 | srt0.o: rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m srt0.s | |
47 | as -o srt0.o rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m srt0.s | |
48 | ||
49 | tpsrt0.o: rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m tpsrt0.s | |
50 | as -o tpsrt0.o rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m tpsrt0.s | |
51 | ||
52 | relsrt0.o: rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m relsrt0.s | |
53 | as -o relsrt0.o rel.m ../h/mtpr.m ../h/mba.m ../h/uba.m relsrt0.s | |
54 | ||
55 | rpboot: rpboot.s | |
56 | as rpboot.s | |
57 | cp a.out b.out; strip b.out; dd if=b.out of=rpboot bs=32 skip=1; rm b.out | |
58 | print: | |
59 | @pr makefile | |
60 | @/usr/ucb/ls -l | pr | |
61 | @pr *.h | |
62 | @pr *.m *.s | |
63 | @pr *.c | |
64 | ||
65 | clean: | |
66 | rm -f *.o *.exe | |
67 | rm -f a.out b.out boot cat ls mkfs restor rpboot | |
68 | ||
69 | install: | |
70 | cp tprestor ${DESTDIR}/sys/restor | |
71 | cp tpmkfs ${DESTDIR}/sys/mkfs | |
72 | cp boot ${DESTDIR}/sys/boot | |
73 | cp boot mkfs restor cat ls ../floppy |