xref: /freebsd/sys/conf/kern.post.mk (revision edbbf26e2650e02cd3925dd1deaacf9b8fb2e2a0)
1
2# Part of a unified Makefile for building kernels.  This part includes all
3# the definitions that need to be after all the % directives except %RULES
4# and ones that act like they are part of %RULES.
5#
6# Most make variables should not be defined in this file.  Instead, they
7# should be defined in the kern.pre.mk so that port makefiles can
8# override or augment them.
9
10.if defined(DTS) || defined(DTSO) || defined(FDT_DTS_FILE)
11.include "dtb.build.mk"
12
13KERNEL_EXTRA+=	${DTB} ${DTBO}
14CLEAN+=		${DTB} ${DTBO}
15
16kernel-install: _dtbinstall
17.ORDER: beforeinstall _dtbinstall
18.endif
19
20# In case the config had a makeoptions DESTDIR...
21.if defined(DESTDIR)
22MKMODULESENV+=	DESTDIR="${DESTDIR}"
23.endif
24SYSDIR?= ${S:C;^[^/];${.CURDIR}/&;:tA}
25MKMODULESENV+=	KERNBUILDDIR="${.CURDIR}" SYSDIR="${SYSDIR}"
26MKMODULESENV+=  MODULE_TIED=yes
27
28.if defined(CONF_CFLAGS)
29MKMODULESENV+=	CONF_CFLAGS="${CONF_CFLAGS}"
30.endif
31
32.if defined(WITH_CTF)
33MKMODULESENV+=	WITH_CTF="${WITH_CTF}"
34.endif
35
36.if !empty(KCSAN_ENABLED)
37MKMODULESENV+=	KCSAN_ENABLED="yes"
38.endif
39
40.if defined(GCOV_CFLAGS)
41MKMODULESENV+=	GCOV_CFLAGS="${GCOV_CFLAGS}"
42.endif
43
44.if !empty(COMPAT_FREEBSD32_ENABLED)
45MKMODULESENV+=	COMPAT_FREEBSD32_ENABLED="yes"
46.endif
47
48# Allow overriding the kernel debug directory, so kernel and user debug may be
49# installed in different directories. Setting it to "" restores the historical
50# behavior of installing debug files in the kernel directory.
51KERN_DEBUGDIR?=	${DEBUGDIR}
52
53.MAIN: all
54
55.if !defined(NO_MODULES)
56# Default prefix used for modules installed from ports
57LOCALBASE?=	/usr/local
58
59LOCAL_MODULES_DIR?= ${LOCALBASE}/sys/modules
60
61# Default to installing all modules installed by ports unless overridden
62# by the user.
63.if !defined(LOCAL_MODULES) && exists(${LOCAL_MODULES_DIR})
64LOCAL_MODULES!= ls ${LOCAL_MODULES_DIR}
65.endif
66.endif
67
68.for target in all clean cleandepend cleandir clobber depend install \
69    ${_obj} reinstall tags
70${target}: kernel-${target}
71.if !defined(NO_MODULES)
72${target}: modules-${target}
73modules-${target}:
74.if !defined(MODULES_WITH_WORLD) && exists($S/modules)
75	cd $S/modules; ${MKMODULESENV} ${MAKE} \
76	    ${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
77.endif
78.for module in ${LOCAL_MODULES}
79	@${ECHODIR} "===> ${module} (${target:S/^reinstall$/install/:S/^clobber$/cleandir/})"
80	@cd ${LOCAL_MODULES_DIR}/${module}; ${MKMODULESENV} ${MAKE} \
81	    DIRPRFX="${module}/" \
82	    ${target:S/^reinstall$/install/:S/^clobber$/cleandir/}
83.endfor
84.endif
85.endfor
86
87# Handle ports (as defined by the user) that build kernel modules
88.if !defined(NO_MODULES) && defined(PORTS_MODULES)
89#
90# The ports tree needs some environment variables defined to match the new kernel
91#
92# SRC_BASE is how the ports tree refers to the location of the base source files
93.if !defined(SRC_BASE)
94SRC_BASE=	${SYSDIR:H:tA}
95.endif
96# OSVERSION is used by some ports to determine build options
97.if !defined(OSRELDATE)
98# Definition copied from src/Makefile.inc1
99OSRELDATE!=	awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
100		    ${MAKEOBJDIRPREFIX}${SRC_BASE}/include/osreldate.h
101.endif
102# Keep the related ports builds in the obj directory so that they are only rebuilt once per kernel build
103#
104# Ports search for some dependencies in PATH, so add the location of the
105# installed files
106WRKDIRPREFIX?=	${.OBJDIR}
107PORTSMODULESENV=\
108	env \
109	-u CC \
110	-u CXX \
111	-u CPP \
112	-u MAKESYSPATH \
113	-u MK_AUTO_OBJ \
114	-u MAKEOBJDIR \
115	MAKEFLAGS="${MAKEFLAGS:M*:tW:S/^-m /-m_/g:S/ -m / -m_/g:tw:N-m_*:NMK_AUTO_OBJ=*}" \
116	SYSDIR=${SYSDIR} \
117	PATH=${PATH}:${LOCALBASE}/bin:${LOCALBASE}/sbin \
118	SRC_BASE=${SRC_BASE} \
119	OSVERSION=${OSRELDATE} \
120	WRKDIRPREFIX=${WRKDIRPREFIX}
121
122# The WRKDIR needs to be cleaned before building, and trying to change the target
123# with a :C pattern below results in install -> instclean
124all:
125.for __i in ${PORTS_MODULES}
126	@${ECHO} "===> Ports module ${__i} (all)"
127	port=${__i}; flavor=$${port#*@}; port=$${port%@*}; flavor=$${flavor%$${port}}; \
128	cd ${PORTSDIR:U/usr/ports}/$${port}; \
129	${PORTSMODULESENV} ${MAKE} -B $${flavor:+FLAVOR=}$${flavor} \
130	    clean build
131.endfor
132
133.for __target in install reinstall clean
134${__target}: ports-${__target}
135ports-${__target}:
136.for __i in ${PORTS_MODULES}
137	@${ECHO} "===> Ports module ${__i} (${__target})"
138	port=${__i}; flavor=$${port#*@}; port=$${port%@*}; flavor=$${flavor%$${port}}; \
139	cd ${PORTSDIR:U/usr/ports}/$${port}; \
140	${PORTSMODULESENV} ${MAKE} -B $${flavor:+FLAVOR=}$${flavor} \
141	    ${__target:C/(re)?install/deinstall reinstall/}
142.endfor
143.endfor
144.endif
145
146# Generate the .bin (booti images) kernel as an extra build output.
147# The targets and rules to generate these appear in Makefile.$MACHINE
148# if the platform supports it.
149.if ${MK_KERNEL_BIN} != "no"
150KERNEL_EXTRA+= ${KERNEL_KO}.bin
151KERNEL_EXTRA_INSTALL+= ${KERNEL_KO}.bin
152CLEAN+=	${KERNEL_KO}.bin
153.endif
154
155.ORDER: kernel-install modules-install
156
157beforebuild: .PHONY
158kernel-all: beforebuild .WAIT ${KERNEL_KO} ${KERNEL_EXTRA}
159
160kernel-cleandir: kernel-clean kernel-cleandepend
161
162kernel-clobber:
163	find . -maxdepth 1 ! -type d ! -name version -delete
164
165kernel-obj:
166
167.if !defined(NO_MODULES)
168modules: modules-all
169modules-depend: beforebuild
170modules-all: beforebuild
171
172.if !defined(NO_MODULES_OBJ)
173modules-all modules-depend: modules-obj
174.endif
175.endif
176
177.if !defined(DEBUG)
178FULLKERNEL=	${KERNEL_KO}
179.else
180FULLKERNEL=	${KERNEL_KO}.full
181${KERNEL_KO}: ${FULLKERNEL} ${KERNEL_KO}.debug
182	${OBJCOPY} --strip-debug --add-gnu-debuglink=${KERNEL_KO}.debug \
183	    ${FULLKERNEL} ${.TARGET}
184${KERNEL_KO}.debug: ${FULLKERNEL}
185	${OBJCOPY} --only-keep-debug ${FULLKERNEL} ${.TARGET}
186install.debug reinstall.debug: gdbinit
187	cd ${.CURDIR}; ${MAKE} ${.TARGET:R}
188
189# Install gdbinit files for kernel debugging.
190gdbinit:
191	grep -v '# XXX' ${S}/../tools/debugscripts/dot.gdbinit | \
192	    sed "s:MODPATH:${.OBJDIR}/modules:" > .gdbinit
193	cp ${S}/../tools/debugscripts/gdbinit.kernel ${.CURDIR}
194.if exists(${S}/../tools/debugscripts/gdbinit.${MACHINE_CPUARCH})
195	cp ${S}/../tools/debugscripts/gdbinit.${MACHINE_CPUARCH} \
196	    ${.CURDIR}/gdbinit.machine
197.endif
198.endif
199
200${FULLKERNEL}: ${SYSTEM_DEP} vers.o
201	@rm -f ${.TARGET}
202	@echo linking ${.TARGET}
203	${SYSTEM_LD}
204.if !empty(MD_ROOT_SIZE_CONFIGURED) && defined(MFS_IMAGE)
205	@sh ${S}/tools/embed_mfs.sh ${.TARGET} ${MFS_IMAGE}
206.endif
207.if ${MK_CTF} != "no"
208	@echo ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ...
209	@${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SYSTEM_OBJS} vers.o
210.endif
211.if !defined(DEBUG)
212	${OBJCOPY} --strip-debug ${.TARGET}
213.endif
214	${SYSTEM_LD_TAIL}
215
216OBJS_DEPEND_GUESS+=	offset.inc assym.inc vnode_if.h ${BEFORE_DEPEND:M*.h} \
217			${MFILES:T:S/.m$/.h/}
218
219.for mfile in ${MFILES}
220# XXX the low quality .m.o rules gnerated by config are normally used
221# instead of the .m.c rules here.
222${mfile:T:S/.m$/.c/}: ${mfile}
223	${AWK} -f $S/tools/makeobjops.awk ${mfile} -c
224${mfile:T:S/.m$/.h/}: ${mfile}
225	${AWK} -f $S/tools/makeobjops.awk ${mfile} -h
226.endfor
227
228kernel-clean:
229	rm -f *.o *.so *.pico *.ko *.s eddep errs \
230	    ${FULLKERNEL} ${KERNEL_KO} ${KERNEL_KO}.debug \
231	    tags vers.c \
232	    vnode_if.c vnode_if.h vnode_if_newproto.h vnode_if_typedef.h \
233	    ${MFILES:T:S/.m$/.c/} ${MFILES:T:S/.m$/.h/} \
234	    ${CLEAN}
235
236# This is a hack.  BFD "optimizes" away dynamic mode if there are no
237# dynamic references.  We could probably do a '-Bforcedynamic' mode like
238# in the a.out ld.  For now, this works.
239force-dynamic-hack.c:
240	:> ${.TARGET}
241
242force-dynamic-hack.pico: force-dynamic-hack.c Makefile
243	${CC} ${CCLDFLAGS} -shared ${CFLAGS} -nostdlib \
244	    force-dynamic-hack.c -o ${.TARGET}
245
246offset.inc: $S/kern/genoffset.sh genoffset.o
247	NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genoffset.sh genoffset.o > ${.TARGET}
248
249genoffset.o: $S/kern/genoffset.c
250	${CC} -c ${NOSAN_CFLAGS:N-flto*:N-fno-common} \
251	    -fcommon $S/kern/genoffset.c
252
253# genoffset_test.o is not actually used for anything - the point of compiling it
254# is to exercise the CTASSERT that checks that the offsets in the offset.inc
255# _lite struct(s) match those in the original(s).
256genoffset_test.o: $S/kern/genoffset.c offset.inc
257	${CC} -c ${NOSAN_CFLAGS:N-flto*:N-fno-common} \
258	    -fcommon -DOFFSET_TEST $S/kern/genoffset.c -o ${.TARGET}
259
260assym.inc: $S/kern/genassym.sh genassym.o genoffset_test.o
261	NM='${NM}' NMFLAGS='${NMFLAGS}' sh $S/kern/genassym.sh genassym.o > ${.TARGET}
262
263genassym.o: $S/$M/$M/genassym.c  offset.inc
264	${CC} -c ${NOSAN_CFLAGS:N-flto*:N-fno-common} \
265	    -fcommon $S/$M/$M/genassym.c
266
267OBJS_DEPEND_GUESS+= opt_global.h
268genoffset.o genassym.o vers.o: opt_global.h
269
270.if !empty(.MAKE.MODE:Unormal:Mmeta) && empty(.MAKE.MODE:Unormal:Mnofilemon)
271_meta_filemon=	1
272.endif
273.if ${MK_DIRDEPS_BUILD} == "no"
274# Skip reading .depend when not needed to speed up tree-walks and simple
275# lookups.  For install, only do this if no other targets are specified.
276# Also skip generating or including .depend.* files if in meta+filemon mode
277# since it will track dependencies itself.  OBJS_DEPEND_GUESS is still used
278# for _meta_filemon but not for _SKIP_DEPEND.
279.if !defined(NO_SKIP_DEPEND) && \
280    ((!empty(.MAKEFLAGS:M-V) && empty(.MAKEFLAGS:M*DEP*)) || \
281    ${.TARGETS:M*obj} == ${.TARGETS} || \
282    ${.TARGETS:M*clean*} == ${.TARGETS} || \
283    ${.TARGETS:M*install*} == ${.TARGETS})
284_SKIP_DEPEND=	1
285.endif
286.if defined(_SKIP_DEPEND) || defined(_meta_filemon)
287.MAKE.DEPENDFILE=	/dev/null
288.endif
289.endif
290
291kernel-depend: .depend
292SRCS=	assym.inc offset.inc vnode_if.h ${BEFORE_DEPEND} ${CFILES} \
293	${SYSTEM_CFILES} ${GEN_CFILES} ${SFILES} \
294	${MFILES:T:S/.m$/.h/}
295DEPENDOBJS+=	${SYSTEM_OBJS} genassym.o genoffset.o genoffset_test.o
296DEPENDOBJS+=	${CLEAN:M*.o}
297DEPENDFILES=	${DEPENDOBJS:O:u:C/^/.depend./}
298.if ${MAKE_VERSION} < 20160220
299DEPEND_MP?=	-MP
300.endif
301.if defined(_SKIP_DEPEND)
302# Don't bother reading any .meta files
303${DEPENDOBJS}:	.NOMETA
304.depend:	.NOMETA
305# Unset these to avoid looping/statting on them later.
306.undef DEPENDOBJS
307.undef DEPENDFILES
308.endif	# defined(_SKIP_DEPEND)
309DEPEND_CFLAGS+=	-MD ${DEPEND_MP} -MF.depend.${.TARGET}
310DEPEND_CFLAGS+=	-MT${.TARGET}
311.if !defined(_meta_filemon)
312.if !empty(DEPEND_CFLAGS)
313# Only add in DEPEND_CFLAGS for CFLAGS on files we expect from DEPENDOBJS
314# as those are the only ones we will include.
315DEPEND_CFLAGS_CONDITION= "${DEPENDOBJS:M${.TARGET}}" != ""
316CFLAGS+=	${${DEPEND_CFLAGS_CONDITION}:?${DEPEND_CFLAGS}:}
317.endif
318.for __depend_obj in ${DEPENDFILES}
319.if ${MAKE_VERSION} < 20160220
320.sinclude "${.OBJDIR}/${__depend_obj}"
321.else
322.dinclude "${.OBJDIR}/${__depend_obj}"
323.endif
324.endfor
325.endif	# !defined(_meta_filemon)
326
327# Always run 'make depend' to generate dependencies early and to avoid the
328# need for manually running it.  For the kernel this is mostly a NOP since
329# all dependencies are correctly added or accounted for.  This is mostly to
330# ensure downstream uses of kernel-depend are handled.
331beforebuild: kernel-depend
332
333# Guess some dependencies for when no ${DEPENDFILE}.OBJ is generated yet.
334# For meta+filemon the .meta file is checked for since it is the dependency
335# file used.
336.for __obj in ${DEPENDOBJS:O:u}
337.if defined(_meta_filemon)
338_depfile=	${.OBJDIR}/${__obj}.meta
339.else
340_depfile=	${.OBJDIR}/.depend.${__obj}
341.endif
342.if !exists(${_depfile})
343.if ${SYSTEM_OBJS:M${__obj}}
344${__obj}: ${OBJS_DEPEND_GUESS}
345.endif
346${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
347.elif defined(_meta_filemon)
348# For meta mode we still need to know which file to depend on to avoid
349# ambiguous suffix transformation rules from .PATH.  Meta mode does not
350# use .depend files.  We really only need source files, not headers since
351# they are typically in SRCS/beforebuild already.  For target-specific
352# guesses do include headers though since they may not be in SRCS.
353.if ${SYSTEM_OBJS:M${__obj}}
354${__obj}: ${OBJS_DEPEND_GUESS:N*.h}
355.endif
356${__obj}: ${OBJS_DEPEND_GUESS.${__obj}}
357.endif	# !exists(${_depfile})
358.endfor
359
360.NOPATH: .depend ${DEPENDFILES}
361
362.depend: .PRECIOUS ${SRCS}
363
364_ILINKS= machine
365.if ${MACHINE} != ${MACHINE_CPUARCH} && ${MACHINE} != "arm64"
366_ILINKS+= ${MACHINE_CPUARCH}
367.endif
368.if ${MACHINE_CPUARCH} == "i386" || ${MACHINE_CPUARCH} == "amd64"
369_ILINKS+= x86
370.endif
371.if ${MACHINE_CPUARCH} == "amd64"
372_ILINKS+= i386
373.endif
374
375.if ${MK_REPRODUCIBLE_BUILD} != "no"
376PREFIX_SYSDIR=/usr/src/sys
377PREFIX_OBJDIR=/usr/obj/usr/src/${MACHINE}.${MACHINE_CPUARCH}/sys/${KERN_IDENT}
378CFLAGS+= -ffile-prefix-map=${SYSDIR}=${PREFIX_SYSDIR}
379CFLAGS+= -ffile-prefix-map=${.OBJDIR}=${PREFIX_OBJDIR}
380.if defined(SYSROOT)
381CFLAGS+= -ffile-prefix-map=${SYSROOT}=/sysroot
382.endif
383.else
384PREFIX_SYSDIR=${SYSDIR}
385PREFIX_OBJDIR=${.OBJDIR}
386.endif
387
388# Ensure that the link exists without depending on it when it exists.
389# Ensure that debug info references the path in the source tree.
390.for _link in ${_ILINKS}
391.if !exists(${.OBJDIR}/${_link})
392${SRCS} ${DEPENDOBJS}: ${_link}
393.endif
394.if ${_link} == "machine"
395CFLAGS+= -fdebug-prefix-map=./machine=${PREFIX_SYSDIR}/${MACHINE}/include
396.else
397CFLAGS+= -fdebug-prefix-map=./${_link}=${PREFIX_SYSDIR}/${_link}/include
398.endif
399.endfor
400
401# Install GDB plugins that are useful for kernel debugging.  See the
402# README in sys/tools/gdb for more information.
403GDB_FILES= acttrace.py \
404	   freebsd.py \
405	   pcpu.py \
406	   selftest.py \
407	   vnet.py
408
409${_ILINKS}:
410	@case ${.TARGET} in \
411	machine) \
412		path=${S}/${MACHINE}/include ;; \
413	*) \
414		path=${S}/${.TARGET}/include ;; \
415	esac ; \
416	${ECHO} ${.TARGET} "->" $$path ; \
417	ln -fns $$path ${.TARGET}
418
419# .depend needs include links so we remove them only together.
420kernel-cleandepend: .PHONY
421	rm -f .depend .depend.* ${_ILINKS}
422
423kernel-tags:
424	@ls .depend.* > /dev/null 2>&1 || \
425	    { echo "you must make all first"; exit 1; }
426	sh $S/conf/systags.sh
427
428kernel-install: .PHONY
429	@if [ ! -f ${KERNEL_KO} ] ; then \
430		echo "You must build a kernel first." ; \
431		exit 1 ; \
432	fi
433.if exists(${DESTDIR}${KODIR})
434	-thiskernel=`sysctl -n kern.bootfile || echo /boot/kernel/kernel` ; \
435	if [ ! "`dirname "$$thiskernel"`" -ef ${DESTDIR}${KODIR} ] ; then \
436		chflags -R noschg ${DESTDIR}${KODIR} ; \
437		rm -rf ${DESTDIR}${KODIR} ; \
438		rm -rf ${DESTDIR}${KERN_DEBUGDIR}${KODIR} ; \
439	else \
440		if [ -d ${DESTDIR}${KODIR}.old ] ; then \
441			chflags -R noschg ${DESTDIR}${KODIR}.old ; \
442			rm -rf ${DESTDIR}${KODIR}.old ; \
443		fi ; \
444		mv ${DESTDIR}${KODIR} ${DESTDIR}${KODIR}.old ; \
445		if [ -n "${KERN_DEBUGDIR}" -a \
446		     -d ${DESTDIR}${KERN_DEBUGDIR}${KODIR} ]; then \
447			rm -rf ${DESTDIR}${KERN_DEBUGDIR}${KODIR}.old ; \
448			mv ${DESTDIR}${KERN_DEBUGDIR}${KODIR} ${DESTDIR}${KERN_DEBUGDIR}${KODIR}.old ; \
449		fi ; \
450		sysctl kern.bootfile=${DESTDIR}${KODIR}.old/"`basename "$$thiskernel"`" ; \
451	fi
452.endif
453	mkdir -p ${DESTDIR}${KODIR}
454	${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}/
455.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
456	mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR}
457	${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/
458	${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \
459	    $S/tools/kernel-gdb.py ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/${KERNEL_KO}-gdb.py
460	mkdir -p ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb
461.for file in ${GDB_FILES}
462	${INSTALL} -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} \
463	    $S/tools/gdb/${file} ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/gdb/${file}
464.endfor
465.endif
466.if defined(KERNEL_EXTRA_INSTALL)
467	${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_EXTRA_INSTALL} ${DESTDIR}${KODIR}/
468.endif
469
470
471
472kernel-reinstall:
473	@-chflags -R noschg ${DESTDIR}${KODIR}
474	${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO} ${DESTDIR}${KODIR}/
475.if defined(DEBUG) && !defined(INSTALL_NODEBUG) && ${MK_KERNEL_SYMBOLS} != "no"
476	${INSTALL} -p -m ${KMODMODE} -o ${KMODOWN} -g ${KMODGRP} ${KERNEL_KO}.debug ${DESTDIR}${KERN_DEBUGDIR}${KODIR}/
477.endif
478
479config.o env.o hints.o vers.o vnode_if.o:
480	${NORMAL_C}
481	${NORMAL_CTFCONVERT}
482
483NEWVERS_ENV+= MAKE="${MAKE}"
484.if ${MK_REPRODUCIBLE_BUILD} != "no"
485NEWVERS_ARGS+= -R -d ${PREFIX_OBJDIR}
486.endif
487vers.c: .NOMETA_CMP $S/conf/newvers.sh $S/sys/param.h ${SYSTEM_DEP:Nvers.*}
488	${NEWVERS_ENV} sh $S/conf/newvers.sh ${NEWVERS_ARGS} ${KERN_IDENT}
489
490vnode_if.c: $S/tools/vnode_if.awk $S/kern/vnode_if.src
491	${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -c
492
493vnode_if.h vnode_if_newproto.h vnode_if_typedef.h: $S/tools/vnode_if.awk \
494    $S/kern/vnode_if.src
495vnode_if.h: vnode_if_newproto.h vnode_if_typedef.h
496	${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -h
497vnode_if_newproto.h:
498	${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -p
499vnode_if_typedef.h:
500	${AWK} -f $S/tools/vnode_if.awk $S/kern/vnode_if.src -q
501
502.if ${MFS_IMAGE:Uno} != "no"
503.if empty(MD_ROOT_SIZE_CONFIGURED)
504embedfs_${MFS_IMAGE:T:R}.o: ${MFS_IMAGE} $S/dev/md/embedfs.S
505	${CC} ${CFLAGS} ${ACFLAGS} -DMFS_IMAGE=\""${MFS_IMAGE}"\" -c \
506	    $S/dev/md/embedfs.S -o ${.TARGET}
507.endif
508.endif
509
510.include "kern.mk"
511