ld has moved
[unix-history] / usr / src / sys / hp300 / conf / Makefile.hp300
CommitLineData
731b4a98 1# @(#)Makefile.hp300 7.9 (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 20#
b3ceaca8
MK
21AS= as ${PROF}
22CC= cc ${PROF}
23CPP= cpp
731b4a98 24LD= ld
77df1ba3
KM
25TOUCH= touch -f -c
26
b28b3a13
KB
27S= ../..
28HP300= ../../hp300
29
30INCLUDES= -I. -I$S -I$S/sys
b3ceaca8 31COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Dmc68020 -Dhp300 -DFPCOPROC -DREFBIT
77df1ba3
KM
32CFLAGS= -O ${COPTS}
33
77df1ba3
KM
34%OBJS
35
36%CFILES
37
38%LOAD
39
40clean:
41 rm -f eddep *vmunix tags *.o locore.i [a-z]*.s \
b28b3a13 42 Errs errs linterrs makelinks
77df1ba3 43
b28b3a13 44lint: /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
51symbols.sort: ${HP300}/hp300/symbols.raw
52 grep -v '^#' ${HP300}/hp300/symbols.raw \
53 | sed 's/^ //' | sort -u > symbols.sort
54
55locore.o: assym.s ${HP300}/hp300/vectors.s ${HP300}/hp300/locore.s
b3ceaca8 56locore.o: ${HP300}/include/trap.h ${HP300}/include/psl.h ${HP300}/hp300/pte.h
b28b3a13 57locore.o: ${HP300}/include/cpu.h
b3ceaca8 58 ${CPP} -DLOCORE ${COPTS} ${HP300}/hp300/locore.s | ${AS} -o locore.o
77df1ba3 59
77df1ba3
KM
60# the following is necessary because autoconf.o depends on #if GENERIC
61autoconf.o: Makefile
62
63# the following are necessary because the files depend on the types of
64# hp cpu's included in the system configuration
65clock.o machdep.o autoconf.o conf.o: Makefile
66
67# depend on network configuration
68af.o uipc_proto.o locore.o: Makefile
69
70# depend on maxusers
71assym.s: Makefile
72
a0b15fca
MK
73assym.s: genassym
74 ./genassym >assym.s
75
76genassym:
b28b3a13
KB
77 ${CC} ${INCLUDES} ${IDENT} ${PARAM} -Dmc68020 -Dhp300 -o genassym \
78 ${HP300}/hp300/genassym.c
a0b15fca
MK
79
80depend: assym.s param.c
b3ceaca8 81 mkdep ${COPTS} ${CFILES} ioconf.c param.c
b28b3a13 82 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${HP300}/hp300/genassym.c
77df1ba3
KM
83
84links:
b28b3a13 85 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
77df1ba3
KM
86 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
87 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
88 sort -u | comm -23 - dontlink | \
89 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
90 sh makelinks && rm -f dontlink
91
92tags:
b28b3a13 93 @echo "see $S/kern/Makefile for tags"
77df1ba3
KM
94
95ioconf.o: ioconf.c
96 ${CC} -c ${CFLAGS} ioconf.c
97
b28b3a13
KB
98param.c: $S/conf/param.c
99 rm -f param.c
100 cp $S/conf/param.c .
77df1ba3
KM
101
102param.o: param.c Makefile
103 ${CC} -c ${CFLAGS} ${PARAM} param.c
104
105%RULES