xref: /original-bsd/sys/vax/conf/Makefile.vax (revision d272e02a)
1#	@(#)Makefile.vax	7.18 (Berkeley) 12/16/90
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/vax/conf/``machineid''
9# after which you should do
10#	 config machineid
11# Machine generic makefile changes should be made in
12#	/sys/conf/Makefile.``machinetype''
13# after which config should be rerun for all machines of that type.
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
20# -DUUDMA	compile in unibus tu58 pseudo-dma code
21#
22C2=	/usr/libexec/c2
23LD=	/usr/bin/ld
24
25S=	../..
26VAX=	../../vax
27
28INCLUDES= -I. -I$S -I$S/sys
29COPTS=	${INCLUDES} ${IDENT} -DKERNEL
30CFLAGS=	-O ${COPTS}
31
32INLINECMD=	${VAX}/inline/obj/inline
33INLINE= ${INLINECMD} ${INLINEOPTS}
34
35AHEADS=	${VAX}/vax/pcb.m
36
37%OBJS
38
39%CFILES
40
41%LOAD
42
43clean:
44	rm -f eddep *vmunix tags *.o locore.i [a-tv-z]*.s \
45		Errs errs linterrs makelinks
46
47lint: /tmp param.c
48	@lint -hbxn -DGENERIC ${COPTS} ${PARAM} \
49	  ${VAX}/vax/Locore.c ${CFILES} ioconf.c param.c | \
50	    grep -v 'struct/union .* never defined' | \
51	    grep -v 'possible pointer alignment problem'
52
53symbols.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
60locore.o: assym.s ${AHEADS} ${VAX}/vax/rpb.s ${VAX}/vax/scb.s ubvec.s
61locore.o: ${VAX}/vax/locore.s ubglue.s ${VAX}/include/mtpr.h
62locore.o: ${VAX}/include/trap.h ${VAX}/include/psl.h ${VAX}/include/pte.h
63locore.o: ${VAX}/include/cpu.h mba.h
64locore.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
68	@echo 'as -o locore.o $${AHEADS} locore.i'
69	@as -o locore.o ${AHEADS} locore.i
70	@rm locore.i
71
72emulate.o: ${VAX}/vax/emulate.s
73	cpp -I. ${COPTS} ${VAX}/vax/emulate.s | ${AS} -o emulate.o
74
75# the following is necessary because autoconf.o depends on #if GENERIC
76autoconf.o tu.o: Makefile
77
78# the following are necessary because the files depend on the types of
79# vax cpu's included in the system configuration
80clock.o machdep.o autoconf.o conf.o cons.o cpudata.o : Makefile
81crl.o flp.o mba.o uba.o vaxcpu.o : Makefile
82
83# depend on network configuration
84af.o uipc_proto.o uipc_domain.o locore.o: Makefile
85
86# depends on kdb being configured
87trap.o:	Makefile
88
89# depend on maxusers
90assym.s: Makefile
91
92assym.s: genassym
93	./genassym >assym.s
94
95genassym:
96	${CC} ${INCLUDES} ${IDENT} ${PARAM} -o genassym ${VAX}/vax/genassym.c
97
98depend: assym.s ${CFILES}
99	mkdep ${COPTS} ${.ALLSRC:M*.c} ioconf.c
100	mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${VAX}/vax/genassym.c
101
102links:
103	egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
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
112tags:
113	@echo "see $S/kern/Makefile for tags"
114
115ioconf.o:
116	${CC} -c -S ${COPTS} ioconf.c
117	${C2} ioconf.s | ${INLINE} | ${AS} -o ioconf.o
118	rm -f ioconf.s
119
120param.c: $S/conf/param.c
121	rm -f param.c
122	cp $S/conf/param.c .
123
124param.o: param.c Makefile
125	${CC} -c ${CFLAGS} ${PARAM} param.c
126
127%RULES
128