Remove the ft driver, it causes instant reboots during attatch, and this
[unix-history] / sys / i386 / conf / Makefile.i386
CommitLineData
15637ed4 1# Copyright 1990 W. Jolitz
082cf5d8 2# from: @(#)Makefile.i386 7.1 5/10/91
c779bb1a 3# $Id: Makefile.i386,v 1.19 1994/01/14 16:23:16 davidg Exp $
082cf5d8
RG
4#
5# Makefile for FreeBSD
15637ed4
RG
6#
7# This makefile is constructed from a machine description:
8# config machineid
9# Most changes should be made in the machine description
10# /sys/i386/conf/``machineid''
11# after which you should do
12# config machineid
13# Generic makefile changes should be made in
14# /sys/i386/conf/Makefile.i386
15# after which config should be rerun for all machines.
16#
17# N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE INVISIBLE TO MAKEFILE
18# IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
19#
20# -DTRACE compile in kernel tracing hooks
21# -DQUOTA compile in file system quotas
22#
15637ed4
RG
23TOUCH= touch -f -c
24LD= /usr/bin/ld
25CC= cc
26CPP= cpp
082cf5d8
RG
27STRIP= strip
28DBSYM= /usr/sbin/dbsym
15637ed4
RG
29
30S= ../..
31I386= ../../i386
32
4c45483e
GW
33CWARNFLAGS=-W -Wreturn-type -Wcomment
34#
35# The following flags are next up for working on:
fde1aeb2 36# -Wredundant-decls -Wnested-externs
4c45483e
GW
37#
38# When working on removing warnings from code, the `-Werror' flag should be
39# of material assistance.
40#
0d327739 41COPTFLAGS=-O
15637ed4
RG
42INCLUDES= -I. -I$S -I$S/sys
43COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
44ASFLAGS=
0d327739 45CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS}
1d7f5b47 46LOAD_ADDRESS?= F0100000
15637ed4
RG
47
48NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
49NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
50NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
51DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
52DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
3fc0a319
DG
53SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \
54 ioconf.o conf.o machdep.o
15637ed4
RG
55SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
56SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
317350b1 57SYSTEM_LD= @${LD} -Bstatic -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS}
15637ed4 58SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \
082cf5d8 59 ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@
15637ed4 60
082cf5d8
RG
61# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and
62# the script is identical for either... -- cgd
63#
15637ed4
RG
64GPROF.EX= /usr/src/lib/csu.i386/gprof.ex
65PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
082cf5d8 66 ed - $*.s < ${GPROF.EX} ; \
15637ed4
RG
67 ${AS} -o $@ $*.s ; \
68 rm -f $*.s
69
70%OBJS
71
72%CFILES
73
74%LOAD
75
76clean:
77 rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \
cdd10b9f 78 errs linterrs makelinks genassym ,assym.s stamp-assym
15637ed4 79
cdd10b9f
GW
80#lint: /tmp param.c
81# @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
82# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
83# grep -v 'struct/union .* never defined' | \
84# grep -v 'possible pointer alignment problem'
15637ed4
RG
85
86symbols.sort: ${I386}/i386/symbols.raw
87 grep -v '^#' ${I386}/i386/symbols.raw \
88 | sed 's/^ //' | sort -u > symbols.sort
89
90locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
91 machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
92 $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \
3fc0a319
DG
93 ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \
94 machine/asmacros.h
15637ed4
RG
95 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
96 ${AS} ${ASFLAGS} -o locore.o
97
3fc0a319
DG
98exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \
99 ${I386}/isa/vector.s ${I386}/isa/icu.s \
100 $S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \
101 $S/net/netisr.h machine/asmacros.h
102 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \
103 ${AS} ${ASFLAGS} -o exception.o
104
105swtch.o: assym.s ${I386}/i386/swtch.s \
106 $S/sys/errno.h ${I386}/isa/debug.h machine/asmacros.h
107 ${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \
108 ${AS} ${ASFLAGS} -o swtch.o
109
110support.o: assym.s ${I386}/i386/support.s \
111 $S/sys/errno.h machine/asmacros.h
112 ${CPP} -I. ${COPTS} ${I386}/i386/support.s | \
113 ${AS} ${ASFLAGS} -o support.o
114
082cf5d8
RG
115machdep.o: ${I386}/i386/machdep.c Makefile
116 ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
117
15637ed4
RG
118# the following is necessary because autoconf.o depends on #if GENERIC
119autoconf.o: Makefile
120
121# depend on network configuration
122af.o uipc_proto.o locore.o: Makefile
123
15637ed4
RG
124# depends on KDB (cons.o also depends on GENERIC)
125trap.o cons.o: Makefile
126
081b00bb 127assym.s: genassym
cdd10b9f
GW
128 ./genassym >,assym.s
129 if cmp -s assym.s ,assym.s; then \
130 rm -f ,assym.s; \
131 else \
132 rm -f assym.s; \
133 mv ,assym.s assym.s; \
134 fi
135
136# Some of the defines that genassym outputs may well depend on the
137# value of kernel options.
138genassym: Makefile
15637ed4 139 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
c779bb1a 140 ${I386}/i386/genassym.c -static -o genassym
15637ed4
RG
141
142depend: assym.s param.c
082cf5d8 143 sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
15637ed4
RG
144 sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
145
146links:
147 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
148 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
149 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
150 sort -u | comm -23 - dontlink | \
151 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
152 sh makelinks && rm -f dontlink
153
154tags:
155 @echo "see $S/kern/Makefile for tags"
156
157ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
158 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
159 ${CC} -c ${CFLAGS} ioconf.c
160
4c45483e
GW
161conf.o: ${I386}/i386/conf.c $S/sys/conf.h
162 ${CC} -c ${CFLAGS} ${I386}/i386/conf.c
15637ed4 163
082cf5d8 164param.c: $S/conf/param.c
15637ed4
RG
165 -rm -f param.c
166 cp $S/conf/param.c .
167
168param.o: param.c Makefile
169 ${CC} -c ${CFLAGS} ${PARAM} param.c
170
082cf5d8 171vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
15637ed4
RG
172 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
173 ${CC} ${CFLAGS} -c vers.c
174
175%RULES
176
177# DO NOT DELETE THIS LINE -- make depend uses it
178