Commit | Line | Data |
---|---|---|
b5b3d31d | 1 | # @(#)Makefile.hp300 7.7 (Berkeley) %G% |
77df1ba3 KM |
2 | # |
3 | # Makefile for 4.4 BSD | |
4 | # | |
5 | # This makefile is constructed from a machine description: | |
6 | # config machineid | |
7 | # Most changes should be made in the machine description | |
8 | # /sys/conf/``machineid'' | |
9 | # after which you should do | |
10 | # config machineid | |
b28b3a13 | 11 | # Machine generic makefile changes should be made in |
77df1ba3 | 12 | # /sys/conf/Makefile.``machinetype'' |
b28b3a13 | 13 | # after which config should be rerun for all machines of that type. |
77df1ba3 KM |
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 | |
19 | # -DQUOTA compile in file system quotas | |
77df1ba3 KM |
20 | # |
21 | AS= as | |
b5b3d31d KB |
22 | CC= cc -Dconst=__const -Dvolatile=__volatile \ |
23 | -Dsigned=__signed -Dinline=__inline -Uunix -fpcc-struct-return | |
77df1ba3 KM |
24 | LD= /bin/ld |
25 | TOUCH= touch -f -c | |
26 | ||
b28b3a13 KB |
27 | S= ../.. |
28 | HP300= ../../hp300 | |
29 | ||
30 | INCLUDES= -I. -I$S -I$S/sys | |
ffcda181 | 31 | COPTS= ${INCLUDES} ${IDENT} -DNVM -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT |
77df1ba3 KM |
32 | CFLAGS= -O ${COPTS} |
33 | ||
77df1ba3 KM |
34 | %OBJS |
35 | ||
36 | %CFILES | |
37 | ||
38 | %LOAD | |
39 | ||
40 | clean: | |
41 | rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \ | |
b28b3a13 | 42 | Errs errs linterrs makelinks |
77df1ba3 | 43 | |
b28b3a13 | 44 | lint: /tmp param.c |
77df1ba3 | 45 | @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \ |
b28b3a13 KB |
46 | ${HP300}/hp300/Locore.c ${CFILES} ${HP300}/hp300/swapgeneric.c \ |
47 | ioconf.c param.c| \ | |
77df1ba3 KM |
48 | grep -v 'struct/union .* never defined' | \ |
49 | grep -v 'possible pointer alignment problem' | |
50 | ||
b28b3a13 KB |
51 | symbols.sort: ${HP300}/hp300/symbols.raw |
52 | grep -v '^#' ${HP300}/hp300/symbols.raw \ | |
53 | | sed 's/^ //' | sort -u > symbols.sort | |
54 | ||
55 | locore.o: assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s | |
56 | locore.o: ${HP300}/include/trap.h ${HP300}/include/psl.h ${HP300}/include/pte.h | |
57 | locore.o: ${HP300}/include/cpu.h | |
58 | cat assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s > locore.c | |
59 | ${CC} -E -DLOCORE ${COPTS} locore.c > locore.i | |
60 | @echo 'as -o locore.o locore.i' | |
71fd59bc | 61 | @${AS} -o locore.o locore.i |
77df1ba3 KM |
62 | @rm locore.i |
63 | ||
77df1ba3 KM |
64 | # the following is necessary because autoconf.o depends on #if GENERIC |
65 | autoconf.o: Makefile | |
66 | ||
67 | # the following are necessary because the files depend on the types of | |
68 | # hp cpu's included in the system configuration | |
69 | clock.o machdep.o autoconf.o conf.o: Makefile | |
70 | ||
71 | # depend on network configuration | |
72 | af.o uipc_proto.o locore.o: Makefile | |
73 | ||
74 | # depend on maxusers | |
75 | assym.s: Makefile | |
76 | ||
a0b15fca MK |
77 | assym.s: genassym |
78 | ./genassym >assym.s | |
79 | ||
80 | genassym: | |
b28b3a13 KB |
81 | ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \ |
82 | ${HP300}/hp300/genassym.c | |
a0b15fca MK |
83 | |
84 | depend: assym.s param.c | |
85 | mkdep ${COPTS} ${CFILES} ioconf.c | |
b28b3a13 | 86 | mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c |
77df1ba3 KM |
87 | |
88 | links: | |
b28b3a13 | 89 | egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ |
77df1ba3 KM |
90 | sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink |
91 | echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ | |
92 | sort -u | comm -23 - dontlink | \ | |
93 | sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks | |
94 | sh makelinks && rm -f dontlink | |
95 | ||
96 | tags: | |
b28b3a13 | 97 | @echo "see $S/kern/Makefile for tags" |
77df1ba3 KM |
98 | |
99 | ioconf.o: ioconf.c | |
100 | ${CC} -c ${CFLAGS} ioconf.c | |
101 | ||
b28b3a13 KB |
102 | param.c: $S/conf/param.c |
103 | rm -f param.c | |
104 | cp $S/conf/param.c . | |
77df1ba3 KM |
105 | |
106 | param.o: param.c Makefile | |
107 | ${CC} -c ${CFLAGS} ${PARAM} param.c | |
108 | ||
109 | %RULES |