7# 8# Makefile for FreeBSD 9# 10# This makefile is constructed from a machine description: 11# config machineid 12# Most changes should be made in the machine description 13# /sys/i386/conf/``machineid'' 14# after which you should do 15# config machineid 16# Generic makefile changes should be made in 17# /sys/i386/conf/Makefile.i386 18# after which config should be rerun for all machines. 19# 20 21# Which version of config(8) is required. 22%VERSREQ= 500006 23 24# Can be overridden by makeoptions or /etc/make.conf 25KERNEL_KO?= kernel 26KERNEL?= kernel 27KODIR?= /boot/${KERNEL} 28#STD8X16FONT?= iso 29 30.if !defined(S) 31.if exists(./@/.) 32S= ./@ 33.else
| 7# 8# Makefile for FreeBSD 9# 10# This makefile is constructed from a machine description: 11# config machineid 12# Most changes should be made in the machine description 13# /sys/i386/conf/``machineid'' 14# after which you should do 15# config machineid 16# Generic makefile changes should be made in 17# /sys/i386/conf/Makefile.i386 18# after which config should be rerun for all machines. 19# 20 21# Which version of config(8) is required. 22%VERSREQ= 500006 23 24# Can be overridden by makeoptions or /etc/make.conf 25KERNEL_KO?= kernel 26KERNEL?= kernel 27KODIR?= /boot/${KERNEL} 28#STD8X16FONT?= iso 29 30.if !defined(S) 31.if exists(./@/.) 32S= ./@ 33.else
|
35.endif 36.endif 37M= ${MACHINE_ARCH} 38 39SIZE?= size 40OBJCOPY?= objcopy 41 42COPTFLAGS?=-O -pipe 43.if !defined(NO_CPU_COPTFLAGS) 44COPTFLAGS+= ${_CPUCFLAGS} 45.endif 46INCLUDES= -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev 47 48# This hack lets us use the Intel ACPICA code without spamming a new 49# include path into 100+ source files. 50INCLUDES+= -I$S/contrib/dev/acpica 51 52# ... and the same for ipfilter 53INCLUDES+= -I$S/contrib/ipfilter 54 55# This hack is to allow kernel compiles to succeed on machines w/out srcdist 56.if exists($S/../include) 57INCLUDES+= -I$S/../include 58.else 59INCLUDES+= -I/usr/include 60.endif 61 62COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h 63CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} 64 65# XXX LOCORE means "don't declare C stuff" not "for locore.s". 66ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} 67 68# Select the correct set of tools. Can't set OBJFORMAT here because it 69# doesn't get exported into the environment, and if it were exported 70# then it might break building of utilities. 71FMT= -elf 72CFLAGS+= ${FMT} 73 74DEFINED_PROF= ${PROF} 75.if defined(PROF) 76CFLAGS+= -malign-functions=4 77.if ${PROFLEVEL} >= 2 78IDENT+= -DGPROF4 -DGUPROF 79PROF+= -mprofiler-epilogue 80.endif 81.endif 82 83# Put configuration-specific C flags last (except for ${PROF}) so that they 84# can override the others. 85CFLAGS+= ${CONF_CFLAGS} 86 87NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} 88NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} 89NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} 90PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} 91 92NORMAL_M= perl5 $S/kern/makeobjops.pl -c $<; \ 93 ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c 94 95GEN_CFILES= $S/$M/$M/genassym.c 96SYSTEM_CFILES= param.c vnode_if.c hints.c config.c 97SYSTEM_SFILES= $S/$M/$M/locore.s 98SYSTEM_DEP= Makefile ${SYSTEM_OBJS} 99SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} param.o hints.o config.o hack.So 100SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ 101 -export-dynamic -dynamic-linker /red/herring \ 102 -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o 103SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ 104 ${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET} 105SYSTEM_DEP+= $S/conf/ldscript.$M 106 107%BEFORE_DEPEND 108 109%OBJS 110 111%FILES.c 112 113%FILES.s 114 115%FILES.m 116 117%CLEAN 118 119.PHONY: all modules 120 121all: ${KERNEL_KO} 122 123depend: kernel-depend 124clean: kernel-clean 125cleandepend: kernel-cleandepend 126clobber: kernel-clobber 127tags: kernel-tags 128install: kernel-install 129install.debug: kernel-install.debug 130reinstall: kernel-reinstall 131reinstall.debug: kernel-reinstall.debug 132 133.if !defined(DEBUG) 134FULLKERNEL= ${KERNEL_KO} 135.else 136FULLKERNEL= ${KERNEL_KO}.debug 137${KERNEL_KO}: ${FULLKERNEL} 138 ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} 139.endif 140 141${FULLKERNEL}: ${SYSTEM_DEP} vers.o 142 @rm -f ${.TARGET} 143 @echo linking ${.TARGET} 144 ${SYSTEM_LD} 145 ${SYSTEM_LD_TAIL} 146 147.if !exists(.depend) 148${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} 149.endif 150 151.for mfile in ${MFILES} 152${mfile:T:S/.m$/.h/}: ${mfile} 153 perl5 $S/kern/makeobjops.pl -h ${mfile} 154.endfor 155 156kernel-clean: 157 rm -f *.o *.so *.So *.ko *.s eddep errs \ 158 ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ 159 setdef[01].c setdefs.h tags \ 160 vers.c vnode_if.c vnode_if.h \ 161 ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ 162 ${CLEAN} 163 164kernel-clobber: 165 find . -type f ! -name version -delete 166 167#lint: /tmp param.c 168# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ 169# $S/$M/$M/Locore.c ${CFILES} param.c | \ 170# grep -v 'struct/union .* never defined' | \ 171# grep -v 'possible pointer alignment problem' 172 173locore.o: $S/$M/$M/locore.s assym.s 174 ${NORMAL_S} 175 176# This is a hack. BFD "optimizes" away dynamic mode if there are no 177# dynamic references. We could probably do a '-Bforcedynamic' mode like 178# in the a.out ld. For now, this works. 179hack.So: Makefile 180 touch hack.c 181 ${CC} ${FMT} -shared -nostdlib hack.c -o hack.So 182 rm -f hack.c 183 184# this rule stops ./assym.s in .depend from causing problems 185./assym.s: assym.s 186 187assym.s: $S/kern/genassym.sh genassym.o 188 OBJFORMAT=elf sh $S/kern/genassym.sh genassym.o > ${.TARGET} 189 190genassym.o: $S/$M/$M/genassym.c 191 rm -f ./machine ; ln -s $S/$M/include ./machine 192 ${CC} -c ${CFLAGS} -elf $S/$M/$M/genassym.c 193 194${SYSTEM_OBJS} genassym.o vers.o: opt_global.h 195 196kernel-depend: 197 rm -f .olddep 198 if [ -f .depend ]; then mv .depend .olddep; fi 199 ${MAKE} _kernel-depend 200 201_kernel-depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \ 202 ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ 203 ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} 204 if [ -f .olddep ]; then mv .olddep .depend; fi 205 rm -f .newdep 206 mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} 207 env MKDEP_CPP="${CC} -E" \ 208 mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES} 209 rm -f .depend 210 mv .newdep .depend 211 212kernel-cleandepend: 213 rm -f .depend 214 215links: 216 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 217 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 218 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 219 sort -u | comm -23 - dontlink | \ 220 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 221 sh makelinks; rm -f dontlink 222 223kernel-tags: 224 @[ -f .depend ] || { echo "you must make depend first"; exit 1; } 225 sh $S/conf/systags.sh 226 rm -f tags1 227 sed -e 's, ../, ,' tags > tags1 228 229kernel-install kernel-install.debug: 230.if exists(${DESTDIR}/boot) 231 @if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \ 232 echo "You must set up a ${DESTDIR}/boot/device.hints file first." ; \ 233 exit 1 ; \ 234 fi 235 @if [ x"`grep device.hints ${DESTDIR}/boot/defaults/loader.conf ${DESTDIR}/boot/loader.conf`" = "x" ]; then \ 236 echo "You must activate /boot/device.hints in loader.conf." ; \ 237 exit 1 ; \ 238 fi 239.endif 240 @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ 241 echo "You must build a kernel first." ; \ 242 exit 1 ; \ 243 fi 244.if exists(${DESTDIR}${KODIR}) 245.if exists(${DESTDIR}${KODIR}.old) 246 @-chflags -R noschg ${DESTDIR}${KODIR}.old 247 -rm -rf ${DESTDIR}${KODIR}.old 248.endif 249 mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old 250.endif 251 mkdir -p ${DESTDIR}${KODIR} 252 install -c -m 555 -o root -g wheel \ 253 ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} 254 255kernel-reinstall kernel-reinstall.debug: 256 @-chflags -R noschg ${DESTDIR}${KODIR} 257 install -c -m 555 -o root -g wheel \ 258 ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} 259 260.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) 261all: modules 262depend: modules-depend 263clean: modules-clean 264cleandepend: modules-cleandepend 265cleandir: modules-cleandir 266clobber: modules-clobber 267tags: modules-tags 268install: modules-install 269install.debug: modules-install.debug 270reinstall: modules-reinstall 271reinstall.debug: modules-reinstall.debug 272.endif 273 274MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} 275.if defined(MODULES_OVERRIDE) 276MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" 277.endif 278MKMODULESENV+= MACHINE=pc98 279 280modules: 281 @mkdir -p ${.OBJDIR}/modules 282 cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \ 283 env ${MKMODULESENV} ${MAKE} all 284 285modules-depend: 286 @mkdir -p ${.OBJDIR}/modules 287 cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \ 288 env ${MKMODULESENV} ${MAKE} depend 289 290modules-clean: 291 cd $S/modules ; env ${MKMODULESENV} ${MAKE} clean 292 293modules-cleandepend: 294 cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandepend 295 296modules-clobber: modules-clean 297 rm -rf ${MKMODULESENV} 298 299modules-cleandir: 300 cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandir 301 302modules-tags: 303 cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags 304 305modules-install modules-install.debug: 306 cd $S/modules ; env ${MKMODULESENV} ${MAKE} install 307 308modules-reinstall modules-reinstall.debug: 309 cd $S/modules ; env ${MKMODULESENV} ${MAKE} install 310 311config.o: 312 ${NORMAL_C} 313 314param.c: $S/conf/param.c 315 -rm -f param.c 316 cp $S/conf/param.c . 317 318param.o: 319 ${NORMAL_C} 320 321vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP} 322 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 323 324# XXX strictly, everything depends on Makefile because changes to ${PROF} 325# only appear there, but we don't handle that. 326vers.o: 327 ${NORMAL_C} 328 329hints.o: hints.c 330 ${NORMAL_C} 331 332vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src 333 perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src 334 335vnode_if.h: $S/kern/vnode_if.pl $S/kern/vnode_if.src 336 perl5 $S/kern/vnode_if.pl -h $S/kern/vnode_if.src 337 338vnode_if.o: 339 ${NORMAL_C} 340 341# Commented out for now pending a better solution. 342# How do we pick up compiler version specific flags?? 343#.if exists($S/../share/mk) 344#.include "$S/../share/mk/bsd.kern.mk" 345#.else 346.include <bsd.kern.mk> 347#.endif 348 349%RULES 350 351# DO NOT DELETE THIS LINE -- make depend uses it
| 35.endif 36.endif 37M= ${MACHINE_ARCH} 38 39SIZE?= size 40OBJCOPY?= objcopy 41 42COPTFLAGS?=-O -pipe 43.if !defined(NO_CPU_COPTFLAGS) 44COPTFLAGS+= ${_CPUCFLAGS} 45.endif 46INCLUDES= -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev 47 48# This hack lets us use the Intel ACPICA code without spamming a new 49# include path into 100+ source files. 50INCLUDES+= -I$S/contrib/dev/acpica 51 52# ... and the same for ipfilter 53INCLUDES+= -I$S/contrib/ipfilter 54 55# This hack is to allow kernel compiles to succeed on machines w/out srcdist 56.if exists($S/../include) 57INCLUDES+= -I$S/../include 58.else 59INCLUDES+= -I/usr/include 60.endif 61 62COPTS= ${INCLUDES} ${IDENT} -D_KERNEL -include opt_global.h 63CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG} ${COPTS} 64 65# XXX LOCORE means "don't declare C stuff" not "for locore.s". 66ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} 67 68# Select the correct set of tools. Can't set OBJFORMAT here because it 69# doesn't get exported into the environment, and if it were exported 70# then it might break building of utilities. 71FMT= -elf 72CFLAGS+= ${FMT} 73 74DEFINED_PROF= ${PROF} 75.if defined(PROF) 76CFLAGS+= -malign-functions=4 77.if ${PROFLEVEL} >= 2 78IDENT+= -DGPROF4 -DGUPROF 79PROF+= -mprofiler-epilogue 80.endif 81.endif 82 83# Put configuration-specific C flags last (except for ${PROF}) so that they 84# can override the others. 85CFLAGS+= ${CONF_CFLAGS} 86 87NORMAL_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} 88NORMAL_C_C= ${CC} -c ${CFLAGS} ${PROF} ${.IMPSRC} 89NORMAL_S= ${CC} -c ${ASM_CFLAGS} ${.IMPSRC} 90PROFILE_C= ${CC} -c ${CFLAGS} ${.IMPSRC} 91 92NORMAL_M= perl5 $S/kern/makeobjops.pl -c $<; \ 93 ${CC} -c ${CFLAGS} ${PROF} ${.PREFIX}.c 94 95GEN_CFILES= $S/$M/$M/genassym.c 96SYSTEM_CFILES= param.c vnode_if.c hints.c config.c 97SYSTEM_SFILES= $S/$M/$M/locore.s 98SYSTEM_DEP= Makefile ${SYSTEM_OBJS} 99SYSTEM_OBJS= locore.o vnode_if.o ${OBJS} param.o hints.o config.o hack.So 100SYSTEM_LD= @${LD} ${FMT} -Bdynamic -T $S/conf/ldscript.$M \ 101 -export-dynamic -dynamic-linker /red/herring \ 102 -o ${.TARGET} -X ${SYSTEM_OBJS} vers.o 103SYSTEM_LD_TAIL= @${OBJCOPY} --strip-symbol gcc2_compiled. ${.TARGET} ; \ 104 ${SIZE} ${FMT} ${.TARGET} ; chmod 755 ${.TARGET} 105SYSTEM_DEP+= $S/conf/ldscript.$M 106 107%BEFORE_DEPEND 108 109%OBJS 110 111%FILES.c 112 113%FILES.s 114 115%FILES.m 116 117%CLEAN 118 119.PHONY: all modules 120 121all: ${KERNEL_KO} 122 123depend: kernel-depend 124clean: kernel-clean 125cleandepend: kernel-cleandepend 126clobber: kernel-clobber 127tags: kernel-tags 128install: kernel-install 129install.debug: kernel-install.debug 130reinstall: kernel-reinstall 131reinstall.debug: kernel-reinstall.debug 132 133.if !defined(DEBUG) 134FULLKERNEL= ${KERNEL_KO} 135.else 136FULLKERNEL= ${KERNEL_KO}.debug 137${KERNEL_KO}: ${FULLKERNEL} 138 ${OBJCOPY} --strip-debug ${FULLKERNEL} ${KERNEL_KO} 139.endif 140 141${FULLKERNEL}: ${SYSTEM_DEP} vers.o 142 @rm -f ${.TARGET} 143 @echo linking ${.TARGET} 144 ${SYSTEM_LD} 145 ${SYSTEM_LD_TAIL} 146 147.if !exists(.depend) 148${SYSTEM_OBJS}: vnode_if.h ${BEFORE_DEPEND:M*.h} ${MFILES:T:S/.m$/.h/} 149.endif 150 151.for mfile in ${MFILES} 152${mfile:T:S/.m$/.h/}: ${mfile} 153 perl5 $S/kern/makeobjops.pl -h ${mfile} 154.endfor 155 156kernel-clean: 157 rm -f *.o *.so *.So *.ko *.s eddep errs \ 158 ${FULLKERNEL} ${KERNEL_KO} linterrs makelinks param.c \ 159 setdef[01].c setdefs.h tags \ 160 vers.c vnode_if.c vnode_if.h \ 161 ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \ 162 ${CLEAN} 163 164kernel-clobber: 165 find . -type f ! -name version -delete 166 167#lint: /tmp param.c 168# @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} \ 169# $S/$M/$M/Locore.c ${CFILES} param.c | \ 170# grep -v 'struct/union .* never defined' | \ 171# grep -v 'possible pointer alignment problem' 172 173locore.o: $S/$M/$M/locore.s assym.s 174 ${NORMAL_S} 175 176# This is a hack. BFD "optimizes" away dynamic mode if there are no 177# dynamic references. We could probably do a '-Bforcedynamic' mode like 178# in the a.out ld. For now, this works. 179hack.So: Makefile 180 touch hack.c 181 ${CC} ${FMT} -shared -nostdlib hack.c -o hack.So 182 rm -f hack.c 183 184# this rule stops ./assym.s in .depend from causing problems 185./assym.s: assym.s 186 187assym.s: $S/kern/genassym.sh genassym.o 188 OBJFORMAT=elf sh $S/kern/genassym.sh genassym.o > ${.TARGET} 189 190genassym.o: $S/$M/$M/genassym.c 191 rm -f ./machine ; ln -s $S/$M/include ./machine 192 ${CC} -c ${CFLAGS} -elf $S/$M/$M/genassym.c 193 194${SYSTEM_OBJS} genassym.o vers.o: opt_global.h 195 196kernel-depend: 197 rm -f .olddep 198 if [ -f .depend ]; then mv .depend .olddep; fi 199 ${MAKE} _kernel-depend 200 201_kernel-depend: assym.s param.c vnode_if.h ${BEFORE_DEPEND} \ 202 ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \ 203 ${SYSTEM_SFILES} ${MFILES:T:S/.m$/.h/} 204 if [ -f .olddep ]; then mv .olddep .depend; fi 205 rm -f .newdep 206 mkdep -a -f .newdep ${CFLAGS} ${CFILES} ${SYSTEM_CFILES} ${GEN_CFILES} 207 env MKDEP_CPP="${CC} -E" \ 208 mkdep -a -f .newdep ${ASM_CFLAGS} ${SFILES} ${SYSTEM_SFILES} 209 rm -f .depend 210 mv .newdep .depend 211 212kernel-cleandepend: 213 rm -f .depend 214 215links: 216 egrep '#if' ${CFILES} | sed -f $S/conf/defines | \ 217 sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink 218 echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \ 219 sort -u | comm -23 - dontlink | \ 220 sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks 221 sh makelinks; rm -f dontlink 222 223kernel-tags: 224 @[ -f .depend ] || { echo "you must make depend first"; exit 1; } 225 sh $S/conf/systags.sh 226 rm -f tags1 227 sed -e 's, ../, ,' tags > tags1 228 229kernel-install kernel-install.debug: 230.if exists(${DESTDIR}/boot) 231 @if [ ! -f ${DESTDIR}/boot/device.hints ] ; then \ 232 echo "You must set up a ${DESTDIR}/boot/device.hints file first." ; \ 233 exit 1 ; \ 234 fi 235 @if [ x"`grep device.hints ${DESTDIR}/boot/defaults/loader.conf ${DESTDIR}/boot/loader.conf`" = "x" ]; then \ 236 echo "You must activate /boot/device.hints in loader.conf." ; \ 237 exit 1 ; \ 238 fi 239.endif 240 @if [ ! -f ${KERNEL_KO}${.TARGET:S/kernel-install//} ] ; then \ 241 echo "You must build a kernel first." ; \ 242 exit 1 ; \ 243 fi 244.if exists(${DESTDIR}${KODIR}) 245.if exists(${DESTDIR}${KODIR}.old) 246 @-chflags -R noschg ${DESTDIR}${KODIR}.old 247 -rm -rf ${DESTDIR}${KODIR}.old 248.endif 249 mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old 250.endif 251 mkdir -p ${DESTDIR}${KODIR} 252 install -c -m 555 -o root -g wheel \ 253 ${KERNEL_KO}${.TARGET:S/kernel-install//} ${DESTDIR}${KODIR} 254 255kernel-reinstall kernel-reinstall.debug: 256 @-chflags -R noschg ${DESTDIR}${KODIR} 257 install -c -m 555 -o root -g wheel \ 258 ${KERNEL_KO}${.TARGET:S/kernel-reinstall//} ${DESTDIR}${KODIR} 259 260.if !defined(MODULES_WITH_WORLD) && !defined(NO_MODULES) && exists($S/modules) 261all: modules 262depend: modules-depend 263clean: modules-clean 264cleandepend: modules-cleandepend 265cleandir: modules-cleandir 266clobber: modules-clobber 267tags: modules-tags 268install: modules-install 269install.debug: modules-install.debug 270reinstall: modules-reinstall 271reinstall.debug: modules-reinstall.debug 272.endif 273 274MKMODULESENV= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} 275.if defined(MODULES_OVERRIDE) 276MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" 277.endif 278MKMODULESENV+= MACHINE=pc98 279 280modules: 281 @mkdir -p ${.OBJDIR}/modules 282 cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \ 283 env ${MKMODULESENV} ${MAKE} all 284 285modules-depend: 286 @mkdir -p ${.OBJDIR}/modules 287 cd $S/modules ; env ${MKMODULESENV} ${MAKE} obj ; \ 288 env ${MKMODULESENV} ${MAKE} depend 289 290modules-clean: 291 cd $S/modules ; env ${MKMODULESENV} ${MAKE} clean 292 293modules-cleandepend: 294 cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandepend 295 296modules-clobber: modules-clean 297 rm -rf ${MKMODULESENV} 298 299modules-cleandir: 300 cd $S/modules ; env ${MKMODULESENV} ${MAKE} cleandir 301 302modules-tags: 303 cd $S/modules ; env ${MKMODULESENV} ${MAKE} tags 304 305modules-install modules-install.debug: 306 cd $S/modules ; env ${MKMODULESENV} ${MAKE} install 307 308modules-reinstall modules-reinstall.debug: 309 cd $S/modules ; env ${MKMODULESENV} ${MAKE} install 310 311config.o: 312 ${NORMAL_C} 313 314param.c: $S/conf/param.c 315 -rm -f param.c 316 cp $S/conf/param.c . 317 318param.o: 319 ${NORMAL_C} 320 321vers.c: $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP} 322 sh $S/conf/newvers.sh ${KERN_IDENT} ${IDENT} 323 324# XXX strictly, everything depends on Makefile because changes to ${PROF} 325# only appear there, but we don't handle that. 326vers.o: 327 ${NORMAL_C} 328 329hints.o: hints.c 330 ${NORMAL_C} 331 332vnode_if.c: $S/kern/vnode_if.pl $S/kern/vnode_if.src 333 perl5 $S/kern/vnode_if.pl -c $S/kern/vnode_if.src 334 335vnode_if.h: $S/kern/vnode_if.pl $S/kern/vnode_if.src 336 perl5 $S/kern/vnode_if.pl -h $S/kern/vnode_if.src 337 338vnode_if.o: 339 ${NORMAL_C} 340 341# Commented out for now pending a better solution. 342# How do we pick up compiler version specific flags?? 343#.if exists($S/../share/mk) 344#.include "$S/../share/mk/bsd.kern.mk" 345#.else 346.include <bsd.kern.mk> 347#.endif 348 349%RULES 350 351# DO NOT DELETE THIS LINE -- make depend uses it
|