date and time created 86/01/12 18:04:55 by sam
[unix-history] / usr / src / sys / tahoe / stand / Makefile
CommitLineData
30798539
SL
1# Makefile 7.1 86/01/12
2#
3DESTDIR=
4LIBS= libsa.a ${DESTDIR}/lib/libc.a
5COPTS= -O -I. -I../h
6CFLAGS= -DSTANDALONE -DTAHOE ${COPTS}
7RELOC= 70000
8MTARELOC=98000
9BOOTRELOC=100000
10SRCS= sys.c conf.c prf.c machdep.c
11DRIVERS=udc.o cy.o vddc.o
12LDT1MBSYSOPT=-T ${MTARELOC} -x
13LDTSYSOPT=-T ${BOOTRELOC} -x
14LDTOPT= -T ${RELOC} -e _entry -x
15LDTSF= -N -x
16CFILES= boot.c cat.c conf.c ls.c prf.c srt0.c sys.c vdformat.c ls.c \
17 fastcopy.c devcopy.c cat.c vddc.c cy.c
18ALL= boot.fsd boot.smd boot.xfd boot.xsd \
19 boot1mb.fsd boot1mb.smd boot1mb.xfd boot1mb.xsd \
20 cat ls devcopy fastcopy vdformat
21
22all: srt0.o libsa.a ${ALL}
23
24install: all
25 install -c -m 644 libsa.a ${DESTDIR}/usr/lib/libsa.a
26 for i in ${ALL}; do install -m 644 $$i ${DESTDIR}/stand; done
27 rm -f ${DESTDIR}/boot; cp ${DESTDIR}/stand/boot.fsd ${DESTDIR}/boot
28
29clean:
30 rm -f ${ALL} *.o *.map *.bak a.out ncy.c libsa.a
31
32machdep.o: machdep.c ../tahoe/mtpr.h ../tahoe/mem.h ../tahoe/SYS.h
33 ${CC} -E ${CFLAGS} machdep.c | ${AS} -o machdep.o
34
35libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o
36 ar crv $@ $?
37 ranlib $@
38
39boot.fsd: boot.fsd.o bootsrt0.o ${LIBS}
40 ld ${LDTSYSOPT} bootsrt0.o boot.fsd.o ${LIBS}
41 dd if=a.out of=boot.fsd ibs=1024 skip=1
42
43boot.smd: boot.smd.o bootsrt0.o ${LIBS}
44 ld ${LDTSYSOPT} bootsrt0.o boot.smd.o ${LIBS}
45 dd if=a.out of=boot.smd ibs=1024 skip=1
46
47boot.xfd: boot.xfd.o bootsrt0.o ${LIBS}
48 ld ${LDTSYSOPT} bootsrt0.o boot.xfd.o ${LIBS}
49 dd if=a.out of=boot.xfd ibs=1024 skip=1
50
51boot.xsd: boot.xsd.o bootsrt0.o ${LIBS}
52 ld ${LDTSYSOPT} bootsrt0.o boot.xsd.o ${LIBS}
53 dd if=a.out of=boot.xsd ibs=1024 skip=1
54
55boot1mb.fsd: boot.fsd.o boot1mbsrt0.o ${LIBS}
56 ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.fsd.o ${LIBS}
57 dd if=a.out of=boot1mb.fsd ibs=1024 skip=1
58
59boot1mb.smd: boot.smd.o boot1mbsrt0.o ${LIBS}
60 ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.smd.o ${LIBS}
61 dd if=a.out of=boot1mb.smd ibs=1024 skip=1
62
63boot1mb.xfd: boot.xfd.o boot1mbsrt0.o ${LIBS}
64 ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.xfd.o ${LIBS}
65 dd if=a.out of=boot1mb.xfd ibs=1024 skip=1
66
67boot1mb.xsd: boot.xsd.o boot1mbsrt0.o ${LIBS}
68 ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.xsd.o ${LIBS}
69 dd if=a.out of=boot1mb.xsd ibs=1024 skip=1
70
71cat: cat.o srt0.o ${LIBS}
72 ld ${LDTOPT} -o cat -s srt0.o cat.o ${LIBS}
73
74devcopy: devcopy.o srt0.o ${LIBS}
75 ld ${LDTOPT} -o devcopy -s srt0.o devcopy.o ${LIBS}
76
77fastcopy: fastcopy.o srt0.o ncy.o ${LIBS}
78 ld ${LDTOPT} -o fastcopy -s srt0.o fastcopy.o ncy.o ${LIBS}
79
80xpformat: xpformat.o srt0.o ${LIBS}
81 ld ${LDTOPT} -o xpformat srt0.o xpformat.o ${LIBS}
82
83vdformat: vdformat.o srt0.o ${LIBS}
84 ld ${LDTOPT} -o vdformat -s srt0.o vdformat.o ${LIBS}
85
86ls: ls.o srt0.o ${LIBS}
87 ld ${LDTOPT} -o ls -s srt0.o ls.o ${LIBS}
88
89boot.fsd.o: boot.c
90 ${CC} -c $(COPTS) -DFSD boot.c
91 mv boot.o $@
92
93boot.smd.o: boot.c
94 ${CC} -c $(COPTS) -DSMD boot.c
95 mv boot.o $@
96
97boot.xfd.o: boot.c
98 ${CC} -c $(COPTS) -DXFD boot.c
99 mv boot.o $@
100
101boot.xsd.o: boot.c
102 ${CC} -c $(COPTS) -DXFD boot.c
103 mv boot.o $@
104
105srt0.o: srt0.c
106 ${CC} -E -DRELOC=0x${RELOC} ${CFLAGS} srt0.c | ${AS} -o srt0.o
107
108bootsrt0.o: srt0.c
109 ${CC} -E -DRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o bootsrt0.o
110
111boot1mbsrt0.o: srt0.c
112 ${CC} -E -DRELOC=0x${MTARELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o boot1mbsrt0.o
113
114sfrt0.o: sfrt0.c
115 ${CC} -E -DRELOC=0x${RELOC} -DREL ${CFLAGS} sfrt0.c | ${AS} -o sfrt0.o
116
117ncy.c: cy.c
118 ln cy.c ncy.c
119
120ncy.o: ncy.c
121 ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c
122
123print:
124 @pr -f makefile
125 @/usr/ucb/ls -l | pr -f
126 @pr -f *.h *.c *.lst
127
128depend:
129 ${CC} -M ${COPTS} ${CFILES} | \
130 sed -e ':loop' \
131 -e 's/\.\.\/[^ /]*\/\.\./../' \
132 -e 't loop' | \
133 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \
134 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
135 else rec = rec " " $$2 } } \
136 END { print rec } ' > makedep
137 echo '/^# DO NOT DELETE THIS LINE/+1,$$d' >eddep
138 echo '$$r makedep' >>eddep
139 echo 'w' >>eddep
140 cp Makefile Makefile.bak
141 ex - Makefile < eddep
142 rm eddep makedep
143
144# DO NOT DELETE THIS LINE -- make depend uses it
145
146boot.o: boot.c ./../machine/mtpr.h ../h/param.h
147boot.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h
148boot.o: ../h/inode.h ../h/fs.h ../h/vm.h /usr/include/sys/vmparam.h
149boot.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h
150boot.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ./saio.h
151boot.o: ../h/reboot.h /usr/include/a.out.h /usr/include/sys/exec.h
152cat.o: cat.c
153conf.o: conf.c ./../machine/pte.h ../h/param.h /usr/include/machine/machparam.h
154conf.o: ../h/signal.h /usr/include/sys/types.h ../h/inode.h ../h/fs.h ./saio.h
155ls.o: ls.c ../h/param.h /usr/include/machine/machparam.h ../h/signal.h
156ls.o: /usr/include/sys/types.h ../h/inode.h ../h/dir.h ../h/fs.h ./saio.h
157prf.o: prf.c ./../machine/mtpr.h ../h/param.h /usr/include/machine/machparam.h
158prf.o: ../h/signal.h /usr/include/sys/types.h ./../tahoe/cp.h
159srt0.o: srt0.c ./../machine/mtpr.h
160sys.o: sys.c ./../machine/mtpr.h ../h/param.h /usr/include/machine/machparam.h
161sys.o: ../h/signal.h /usr/include/sys/types.h ../h/inode.h ../h/fs.h ../h/dir.h
162sys.o: ./saio.h
163vdformat.o: vdformat.c ./../machine/mtpr.h ../h/param.h
164vdformat.o: /usr/include/machine/machparam.h ../h/signal.h
165vdformat.o: /usr/include/sys/types.h ../h/inode.h ../h/fs.h ./saio.h
166vdformat.o: ./../tahoevba/vddcreg.h /usr/include/setjmp.h
167ls.o: ls.c ../h/param.h /usr/include/machine/machparam.h ../h/signal.h
168ls.o: /usr/include/sys/types.h ../h/inode.h ../h/dir.h ../h/fs.h ./saio.h
169fastcopy.o: fastcopy.c
170devcopy.o: devcopy.c
171cat.o: cat.c
172vddc.o: vddc.c ./../machine/mtpr.h ../h/param.h
173vddc.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h
174vddc.o: ../h/inode.h ../h/fs.h ./../tahoevba/vddcreg.h ./saio.h
175cy.o: cy.c ./../machine/pte.h ./../machine/mtpr.h ../h/param.h
176cy.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h
177cy.o: ../h/inode.h ../h/fs.h ./saio.h ./cyvar.h