Commit | Line | Data |
---|---|---|
af359dea | 1 | # @(#)Makefile.vax 7.18 (Berkeley) 12/16/90 |
b28b3a13 KB |
2 | |
3 | # Makefile for 4.4 BSD | |
63264ba3 SL |
4 | # |
5 | # This makefile is constructed from a machine description: | |
277b863c | 6 | # config machineid |
63264ba3 | 7 | # Most changes should be made in the machine description |
b28b3a13 | 8 | # /sys/vax/conf/``machineid'' |
63264ba3 SL |
9 | # after which you should do |
10 | # config machineid | |
b28b3a13 | 11 | # Machine generic makefile changes should be made in |
277b863c | 12 | # /sys/conf/Makefile.``machinetype'' |
b28b3a13 | 13 | # after which config should be rerun for all machines of that type. |
63264ba3 SL |
14 | # |
15 | # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE | |
16 | # IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING | |
17 | # | |
18 | # -DTRACE compile in kernel tracing hooks | |
d35944ef | 19 | # -DQUOTA compile in file system quotas |
194dea02 | 20 | # -DUUDMA compile in unibus tu58 pseudo-dma code |
63264ba3 | 21 | # |
adff367d | 22 | C2= /usr/libexec/c2 |
3fb48ee2 | 23 | LD= /usr/bin/ld |
63264ba3 | 24 | |
b28b3a13 KB |
25 | S= ../.. |
26 | VAX= ../../vax | |
27 | ||
28 | INCLUDES= -I. -I$S -I$S/sys | |
09b428c0 | 29 | COPTS= ${INCLUDES} ${IDENT} -DKERNEL |
63264ba3 SL |
30 | CFLAGS= -O ${COPTS} |
31 | ||
b28b3a13 KB |
32 | INLINECMD= ${VAX}/inline/obj/inline |
33 | INLINE= ${INLINECMD} ${INLINEOPTS} | |
34 | ||
35 | AHEADS= ${VAX}/vax/pcb.m | |
63264ba3 SL |
36 | |
37 | %OBJS | |
38 | ||
39 | %CFILES | |
40 | ||
41 | %LOAD | |
42 | ||
43 | clean: | |
d35944ef | 44 | rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \ |
b28b3a13 | 45 | Errs errs linterrs makelinks |
63264ba3 | 46 | |
93012b9b | 47 | lint: /tmp param.c |
352f9ddd | 48 | @lint -hbxn -DGENERIC ${COPTS} ${PARAM} \ |
b28b3a13 | 49 | ${VAX}/vax/Locore.c ${CFILES} ioconf.c param.c | \ |
63264ba3 SL |
50 | grep -v 'struct/union .* never defined' | \ |
51 | grep -v 'possible pointer alignment problem' | |
52 | ||
b28b3a13 KB |
53 | symbols.sort: ${VAX}/vax/symbols.raw |
54 | grep -v '^#' ${VAX}/vax/symbols.raw \ | |
55 | | sed 's/^ //' | sort -u > symbols.sort | |
56 | ||
57 | ${INLINECMD}: | |
58 | cd ${VAX}/inline; make | |
59 | ||
60 | locore.o: assym.s ${AHEADS} ${VAX}/vax/rpb.s ${VAX}/vax/scb.s ubvec.s | |
61 | locore.o: ${VAX}/vax/locore.s ubglue.s ${VAX}/include/mtpr.h | |
62 | locore.o: ${VAX}/include/trap.h ${VAX}/include/psl.h ${VAX}/include/pte.h | |
63 | locore.o: ${VAX}/include/cpu.h mba.h | |
64 | locore.o: | |
65 | cat assym.s ${VAX}/vax/rpb.s ${VAX}/vax/scb.s ubvec.s \ | |
66 | ${VAX}/vax/locore.s ubglue.s > locore.c | |
67 | ${CC} -E -DLOCORE ${COPTS} locore.c > locore.i | |
63264ba3 SL |
68 | @echo 'as -o locore.o $${AHEADS} locore.i' |
69 | @as -o locore.o ${AHEADS} locore.i | |
70 | @rm locore.i | |
71 | ||
b28b3a13 KB |
72 | emulate.o: ${VAX}/vax/emulate.s |
73 | cpp -I. ${COPTS} ${VAX}/vax/emulate.s | ${AS} -o emulate.o | |
f04ed93f | 74 | |
63264ba3 | 75 | # the following is necessary because autoconf.o depends on #if GENERIC |
277b863c | 76 | autoconf.o tu.o: Makefile |
63264ba3 SL |
77 | |
78 | # the following are necessary because the files depend on the types of | |
79 | # vax cpu's included in the system configuration | |
277b863c MK |
80 | clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile |
81 | crl.o flp.o mba.o uba.o vaxcpu.o : Makefile | |
82 | ||
63264ba3 | 83 | # depend on network configuration |
18e0c9f1 | 84 | af.o uipc_proto.o uipc_domain.o locore.o: Makefile |
277b863c | 85 | |
4c923f40 MK |
86 | # depends on kdb being configured |
87 | trap.o: Makefile | |
88 | ||
263af11d | 89 | # depend on maxusers |
277b863c | 90 | assym.s: Makefile |
63264ba3 | 91 | |
ffb1270e MK |
92 | assym.s: genassym |
93 | ./genassym >assym.s | |
94 | ||
95 | genassym: | |
b28b3a13 | 96 | ${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${VAX}/vax/genassym.c |
ffb1270e | 97 | |
b28b3a13 KB |
98 | depend: assym.s ${CFILES} |
99 | mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c | |
100 | mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${VAX}/vax/genassym.c | |
63264ba3 SL |
101 | |
102 | links: | |
b28b3a13 | 103 | egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ |
63264ba3 SL |
104 | sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink |
105 | echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ | |
106 | sort -u | comm -23 - dontlink | \ | |
107 | sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks | |
108 | echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks | |
109 | echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks | |
110 | sh makelinks && rm -f dontlink | |
111 | ||
112 | tags: | |
b28b3a13 KB |
113 | @echo "see $S/kern/Makefile for tags" |
114 | ||
115 | ioconf.o: | |
09b428c0 | 116 | ${CC} -c -S ${COPTS} ioconf.c |
b28b3a13 | 117 | ${C2} ioconf.s | ${INLINE} | ${AS} -o ioconf.o |
63264ba3 SL |
118 | rm -f ioconf.s |
119 | ||
b28b3a13 KB |
120 | param.c: $S/conf/param.c |
121 | rm -f param.c | |
122 | cp $S/conf/param.c . | |
63264ba3 | 123 | |
277b863c | 124 | param.o: param.c Makefile |
09b428c0 | 125 | ${CC} -c ${CFLAGS} ${PARAM} param.c |
63264ba3 SL |
126 | |
127 | %RULES |