Deleted Added
full compact
Makefile.i386 (315) Makefile.i386 (509)
1# Copyright 1990 W. Jolitz
1# Copyright 1990 W. Jolitz
2# @(#)Makefile.i386 7.1 5/10/91
3# Makefile for 4.3 BSD-Reno
2# from: @(#)Makefile.i386 7.1 5/10/91
3# $Id$
4#
4#
5# Makefile for FreeBSD
6#
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
12# /sys/i386/conf/Makefile.i386
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#
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#
21# $Id$
22#
23
24TOUCH= touch -f -c
25LD= /usr/bin/ld
26CC= cc
27CPP= cpp
23TOUCH= touch -f -c
24LD= /usr/bin/ld
25CC= cc
26CPP= cpp
27STRIP= strip
28DBSYM= /usr/sbin/dbsym
28
29S= ../..
30I386= ../../i386
31
32INCLUDES= -I. -I$S -I$S/sys
33COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
34ASFLAGS=
35CFLAGS= -O ${DEBUG} ${COPTS}
29
30S= ../..
31I386= ../../i386
32
33INCLUDES= -I. -I$S -I$S/sys
34COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
35ASFLAGS=
36CFLAGS= -O ${DEBUG} ${COPTS}
37LOAD_ADDRESS?= FE000000
36
37NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
38NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
39NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
40DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
41DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
42SYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o
43SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
44SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
38
39NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
40NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
41NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
42DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
43DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
44SYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o
45SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
46SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
45SYSTEM_LD= @${LD} -z -T FE000000 -o $@ -X vers.o ${SYSTEM_OBJS}
47SYSTEM_LD= @${LD} -z -T ${LOAD_ADDRESS} -o $@ -X vers.o ${SYSTEM_OBJS}
46SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \
48SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \
47 dbsym $@ 2>/dev/null || true; size $@; chmod 755 $@
49 ${DBSYM} -fT ${LOAD_ADDRESS} $@; ${STRIP} -x $@; size $@; chmod 755 $@
48
50
51# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and
52# the script is identical for either... -- cgd
53#
49GPROF.EX= /usr/src/lib/csu.i386/gprof.ex
50PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
54GPROF.EX= /usr/src/lib/csu.i386/gprof.ex
55PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
51 ex - $*.s < ${GPROF.EX} ; \
56 ed - $*.s < ${GPROF.EX} ; \
52 ${AS} -o $@ $*.s ; \
53 rm -f $*.s
54
55%OBJS
56
57%CFILES
58
59%LOAD

--- 14 unchanged lines hidden (view full) ---

74
75locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
76 machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
77 $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \
78 ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h
79 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
80 ${AS} ${ASFLAGS} -o locore.o
81
57 ${AS} -o $@ $*.s ; \
58 rm -f $*.s
59
60%OBJS
61
62%CFILES
63
64%LOAD

--- 14 unchanged lines hidden (view full) ---

79
80locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
81 machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \
82 $S/sys/errno.h machine/specialreg.h ${I386}/isa/debug.h \
83 ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h
84 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
85 ${AS} ${ASFLAGS} -o locore.o
86
87machdep.o: ${I386}/i386/machdep.c Makefile
88 ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $<
89
82# the following is necessary because autoconf.o depends on #if GENERIC
83autoconf.o: Makefile
84
85# depend on network configuration
86af.o uipc_proto.o locore.o: Makefile
87
88# depend on maxusers
89assym.s machdep.o: Makefile

--- 8 unchanged lines hidden (view full) ---

98assym.s: genassym
99 ./genassym >assym.s
100
101genassym:
102 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
103 ${I386}/i386/genassym.c -o genassym
104
105depend: assym.s param.c
90# the following is necessary because autoconf.o depends on #if GENERIC
91autoconf.o: Makefile
92
93# depend on network configuration
94af.o uipc_proto.o locore.o: Makefile
95
96# depend on maxusers
97assym.s machdep.o: Makefile

--- 8 unchanged lines hidden (view full) ---

106assym.s: genassym
107 ./genassym >assym.s
108
109genassym:
110 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
111 ${I386}/i386/genassym.c -o genassym
112
113depend: assym.s param.c
106 sh /usr/bin/mkdep ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
114 sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c
107 sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
108
109links:
110 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
111 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
112 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
113 sort -u | comm -23 - dontlink | \
114 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
115 sh makelinks && rm -f dontlink
116
117tags:
118 @echo "see $S/kern/Makefile for tags"
119
120ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
121 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
122 ${CC} -c ${CFLAGS} ioconf.c
123
115 sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
116
117links:
118 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
119 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
120 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
121 sort -u | comm -23 - dontlink | \
122 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
123 sh makelinks && rm -f dontlink
124
125tags:
126 @echo "see $S/kern/Makefile for tags"
127
128ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
129 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
130 ${CC} -c ${CFLAGS} ioconf.c
131
124conf.o: $S/sys/param.h $S/sys/systm.h $S/sys/buf.h $S/sys/ioctl.h \
125 $S/sys/tty.h $S/sys/conf.h \
126 bpfilter.h cd.h ch.h com.h dcfclk.h fd.h lpa.h \
127 lpt.h pty.h sd.h speaker.h st.h wd.h wt.h \
128 ${I386}/i386/conf.c
132conf.o: ${I386}/i386/conf.c
129 ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c
130
133 ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c
134
131param.c: $S/conf/param.c \
132 $S/sys/param.h $S/sys/systm.h $S/sys/socket.h $S/sys/proc.h \
133 $S/sys/vnode.h $S/sys/file.h $S/sys/callout.h $S/sys/clist.h \
134 $S/sys/mbuf.h $S/ufs/quota.h $S/sys/kernel.h machine/vmparam.h \
135 $S/sys/shm.h
135param.c: $S/conf/param.c
136 -rm -f param.c
137 cp $S/conf/param.c .
138
139param.o: param.c Makefile
140 ${CC} -c ${CFLAGS} ${PARAM} param.c
141
136 -rm -f param.c
137 cp $S/conf/param.c .
138
139param.o: param.c Makefile
140 ${CC} -c ${CFLAGS} ${PARAM} param.c
141
142vers.o: ${SYSTEM_DEP}
142vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
143 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
144 ${CC} ${CFLAGS} -c vers.c
145
146%RULES
147
148# DO NOT DELETE THIS LINE -- make depend uses it
149
143 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
144 ${CC} ${CFLAGS} -c vers.c
145
146%RULES
147
148# DO NOT DELETE THIS LINE -- make depend uses it
149