date and time created 91/05/09 21:40:34 by william
[unix-history] / usr / src / sys / i386 / conf / Makefile.i386
CommitLineData
7601795a 1# Copyright 1990 W. Jolitz
51c52f07 2# @(#)Makefile.i386 1.3 %G%
7601795a
WN
3# Makefile for 4.3 BSD-Reno
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/i386/conf/``machineid''
9# after which you should do
10# config machineid
11# Generic makefile changes should be made in
77efbc7b 12# /sys/i386/conf/Makefile.i386
7601795a
WN
13# after which config should be rerun for all machines.
14#
51c52f07
WN
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#
7601795a
WN
21TOUCH= touch -f -c
22LD= /usr/bin/ld
51c52f07 23CC= cc
77efbc7b 24CPP= cpp
7601795a
WN
25
26S= ../..
27I386= ../../i386
28
29INCLUDES= -I. -I$S -I$S/sys
51c52f07
WN
30COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
31ASFLAGS=
7601795a
WN
32CFLAGS= -O ${COPTS}
33
34%OBJS
35
36%CFILES
37
38%LOAD
39
40clean:
41 rm -f eddep *vmunix tags *.o locore.i [a-uw-z]*.s \
42 errs linterrs makelinks
43
44lint: /tmp param.c
45 @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
46 ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
47 grep -v 'struct/union .* never defined' | \
48 grep -v 'possible pointer alignment problem'
49
50symbols.sort: ${I386}/i386/symbols.raw
51 grep -v '^#' ${I386}/i386/symbols.raw \
52 | sed 's/^ //' | sort -u > symbols.sort
53
51c52f07
WN
54locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
55 machine/pte.h vector.s ${I386}/isa/icu.s ${I386}/isa/isa.h \
56 ${I386}/isa/icu.h
57 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
58 ${AS} ${ASFLAGS} -o locore.o
7601795a
WN
59
60# the following is necessary because autoconf.o depends on #if GENERIC
61autoconf.o: Makefile
62
63# depend on network configuration
64af.o uipc_proto.o locore.o: Makefile
65
66# depend on maxusers
67assym.s machdep.o: Makefile
68
69# depends on KDB (cons.o also depends on GENERIC)
70trap.o cons.o: Makefile
71
77efbc7b
WN
72assym.s: $S/sys/param.h machine/pte.h $S/sys/buf.h \
73 $S/sys/vmmeter.h $S/sys/map.h \
7601795a
WN
74 $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h
75
76assym.s: genassym
77 ./genassym >assym.s
78
79genassym:
80 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
81 ${I386}/i386/genassym.c -o genassym
82
83depend: assym.s param.c
84 mkdep ${COPTS} ${CFILES} ioconf.c
85 mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
86
87links:
88 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
89 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
90 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
91 sort -u | comm -23 - dontlink | \
92 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
93 sh makelinks && rm -f dontlink
94
95tags:
96 @echo "see $S/kern/Makefile for tags"
97
98ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h $S/sys/map.h \
77efbc7b 99 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
7601795a
WN
100
101param.c: $S/conf/param.c
102 -rm -f param.c
103 cp $S/conf/param.c .
104
105param.o: param.c Makefile
106 ${CC} -c ${CFLAGS} ${PARAM} param.c
107
108%RULES
109
110# DO NOT DELETE THIS LINE -- make depend uses it
111