|
|
1.1 root 1: # Copyright 1990 W. Jolitz
2: # @(#)Makefile.i386 7.1 5/10/91
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
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: #
1.1.1.3 ! root 21: # PATCHES MAGIC LEVEL PATCH THAT GOT US HERE
! 22: # -------------------- ----- ----------------------
! 23: # CURRENT PATCH LEVEL: 1 00001
! 24: # -------------------- ----- ----------------------
! 25: #
! 26: # 29 Jun 92 Chris G. Demetriou Fix vers.o for kernel profiling and
! 27: # plain old link
! 28: #
1.1 root 29: TOUCH= touch -f -c
30: LD= /usr/bin/ld
31: CC= cc
32: CPP= cpp
33:
34: S= ../..
35: I386= ../../i386
36:
37: INCLUDES= -I. -I$S -I$S/sys
38: COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX
39: ASFLAGS=
40: CFLAGS= -O ${COPTS}
41:
1.1.1.2 root 42: NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $<
43: NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
1.1.1.3 ! root 44: NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o
1.1.1.2 root 45: DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $<
46: DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $<
47: SYSTEM_OBJS=locore.o ${OBJS} param.o ioconf.o conf.o
48: SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS}
49: SYSTEM_LD_HEAD= @echo loading $@; rm -f $@
1.1.1.3 ! root 50: SYSTEM_LD= @${LD} -z -T FE000000 -o $@ -X vers.o ${SYSTEM_OBJS}
! 51: SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; /usr/sbin/dbsym $@ || true; size $@; chmod 755 $@
! 52:
! 53: GPROF.EX= /usr/src/lib/csu.i386/gprof.ex
! 54: PROFILE_C= ${CC} -S -c ${CFLAGS} $< ; \
! 55: ex - $*.s < ${GPROF.EX} ; \
! 56: ${AS} -o $@ $*.s ; \
! 57: rm -f $*.s
1.1.1.2 root 58:
1.1 root 59: %OBJS
60:
61: %CFILES
62:
63: %LOAD
64:
65: clean:
1.1.1.2 root 66: rm -f eddep *386bsd tags *.o locore.i [a-uw-z]*.s \
1.1 root 67: errs linterrs makelinks
68:
69: lint: /tmp param.c
70: @lint -hbxn -I. -DGENERIC -Dvolatile= ${COPTS} ${PARAM} \
71: ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \
72: grep -v 'struct/union .* never defined' | \
73: grep -v 'possible pointer alignment problem'
74:
75: symbols.sort: ${I386}/i386/symbols.raw
76: grep -v '^#' ${I386}/i386/symbols.raw \
77: | sed 's/^ //' | sort -u > symbols.sort
78:
79: locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \
80: machine/pte.h vector.s ${I386}/isa/icu.s ${I386}/isa/isa.h \
81: ${I386}/isa/icu.h
82: ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \
83: ${AS} ${ASFLAGS} -o locore.o
84:
85: # the following is necessary because autoconf.o depends on #if GENERIC
86: autoconf.o: Makefile
87:
88: # depend on network configuration
89: af.o uipc_proto.o locore.o: Makefile
90:
91: # depend on maxusers
92: assym.s machdep.o: Makefile
93:
94: # depends on KDB (cons.o also depends on GENERIC)
95: trap.o cons.o: Makefile
96:
97: assym.s: $S/sys/param.h machine/pte.h $S/sys/buf.h \
1.1.1.2 root 98: $S/sys/vmmeter.h \
1.1 root 99: $S/sys/proc.h $S/sys/msgbuf.h machine/vmparam.h
100:
101: assym.s: genassym
102: ./genassym >assym.s
103:
104: genassym:
105: ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \
106: ${I386}/i386/genassym.c -o genassym
107:
108: depend: assym.s param.c
1.1.1.2 root 109: sh /usr/bin/mkdep ${COPTS} ${CFILES} ioconf.c
110: sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c
1.1 root 111:
112: links:
113: egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
114: sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
115: echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
116: sort -u | comm -23 - dontlink | \
117: sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
118: sh makelinks && rm -f dontlink
119:
120: tags:
121: @echo "see $S/kern/Makefile for tags"
122:
1.1.1.2 root 123: ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \
1.1 root 124: ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h
1.1.1.2 root 125: ${CC} -c ${CFLAGS} ioconf.c
126:
127: conf.o: $S/sys/param.h $S/sys/systm.h $S/sys/buf.h $S/sys/ioctl.h \
128: $S/sys/tty.h $S/sys/conf.h ${I386}/i386/conf.c
129: ${CC} -traditional -c ${CFLAGS} ${I386}/i386/conf.c
1.1 root 130:
131: param.c: $S/conf/param.c
132: -rm -f param.c
133: cp $S/conf/param.c .
134:
135: param.o: param.c Makefile
136: ${CC} -c ${CFLAGS} ${PARAM} param.c
137:
1.1.1.3 ! root 138: newvers:
! 139: sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT}
! 140: cc ${CFLAGS} -c vers.c
! 141:
1.1 root 142: %RULES
143:
144: # DO NOT DELETE THIS LINE -- make depend uses it
145:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.