Commit | Line | Data |
---|---|---|
30798539 SL |
1 | # Makefile 7.1 86/01/12 |
2 | # | |
3 | DESTDIR= | |
4 | LIBS= libsa.a ${DESTDIR}/lib/libc.a | |
5 | COPTS= -O -I. -I../h | |
6 | CFLAGS= -DSTANDALONE -DTAHOE ${COPTS} | |
7 | RELOC= 70000 | |
8 | MTARELOC=98000 | |
9 | BOOTRELOC=100000 | |
10 | SRCS= sys.c conf.c prf.c machdep.c | |
11 | DRIVERS=udc.o cy.o vddc.o | |
12 | LDT1MBSYSOPT=-T ${MTARELOC} -x | |
13 | LDTSYSOPT=-T ${BOOTRELOC} -x | |
14 | LDTOPT= -T ${RELOC} -e _entry -x | |
15 | LDTSF= -N -x | |
16 | CFILES= 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 | |
18 | ALL= boot.fsd boot.smd boot.xfd boot.xsd \ | |
19 | boot1mb.fsd boot1mb.smd boot1mb.xfd boot1mb.xsd \ | |
20 | cat ls devcopy fastcopy vdformat | |
21 | ||
22 | all: srt0.o libsa.a ${ALL} | |
23 | ||
24 | install: 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 | ||
29 | clean: | |
30 | rm -f ${ALL} *.o *.map *.bak a.out ncy.c libsa.a | |
31 | ||
32 | machdep.o: machdep.c ../tahoe/mtpr.h ../tahoe/mem.h ../tahoe/SYS.h | |
33 | ${CC} -E ${CFLAGS} machdep.c | ${AS} -o machdep.o | |
34 | ||
35 | libsa.a: sys.o conf.o ${DRIVERS} prf.o machdep.o | |
36 | ar crv $@ $? | |
37 | ranlib $@ | |
38 | ||
39 | boot.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 | ||
43 | boot.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 | ||
47 | boot.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 | ||
51 | boot.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 | ||
55 | boot1mb.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 | ||
59 | boot1mb.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 | ||
63 | boot1mb.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 | ||
67 | boot1mb.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 | ||
71 | cat: cat.o srt0.o ${LIBS} | |
72 | ld ${LDTOPT} -o cat -s srt0.o cat.o ${LIBS} | |
73 | ||
74 | devcopy: devcopy.o srt0.o ${LIBS} | |
75 | ld ${LDTOPT} -o devcopy -s srt0.o devcopy.o ${LIBS} | |
76 | ||
77 | fastcopy: fastcopy.o srt0.o ncy.o ${LIBS} | |
78 | ld ${LDTOPT} -o fastcopy -s srt0.o fastcopy.o ncy.o ${LIBS} | |
79 | ||
80 | xpformat: xpformat.o srt0.o ${LIBS} | |
81 | ld ${LDTOPT} -o xpformat srt0.o xpformat.o ${LIBS} | |
82 | ||
83 | vdformat: vdformat.o srt0.o ${LIBS} | |
84 | ld ${LDTOPT} -o vdformat -s srt0.o vdformat.o ${LIBS} | |
85 | ||
86 | ls: ls.o srt0.o ${LIBS} | |
87 | ld ${LDTOPT} -o ls -s srt0.o ls.o ${LIBS} | |
88 | ||
89 | boot.fsd.o: boot.c | |
90 | ${CC} -c $(COPTS) -DFSD boot.c | |
91 | mv boot.o $@ | |
92 | ||
93 | boot.smd.o: boot.c | |
94 | ${CC} -c $(COPTS) -DSMD boot.c | |
95 | mv boot.o $@ | |
96 | ||
97 | boot.xfd.o: boot.c | |
98 | ${CC} -c $(COPTS) -DXFD boot.c | |
99 | mv boot.o $@ | |
100 | ||
101 | boot.xsd.o: boot.c | |
102 | ${CC} -c $(COPTS) -DXFD boot.c | |
103 | mv boot.o $@ | |
104 | ||
105 | srt0.o: srt0.c | |
106 | ${CC} -E -DRELOC=0x${RELOC} ${CFLAGS} srt0.c | ${AS} -o srt0.o | |
107 | ||
108 | bootsrt0.o: srt0.c | |
109 | ${CC} -E -DRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o bootsrt0.o | |
110 | ||
111 | boot1mbsrt0.o: srt0.c | |
112 | ${CC} -E -DRELOC=0x${MTARELOC} -DREL ${CFLAGS} srt0.c | ${AS} -o boot1mbsrt0.o | |
113 | ||
114 | sfrt0.o: sfrt0.c | |
115 | ${CC} -E -DRELOC=0x${RELOC} -DREL ${CFLAGS} sfrt0.c | ${AS} -o sfrt0.o | |
116 | ||
117 | ncy.c: cy.c | |
118 | ln cy.c ncy.c | |
119 | ||
120 | ncy.o: ncy.c | |
121 | ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c | |
122 | ||
123 | print: | |
124 | @pr -f makefile | |
125 | @/usr/ucb/ls -l | pr -f | |
126 | @pr -f *.h *.c *.lst | |
127 | ||
128 | depend: | |
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 | ||
146 | boot.o: boot.c ./../machine/mtpr.h ../h/param.h | |
147 | boot.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h | |
148 | boot.o: ../h/inode.h ../h/fs.h ../h/vm.h /usr/include/sys/vmparam.h | |
149 | boot.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h | |
150 | boot.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ./saio.h | |
151 | boot.o: ../h/reboot.h /usr/include/a.out.h /usr/include/sys/exec.h | |
152 | cat.o: cat.c | |
153 | conf.o: conf.c ./../machine/pte.h ../h/param.h /usr/include/machine/machparam.h | |
154 | conf.o: ../h/signal.h /usr/include/sys/types.h ../h/inode.h ../h/fs.h ./saio.h | |
155 | ls.o: ls.c ../h/param.h /usr/include/machine/machparam.h ../h/signal.h | |
156 | ls.o: /usr/include/sys/types.h ../h/inode.h ../h/dir.h ../h/fs.h ./saio.h | |
157 | prf.o: prf.c ./../machine/mtpr.h ../h/param.h /usr/include/machine/machparam.h | |
158 | prf.o: ../h/signal.h /usr/include/sys/types.h ./../tahoe/cp.h | |
159 | srt0.o: srt0.c ./../machine/mtpr.h | |
160 | sys.o: sys.c ./../machine/mtpr.h ../h/param.h /usr/include/machine/machparam.h | |
161 | sys.o: ../h/signal.h /usr/include/sys/types.h ../h/inode.h ../h/fs.h ../h/dir.h | |
162 | sys.o: ./saio.h | |
163 | vdformat.o: vdformat.c ./../machine/mtpr.h ../h/param.h | |
164 | vdformat.o: /usr/include/machine/machparam.h ../h/signal.h | |
165 | vdformat.o: /usr/include/sys/types.h ../h/inode.h ../h/fs.h ./saio.h | |
166 | vdformat.o: ./../tahoevba/vddcreg.h /usr/include/setjmp.h | |
167 | ls.o: ls.c ../h/param.h /usr/include/machine/machparam.h ../h/signal.h | |
168 | ls.o: /usr/include/sys/types.h ../h/inode.h ../h/dir.h ../h/fs.h ./saio.h | |
169 | fastcopy.o: fastcopy.c | |
170 | devcopy.o: devcopy.c | |
171 | cat.o: cat.c | |
172 | vddc.o: vddc.c ./../machine/mtpr.h ../h/param.h | |
173 | vddc.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h | |
174 | vddc.o: ../h/inode.h ../h/fs.h ./../tahoevba/vddcreg.h ./saio.h | |
175 | cy.o: cy.c ./../machine/pte.h ./../machine/mtpr.h ../h/param.h | |
176 | cy.o: /usr/include/machine/machparam.h ../h/signal.h /usr/include/sys/types.h | |
177 | cy.o: ../h/inode.h ../h/fs.h ./saio.h ./cyvar.h |