Makefile.i386 (2239) | Makefile.i386 (2408) |
---|---|
1# Copyright 1990 W. Jolitz 2# from: @(#)Makefile.i386 7.1 5/10/91 | 1# Copyright 1990 W. Jolitz 2# from: @(#)Makefile.i386 7.1 5/10/91 |
3# $Id: Makefile.i386,v 1.30 1994/08/23 04:21:21 jkh Exp $ | 3# $Id: Makefile.i386,v 1.31 1994/08/23 09:54:22 jkh Exp $ |
4# 5# Makefile for FreeBSD 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 --- 18 unchanged lines hidden (view full) --- 30S= ./@ 31.else 32S= ../.. 33.endif 34I386= ${S}/i386 35 36CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls 37# | 4# 5# Makefile for FreeBSD 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 --- 18 unchanged lines hidden (view full) --- 30S= ./@ 31.else 32S= ../.. 33.endif 34I386= ${S}/i386 35 36CWARNFLAGS=-W -Wreturn-type -Wcomment -Wredundant-decls 37# |
38# The following flags are next up for working on: 39# -Wredundant-decls -Wnested-externs | 38# The following flag is next up for working on: 39# -Wnested-externs |
40# 41# When working on removing warnings from code, the `-Werror' flag should be 42# of material assistance. 43# 44COPTFLAGS=-O 45INCLUDES= -I. -I$S -I$S/sys | 40# 41# When working on removing warnings from code, the `-Werror' flag should be 42# of material assistance. 43# 44COPTFLAGS=-O 45INCLUDES= -I. -I$S -I$S/sys |
46COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DNPX | 46COPTS= ${INCLUDES} ${IDENT} -DKERNEL -Di386 -DLOAD_ADDRESS=0x${LOAD_ADDRESS} |
47ASFLAGS= 48CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} 49LOAD_ADDRESS?= F0100000 50 51NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 52NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< | 47ASFLAGS= 48CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} 49LOAD_ADDRESS?= F0100000 50 51NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} $< 52NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< |
53# XXX errors leak out of all the pipes. Should use cc *.S. 54# XXX LOCORE means "don't declare C stuff" not "for locore.s". |
|
53NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 54DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 55DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< | 55NORMAL_S= ${CPP} -I. -DLOCORE ${COPTS} $< | ${AS} ${ASFLAGS} -o $*.o 56DRIVER_C= ${CC} -c ${CFLAGS} ${PROF} $< 57DRIVER_C_C= ${CC} -c ${CFLAGS} ${PROF} ${PARAM} $< |
56SYSTEM_OBJS=locore.o exception.o swtch.o support.o ${OBJS} param.o \ 57 ioconf.o conf.o machdep.o vnode_if.o | 58 59SFILES= ${I386}/i386/exception.s ${I386}/i386/microtime.s \ 60 ${I386}/i386/support.s ${I386}/i386/swtch.s 61SYSTEM_CFILES= ioconf.c param.c vnode_if.c 62SYSTEM_SFILES= ${I386}/i386/locore.s 63SYSTEM_OBJS=locore.o ${OBJS} ioconf.o param.o vnode_if.o |
58SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a 59SYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 60SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a 61SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 62 ${DBSYM} -fT ${LOAD_ADDRESS} $@; size $@; chmod 755 $@ 63 64# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 65# the script is identical for either... -- cgd --- 41 unchanged lines hidden (view full) --- 107# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 108# grep -v 'struct/union .* never defined' | \ 109# grep -v 'possible pointer alignment problem' 110 111symbols.sort: ${I386}/i386/symbols.raw 112 grep -v '^#' ${I386}/i386/symbols.raw \ 113 | sed 's/^ //' | sort -u > symbols.sort 114 | 64SYSTEM_DEP=Makefile symbols.sort ${SYSTEM_OBJS} libkern.a 65SYSTEM_LD_HEAD= @echo loading $@; rm -f $@ 66SYSTEM_LD= @${LD} -Bstatic -Z -T ${LOAD_ADDRESS} -o $@ -X ${SYSTEM_OBJS} vers.o libkern.a 67SYSTEM_LD_TAIL= @echo rearranging symbols; symorder symbols.sort $@; \ 68 ${DBSYM} -fT ${LOAD_ADDRESS} $@; size $@; chmod 755 $@ 69 70# (XXX) ok, this is weird. but we've got a working ed, and a broken ex, and 71# the script is identical for either... -- cgd --- 41 unchanged lines hidden (view full) --- 113# ${I386}/i386/Locore.c ${CFILES} ioconf.c param.c | \ 114# grep -v 'struct/union .* never defined' | \ 115# grep -v 'possible pointer alignment problem' 116 117symbols.sort: ${I386}/i386/symbols.raw 118 grep -v '^#' ${I386}/i386/symbols.raw \ 119 | sed 's/^ //' | sort -u > symbols.sort 120 |
115locore.o: assym.s ${I386}/i386/locore.s machine/trap.h machine/psl.h \ 116 machine/pte.h ${I386}/isa/vector.s ${I386}/isa/icu.s \ 117 $S/sys/errno.h machine/specialreg.h \ 118 ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h $S/net/netisr.h \ 119 machine/asmacros.h 120 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/locore.s | \ 121 ${AS} ${ASFLAGS} -o locore.o | 121locore.o: 122 ${NORMAL_S} |
122 | 123 |
123exception.o: assym.s ${I386}/i386/exception.s machine/trap.h \ 124 ${I386}/isa/vector.s ${I386}/isa/icu.s \ 125 $S/sys/errno.h ${I386}/isa/icu.h ${I386}/isa/isa.h vector.h \ 126 $S/net/netisr.h machine/asmacros.h 127 ${CPP} -I. -DLOCORE ${COPTS} ${I386}/i386/exception.s | \ 128 ${AS} ${ASFLAGS} -o exception.o | 124# everything potentially depends on the Makefile since everything potentially 125# depends on the options. Some things are more dependent on the Makefile for 126# historical reasons. 127machdep.o: Makefile |
129 | 128 |
130swtch.o: assym.s ${I386}/i386/swtch.s \ 131 $S/sys/errno.h machine/asmacros.h 132 ${CPP} -I. ${COPTS} ${I386}/i386/swtch.s | \ 133 ${AS} ${ASFLAGS} -o swtch.o 134 135support.o: assym.s ${I386}/i386/support.s \ 136 $S/sys/errno.h machine/asmacros.h 137 ${CPP} -I. ${COPTS} ${I386}/i386/support.s | \ 138 ${AS} ${ASFLAGS} -o support.o 139 140machdep.o: ${I386}/i386/machdep.c Makefile 141 ${CC} -c ${CFLAGS} -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${PROF} $< 142 | |
143# the following is necessary because autoconf.o depends on #if GENERIC 144autoconf.o: Makefile 145 146# depend on network configuration 147af.o uipc_proto.o locore.o: Makefile 148 149# depends on KDB (cons.o also depends on GENERIC) 150trap.o cons.o: Makefile 151 | 129# the following is necessary because autoconf.o depends on #if GENERIC 130autoconf.o: Makefile 131 132# depend on network configuration 133af.o uipc_proto.o locore.o: Makefile 134 135# depends on KDB (cons.o also depends on GENERIC) 136trap.o cons.o: Makefile 137 |
138# this rule stops ./assym.s in .depend from causing problems 139./assym.s: assym.s 140 |
|
152assym.s: genassym 153 ./genassym >,assym.s 154 if cmp -s assym.s ,assym.s; then \ 155 rm -f ,assym.s; \ 156 else \ 157 rm -f assym.s; \ 158 mv ,assym.s assym.s; \ 159 fi 160 161# Some of the defines that genassym outputs may well depend on the 162# value of kernel options. 163genassym: Makefile 164 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 165 ${I386}/i386/genassym.c -static -o genassym 166 | 141assym.s: genassym 142 ./genassym >,assym.s 143 if cmp -s assym.s ,assym.s; then \ 144 rm -f ,assym.s; \ 145 else \ 146 rm -f assym.s; \ 147 mv ,assym.s assym.s; \ 148 fi 149 150# Some of the defines that genassym outputs may well depend on the 151# value of kernel options. 152genassym: Makefile 153 ${CC} ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 154 ${I386}/i386/genassym.c -static -o genassym 155 |
156# XXX this assumes that the options for NORMAL_C* and DRIVER_C* are identical. |
|
167depend: assym.s param.c vnode_if.h | 157depend: assym.s param.c vnode_if.h |
168 sh /usr/bin/mkdep -DLOAD_ADDRESS=0x${LOAD_ADDRESS} ${COPTS} ${CFILES} ioconf.c param.c ${I386}/i386/conf.c 169 sh /usr/bin/mkdep -a -p ${INCLUDES} ${IDENT} ${PARAM} ${I386}/i386/genassym.c | 158 mkdep ${COPTS} ${CFILES} ${SYSTEM_CFILES} 159 mkdep -a -p ${INCLUDES} -DKERNEL ${IDENT} ${PARAM} \ 160 ${I386}/i386/genassym.c 161 MKDEP_CPP=${CPP} ; export MKDEP_CPP ; \ 162 mkdep -a -I. -DLOCORE ${COPTS} ${SFILES} ${SYSTEM_SFILES} |
170 171links: 172 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 173 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 174 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 175 sort -u | comm -23 - dontlink | \ 176 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 177 sh makelinks && rm -f dontlink 178 179tags: 180 @echo "see $S/kern/Makefile for tags" 181 182ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 183 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 184 ${CC} -c ${CFLAGS} ioconf.c 185 | 163 164links: 165 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 166 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 167 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 168 sort -u | comm -23 - dontlink | \ 169 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 170 sh makelinks && rm -f dontlink 171 172tags: 173 @echo "see $S/kern/Makefile for tags" 174 175ioconf.o: ioconf.c $S/sys/param.h machine/pte.h $S/sys/buf.h \ 176 ${I386}/isa/isa_device.h ${I386}/isa/isa.h ${I386}/isa/icu.h 177 ${CC} -c ${CFLAGS} ioconf.c 178 |
186conf.o: ${I386}/i386/conf.c $S/sys/conf.h 187 ${CC} -c ${CFLAGS} ${I386}/i386/conf.c 188 | |
189param.c: $S/conf/param.c 190 -rm -f param.c 191 cp $S/conf/param.c . 192 193param.o: param.c Makefile 194 ${CC} -c ${CFLAGS} ${PARAM} param.c 195 196vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 197 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 198 ${CC} ${CFLAGS} -c vers.c 199 200vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src 201 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 202vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 203 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 204 205%RULES 206 207# DO NOT DELETE THIS LINE -- make depend uses it | 179param.c: $S/conf/param.c 180 -rm -f param.c 181 cp $S/conf/param.c . 182 183param.o: param.c Makefile 184 ${CC} -c ${CFLAGS} ${PARAM} param.c 185 186vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} 187 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 188 ${CC} ${CFLAGS} -c vers.c 189 190vnode_if.c: $S/kern/vnode_if.sh $S/kern/vnode_if.src 191 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 192vnode_if.h: $S/kern/vnode_if.sh $S/kern/vnode_if.src 193 sh $S/kern/vnode_if.sh $S/kern/vnode_if.src 194 195%RULES 196 197# DO NOT DELETE THIS LINE -- make depend uses it |
208 | |