xref: /original-bsd/sys/tahoe/conf/Makefile.tahoe (revision da818fbb)
1#	@(#)Makefile.tahoe	1.20 (Berkeley) 09/06/89
2#
3# Makefile for 4.3 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
11# Generic makefile changes should be made in
12#	/sys/conf/Makefile.``machinetype''
13# after which config should be rerun for all machines.
14#
15# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE 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
20#
21C2=	/usr/libexec/c2
22LD=	/usr/bin/ld
23TOUCH=	touch -f -c
24INDIR=	../tahoe/inline
25INLINE=	${INDIR}/inline
26
27INCLUDES= -I. -I../sys
28COPTS=	${INCLUDES} ${IDENT} -DKERNEL
29CFLAGS=	-O ${COPTS}
30
31%OBJS
32
33%CFILES
34
35%LOAD
36
37clean:
38	rm -f eddep *vmunix tags *.o locore.i [a-uw-z]*.s \
39		errs linterrs makelinks
40
41lint: /tmp param.c
42	@lint -hbxn -I. -DGENERIC ${COPTS} ${PARAM} \
43	  ../tahoe/Locore.c ${CFILES} ioconf.c param.c | \
44	    grep -v 'struct/union .* never defined' | \
45	    grep -v 'possible pointer alignment problem'
46
47../tahoe/symbols.sort: ../tahoe/symbols.raw
48	grep -v '^#' ../tahoe/symbols.raw \
49	    | sed 's/^	//' | sort -u > ../tahoe/symbols.sort
50
51${INLINE}: ${INDIR}/inline.h ${INDIR}/langpats.c
52${INLINE}: ${INDIR}/libcpats.c ${INDIR}/machdep.c
53${INLINE}: ${INDIR}/machpats.c ${INDIR}/main.c
54	cd ${INDIR}; make
55
56locore.o: assym.s ../tahoe/scb.s vbvec.s ../tahoe/locore.s \
57    vbglue.s ../tahoe/mtpr.h ../tahoe/trap.h ../tahoe/psl.h \
58    ../tahoe/pte.h ../tahoe/cp.h ../tahoe/mem.h
59	cat assym.s ../tahoe/scb.s vbvec.s ../tahoe/locore.s \
60	    vbglue.s > locore.c
61	${CC} -E -I. -DLOCORE ${COPTS} locore.c > locore.i
62	@echo 'as -o locore.o locore.i'
63	@${AS} -o locore.o locore.i
64	@rm locore.i
65
66# the following is necessary because autoconf.o depends on #if GENERIC
67autoconf.o: Makefile
68
69# depend on network configuration
70af.o uipc_proto.o locore.o: Makefile
71
72# depend on maxusers
73assym.s machdep.o: Makefile
74
75# depends on KDB (cons.o also depends on GENERIC)
76trap.o cons.o: Makefile
77
78assym.s: genassym
79	./genassym >assym.s
80
81genassym:
82	cc ${INCLUDES} ${IDENT} ${PARAM} -o genassym ../tahoe/genassym.c
83
84depend: assym.s
85	mkdep ${COPTS} ${CFILES} ioconf.c
86	mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ../tahoe/genassym.c
87
88links:
89	egrep '#if' ${CFILES} | sed -f ../conf/defines | \
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	echo 'rm -f udiv.o;ln -s ../GENERIC/udiv.o udiv.o' >> makelinks
95	echo 'rm -f urem.o;ln -s ../GENERIC/urem.o urem.o' >> makelinks
96	sh makelinks && rm -f dontlink
97
98tags:
99	@echo "see ../sys/Makefile for tags"
100
101print:
102	@pr -f Makefile ../sys/TODO linterrs
103	@/usr/ucb/ctags -x ${CFILES} | pr -f -h XREF
104	@(size vmunix *.o) | pr -f -h sizes
105	@ls -ls | pr -f
106	@cd ../sys; ls -ls | pr -f ; pr -f *.m *.h
107	@echo 'once upon a time ...'
108	@cd ../tahoe; pr -f Locore.c scb.s locore.s
109	@cd ${INDIR}; make print
110	@pr -f ${CFILES}
111
112ioconf.o: ioconf.c ../sys/param.h ../tahoe/pte.h ../sys/buf.h ../sys/map.h \
113    ../sys/vm.h ../tahoevba/vbavar.h
114
115param.c: ../conf/param.c
116	-rm -f param.c
117	cp ../conf/param.c .
118
119param.o: param.c Makefile
120	${CC} -c ${CFLAGS} ${PARAM} param.c
121
122%RULES
123
124# DO NOT DELETE THIS LINE -- make depend uses it
125
126