Commit | Line | Data |
---|---|---|
30798539 | 1 | # |
e613cc84 KB |
2 | # Copyright (c) 1987 Regents of the University of California. |
3 | # All rights reserved. | |
4 | # | |
5 | # Redistribution and use in source and binary forms are permitted | |
6 | # provided that this notice is preserved and that due credit is given | |
7 | # to the University of California at Berkeley. The name of the University | |
8 | # may not be used to endorse or promote products derived from this | |
9 | # software without specific prior written permission. This software | |
10 | # is provided ``as is'' without express or implied warranty. | |
11 | # | |
12 | # @(#)Makefile 7.8 (Berkeley) %G% | |
13 | # | |
14 | RELOC= 800 | |
15 | MTBOOTRELOC= e0000 | |
16 | BOOTRELOC= e0000 | |
17 | LDT1MBSYSOPT= -T ${MTBOOTRELOC} -x | |
18 | LDTSYSOPT= -T ${BOOTRELOC} -x | |
19 | LDTOPT= -T ${RELOC} -e _entry -x | |
20 | ||
30798539 | 21 | DESTDIR= |
e613cc84 | 22 | VPATH= ../stand |
30798539 | 23 | LIBS= libsa.a ${DESTDIR}/lib/libc.a |
e613cc84 KB |
24 | COPTS= -O -I. -I../stand -I../h |
25 | CFLAGS= -DSTANDALONE -DCOMPAT_42 -DTAHOE -DRELOC=0x${RELOC} ${COPTS} | |
109688a4 | 26 | SUBDIR= vdformat |
e613cc84 | 27 | ALL= boot cat copy ls |
30798539 | 28 | |
e613cc84 KB |
29 | SRCS= boot.c cat.c conf.c copy.c dev.c getfile.c gets.c ls.c prf.c \ |
30 | srt0.c sys.c vd.c cy.c hdc.c | |
31 | DRIVERS=cy.o vd.o hdc.o | |
30798539 | 32 | |
e613cc84 KB |
33 | #all: srt0.o libsa.a ${ALL} ${SUBDIR} |
34 | all: srt0.o libsa.a ${ALL} | |
30798539 | 35 | |
e613cc84 KB |
36 | ${SUBDIR}: FRC |
37 | cd $@; make ${MFLAGS} | |
30798539 SL |
38 | |
39 | machdep.o: machdep.c ../tahoe/mtpr.h ../tahoe/mem.h ../tahoe/SYS.h | |
40 | ${CC} -E ${CFLAGS} machdep.c | ${AS} -o machdep.o | |
41 | ||
e613cc84 KB |
42 | libsa.a: conf.o dev.o getfile.o gets.o machdep.o prf.o printn.o sys.o \ |
43 | ${DRIVERS} | |
30798539 SL |
44 | ar crv $@ $? |
45 | ranlib $@ | |
46 | ||
e613cc84 | 47 | boot: boot.o bootsrt0.o ${LIBS} |
109688a4 MK |
48 | ld ${LDTSYSOPT} bootsrt0.o boot.o ${LIBS} |
49 | nm -u a.out | |
50 | size a.out | |
51 | dd if=a.out of=boot ibs=1024 skip=1 | |
52 | -rm -f a.out | |
30798539 | 53 | |
109688a4 MK |
54 | boot1mb: boot.o boot1mbsrt0.o ${LIBS} |
55 | ld ${LDT1MBSYSOPT} boot1mbsrt0.o boot.o ${LIBS} | |
56 | nm -u a.out | |
57 | size a.out | |
58 | dd if=a.out of=boot1mb ibs=1024 skip=1 | |
59 | -rm -f a.out | |
30798539 | 60 | |
e613cc84 KB |
61 | cat: cat.o srt0.o ${LIBS} |
62 | ld ${LDTOPT} -o $@ -s srt0.o cat.o ${LIBS} | |
30798539 | 63 | |
e613cc84 KB |
64 | copy: copy.o srt0.o ncy.o ${LIBS} |
65 | ld ${LDTOPT} -o $@ srt0.o copy.o ncy.o ${LIBS} | |
30798539 SL |
66 | |
67 | xpformat: xpformat.o srt0.o ${LIBS} | |
e613cc84 | 68 | ld ${LDTOPT} -o $@ srt0.o xpformat.o ${LIBS} |
30798539 | 69 | |
e613cc84 KB |
70 | ls: ls.o srt0.o ${LIBS} |
71 | ld ${LDTOPT} -o $@ -s srt0.o ls.o ${LIBS} | |
30798539 | 72 | |
30798539 | 73 | srt0.o: srt0.c |
f261dcf3 | 74 | ${CC} -E ${CFLAGS} srt0.c | ${AS} -o srt0.o |
30798539 SL |
75 | |
76 | bootsrt0.o: srt0.c | |
f261dcf3 | 77 | ${CC} -E -DBOOTRELOC=0x${BOOTRELOC} -DREL ${CFLAGS} srt0.c | \ |
109688a4 | 78 | ${AS} -o bootsrt0.o |
30798539 SL |
79 | |
80 | boot1mbsrt0.o: srt0.c | |
f261dcf3 | 81 | ${CC} -E -DBOOTRELOC=0x${MTBOOTRELOC} -DREL ${CFLAGS} srt0.c | \ |
109688a4 | 82 | ${AS} -o boot1mbsrt0.o |
30798539 | 83 | |
e613cc84 | 84 | ncy.c: cy.c |
f261dcf3 | 85 | rm -f ncy.c |
30798539 SL |
86 | ln cy.c ncy.c |
87 | ||
e613cc84 | 88 | ncy.o: ncy.c |
30798539 SL |
89 | ${CC} -DNOBLOCK ${CFLAGS} -c ncy.c |
90 | ||
e613cc84 KB |
91 | clean: FRC |
92 | rm -f ${ALL} *.o *.map *.bak a.out ncy.c libsa.a | |
93 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} clean); done | |
94 | ||
95 | depend: ${SRCS} FRC | |
96 | mkdep ${COPTS} ${SRCS} | |
97 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} depend); done | |
30798539 | 98 | |
e613cc84 KB |
99 | install: FRC |
100 | -mkdir ${DESTDIR}/stand | |
101 | for i in ${ALL}; do \ | |
102 | install -o bin -g bin -m 644 $$i ${DESTDIR}/stand/$$i; \ | |
103 | done | |
104 | rm -f ${DESTDIR}/boot; | |
105 | cp ${DESTDIR}/stand/boot ${DESTDIR}/boot | |
106 | for i in ${SUBDIR}; do \ | |
107 | (cd $$i; make ${MFLAGS} DESTDIR=${DESTDIR} install) \ | |
108 | done | |
891f5a89 | 109 | |
e613cc84 KB |
110 | tags: ${SRCS} FRC |
111 | ctags ${SRCS} | |
112 | for i in ${SUBDIR}; do (cd $$i; make ${MFLAGS} tags); done | |
891f5a89 KB |
113 | |
114 | FRC: | |
115 | ||
116 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
117 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
118 | ||
119 | boot.o: boot.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h | |
120 | boot.o: ../h/signal.h /usr/include/machine/trap.h | |
e613cc84 KB |
121 | boot.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h |
122 | boot.o: ../h/inode.h ../h/fs.h ../h/vm.h /usr/include/sys/vmparam.h | |
123 | boot.o: /usr/include/machine/vmparam.h /usr/include/sys/vmmac.h | |
124 | boot.o: /usr/include/sys/vmmeter.h /usr/include/sys/vmsystm.h ../stand/saio.h | |
125 | boot.o: ../stand/saioctl.h ../stand/saerrno.h ../h/reboot.h | |
126 | boot.o: /usr/include/a.out.h /usr/include/sys/exec.h | |
127 | cat.o: ../stand/cat.c | |
128 | conf.o: conf.c ../h/param.h /usr/include/sys/types.h ../h/signal.h | |
129 | conf.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h | |
130 | conf.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../stand/saio.h | |
131 | conf.o: ../stand/saioctl.h ../stand/saerrno.h | |
132 | copy.o: ../stand/copy.c | |
133 | dev.o: ../stand/dev.c ../h/param.h /usr/include/sys/types.h ../h/signal.h | |
134 | dev.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h | |
135 | dev.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../stand/saio.h | |
136 | dev.o: ../stand/saioctl.h ../stand/saerrno.h | |
137 | getfile.o: ../stand/getfile.c ../h/param.h /usr/include/sys/types.h | |
138 | getfile.o: ../h/signal.h /usr/include/machine/trap.h | |
139 | getfile.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h | |
140 | getfile.o: ../h/inode.h ../h/fs.h ../stand/saio.h ../stand/saioctl.h | |
141 | getfile.o: ../stand/saerrno.h | |
142 | gets.o: ../stand/gets.c | |
143 | ls.o: ../stand/ls.c ../h/param.h /usr/include/sys/types.h ../h/signal.h | |
144 | ls.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h | |
145 | ls.o: /usr/include/machine/endian.h ../h/inode.h ../h/dir.h ../h/fs.h | |
146 | ls.o: ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h | |
891f5a89 KB |
147 | prf.o: prf.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h |
148 | prf.o: ../h/signal.h /usr/include/machine/trap.h | |
e613cc84 KB |
149 | prf.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h |
150 | prf.o: ../tahoe/cp.h | |
891f5a89 | 151 | srt0.o: srt0.c ../machine/mtpr.h |
e613cc84 | 152 | sys.o: ../stand/sys.c ../h/param.h /usr/include/sys/types.h ../h/signal.h |
891f5a89 | 153 | sys.o: /usr/include/machine/trap.h /usr/include/machine/machparam.h |
e613cc84 KB |
154 | sys.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/dir.h |
155 | sys.o: ../h/reboot.h ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h | |
891f5a89 KB |
156 | vd.o: vd.c ../machine/mtpr.h ../h/param.h /usr/include/sys/types.h |
157 | vd.o: ../h/signal.h /usr/include/machine/trap.h | |
e613cc84 KB |
158 | vd.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h |
159 | vd.o: ../h/inode.h ../h/fs.h ../h/buf.h ../h/disklabel.h ../stand/saio.h | |
160 | vd.o: ../stand/saioctl.h ../stand/saerrno.h ../tahoevba/vdreg.h | |
161 | vd.o: ../tahoevba/vbaparam.h | |
891f5a89 KB |
162 | cy.o: cy.c ../machine/pte.h ../machine/mtpr.h ../h/param.h |
163 | cy.o: /usr/include/sys/types.h ../h/signal.h /usr/include/machine/trap.h | |
e613cc84 KB |
164 | cy.o: /usr/include/machine/machparam.h /usr/include/machine/endian.h |
165 | cy.o: ../h/inode.h ../h/fs.h ../stand/saio.h ../stand/saioctl.h | |
166 | cy.o: ../stand/saerrno.h ../tahoevba/cyreg.h ../tahoevba/vbaparam.h | |
891f5a89 KB |
167 | hdc.o: hdc.c /usr/include/machine/mtpr.h ../h/param.h ../h/types.h |
168 | hdc.o: ../h/signal.h /usr/include/machine/trap.h ../h/../machine/machparam.h | |
e613cc84 KB |
169 | hdc.o: /usr/include/machine/endian.h ../h/inode.h ../h/fs.h ../h/buf.h |
170 | hdc.o: ../h/ioctl.h ../h/ttychars.h ../h/ttydev.h ../h/disklabel.h | |
171 | hdc.o: ../stand/saio.h ../stand/saioctl.h ../stand/saerrno.h ../tahoevba/hdc.h | |
891f5a89 KB |
172 | |
173 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |