xref: /freebsd/sys/conf/kmod.mk (revision 684c1c1ddbab110dc5afa8f150cf942eb771f48c)
1639a2e50SGarrett Wollman#	From: @(#)bsd.prog.mk	5.26 (Berkeley) 6/25/91
27f3dea24SPeter Wemm# $FreeBSD$
353996fadSWolfram Schneider#
4fe3cac87SNick Hibma# The include file <bsd.kmod.mk> handles installing Kernel Loadable Device
5fe3cac87SNick Hibma# drivers (KLD's).
653996fadSWolfram Schneider#
753996fadSWolfram Schneider#
853996fadSWolfram Schneider# +++ variables +++
953996fadSWolfram Schneider#
1053996fadSWolfram Schneider# CLEANFILES	Additional files to remove for the clean and cleandir targets.
1153996fadSWolfram Schneider#
12fe3cac87SNick Hibma# KMOD          The name of the kernel module to build.
1353996fadSWolfram Schneider#
143bdfa9e5SDavid E. O'Brien# KMODDIR	Base path for kernel modules (see kld(4)). [/boot/kernel]
1553996fadSWolfram Schneider#
16fe3cac87SNick Hibma# KMODOWN	KLD owner. [${BINOWN}]
1753996fadSWolfram Schneider#
18fe3cac87SNick Hibma# KMODGRP	KLD group. [${BINGRP}]
1953996fadSWolfram Schneider#
20fe3cac87SNick Hibma# KMODMODE	KLD mode. [${BINMODE}]
2153996fadSWolfram Schneider#
22fe3cac87SNick Hibma# KMODLOAD	Command to load a kernel module [/sbin/kldload]
237bc830bbSWolfram Schneider#
24fe3cac87SNick Hibma# KMODUNLOAD	Command to unload a kernel module [/sbin/kldunload]
257bc830bbSWolfram Schneider#
26fe3cac87SNick Hibma# PROG          The name of the kernel module to build.
277bc830bbSWolfram Schneider#		If not supplied, ${KMOD}.o is used.
2853996fadSWolfram Schneider#
2953996fadSWolfram Schneider# SRCS          List of source files
3053996fadSWolfram Schneider#
312b06260dSRuslan Ermilov# DESTDIR	Change the tree where the module gets installed. [not set]
3253996fadSWolfram Schneider#
337fecffecSDoug Rabson# MFILES	Optionally a list of interfaces used by the module.
347fecffecSDoug Rabson#		This file contains a default list of interfaces.
3553996fadSWolfram Schneider#
360b3178a4SMike Smith# EXPORT_SYMS	A list of symbols that should be exported from the module,
3793f03548SMike Smith#		or the name of a file containing a list of symbols, or YES
3893f03548SMike Smith#		to export all symbols.  If not defined, no symbols are
390b3178a4SMike Smith#		exported.
400b3178a4SMike Smith#
4153996fadSWolfram Schneider# +++ targets +++
4253996fadSWolfram Schneider#
4353996fadSWolfram Schneider# 	install:
4417d6c636SRuslan Ermilov#               install the kernel module; if the Makefile
4553996fadSWolfram Schneider#               does not itself define the target install, the targets
4653996fadSWolfram Schneider#               beforeinstall and afterinstall may also be used to cause
4753996fadSWolfram Schneider#               actions immediately before and after the install target
4853996fadSWolfram Schneider#		is executed.
4953996fadSWolfram Schneider#
5053996fadSWolfram Schneider# 	load:
51fe3cac87SNick Hibma#		Load KLD.
5253996fadSWolfram Schneider#
5353996fadSWolfram Schneider# 	unload:
54fe3cac87SNick Hibma#		Unload KLD.
5553996fadSWolfram Schneider#
5653996fadSWolfram Schneider# bsd.obj.mk: clean, cleandir and obj
57161e8999SBruce Evans# bsd.dep.mk: cleandepend, depend and tags
5853996fadSWolfram Schneider#
59639a2e50SGarrett Wollman
60b7bbb709SDavid E. O'BrienAWK?=		awk
61fe3cac87SNick HibmaKMODLOAD?=	/sbin/kldload
62fe3cac87SNick HibmaKMODUNLOAD?=	/sbin/kldunload
63f6611608SSheldon HearnOBJCOPY?=	objcopy
647bc830bbSWolfram Schneider
6506639be7SPeter Wemm.if defined(KMODDEPS)
6606639be7SPeter Wemm.error "Do not use KMODDEPS on 5.0+, use MODULE_VERSION/MODULE_DEPEND"
6706639be7SPeter Wemm.endif
6806639be7SPeter Wemm
690ac2fc87SRuslan Ermilov.include <bsd.init.mk>
70639a2e50SGarrett Wollman
71639a2e50SGarrett Wollman.SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
72639a2e50SGarrett Wollman
7306d6e4fcSTom Rhodes.if ${CC} == "icc"
745a19f6d9STom RhodesCFLAGS:=	${CFLAGS:C/(-x[^M^K^W]+)[MKW]+|-x[MKW]+/\1/}
7506d6e4fcSTom Rhodes.endif
76e0dd77fdSRuslan ErmilovCFLAGS+=	${COPTS} -D_KERNEL
778fe644b2SMike SmithCFLAGS+=	-DKLD_MODULE
784a2d2630SBruce Evans
79021886ffSBruce Evans# Don't use any standard or source-relative include directories.
80021886ffSBruce Evans# Since -nostdinc will annull any previous -I paths, we repeat all
81021886ffSBruce Evans# such paths after -nostdinc.  It doesn't seem to be possible to
82021886ffSBruce Evans# add to the front of `make' variable.
83021886ffSBruce Evans_ICFLAGS:=	${CFLAGS:M-I*}
8406d6e4fcSTom Rhodes.if ${CC} == "icc"
8506d6e4fcSTom RhodesNOSTDINC=	-X
8606d6e4fcSTom Rhodes.else
8706d6e4fcSTom RhodesNOSTDINC=	-nostdinc
8806d6e4fcSTom Rhodes.endif
8906d6e4fcSTom RhodesCFLAGS+=	${NOSTDINC} -I- ${INCLMAGIC} ${_ICFLAGS}
908fa793d0SBrian Feldman.if defined(KERNBUILDDIR)
9175504450SBrian FeldmanCFLAGS+=       -include ${KERNBUILDDIR}/opt_global.h
928fa793d0SBrian Feldman.endif
93021886ffSBruce Evans
94fe3cac87SNick Hibma# Add -I paths for system headers.  Individual KLD makefiles don't
95021886ffSBruce Evans# need any -I paths for this.  Similar defaults for .PATH can't be
96021886ffSBruce Evans# set because there are no standard paths for non-headers.
9774455e55SWarner LoshCFLAGS+=	-I. -I@
984a2d2630SBruce Evans
9902b199f1SMax Laier# Add -I path for altq headers as they are included via net/if_var.h
10002b199f1SMax Laier# for example.
10102b199f1SMax LaierCFLAGS+=	-I@/contrib/altq
10202b199f1SMax Laier
103a0b845feSBruce Evans# Add a -I path to standard headers like <stddef.h>.  Use a relative
104a0b845feSBruce Evans# path to src/include if possible.  If the @ symlink hasn't been built
105a0b845feSBruce Evans# yet, then we can't tell if the relative path exists.  Add both the
106a0b845feSBruce Evans# potential relative path and an absolute path in that case.
107a0b845feSBruce Evans.if exists(@)
108a0b845feSBruce Evans.if exists(@/../include)
109a0b845feSBruce EvansCFLAGS+=	-I@/../include
110a0b845feSBruce Evans.else
111b3e17ba2SSatoshi AsamiCFLAGS+=	-I${DESTDIR}/usr/include
112b3e17ba2SSatoshi Asami.endif
113a0b845feSBruce Evans.else # !@
114a0b845feSBruce EvansCFLAGS+=	-I@/../include -I${DESTDIR}/usr/include
115a0b845feSBruce Evans.endif # @
11656bac51bSPoul-Henning Kamp
11706d6e4fcSTom Rhodes.if ${CC} != "icc"
118a92a2144SPeter WemmCFLAGS+=	-finline-limit=${INLINE_LIMIT}
11906d6e4fcSTom Rhodes.endif
1202a51529fSPeter Wemm
1210b3178a4SMike Smith# Disallow common variables, and if we end up with commons from
1220b3178a4SMike Smith# somewhere unexpected, allocate storage for them in the module itself.
12306d6e4fcSTom Rhodes.if ${CC} != "icc"
1240b3178a4SMike SmithCFLAGS+=	-fno-common
12506d6e4fcSTom Rhodes.endif
1260b3178a4SMike SmithLDFLAGS+=	-d -warn-common
1270b3178a4SMike Smith
1289e4be63dSBruce EvansCFLAGS+=	${DEBUG_FLAGS}
1299e4be63dSBruce Evans
130639a2e50SGarrett WollmanOBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
131639a2e50SGarrett Wollman
132639a2e50SGarrett Wollman.if !defined(PROG)
13390f60fc9SMike SmithPROG=	${KMOD}.ko
13490f60fc9SMike Smith.endif
135639a2e50SGarrett Wollman
136817b59bfSRuslan Ermilov.if !defined(DEBUG_FLAGS)
137f6611608SSheldon HearnFULLPROG=	${PROG}
138f6611608SSheldon Hearn.else
139f6611608SSheldon HearnFULLPROG=	${PROG}.debug
140f6611608SSheldon Hearn${PROG}: ${FULLPROG}
141f6611608SSheldon Hearn	${OBJCOPY} --strip-debug ${FULLPROG} ${PROG}
142f6611608SSheldon Hearn.endif
143f6611608SSheldon Hearn
1444d6bcc83SPeter Wemm.if ${MACHINE_ARCH} != amd64
145f6611608SSheldon Hearn${FULLPROG}: ${KMOD}.kld
14609be11baSPeter Wemm	${LD} -Bshareable ${LDFLAGS} -o ${.TARGET} ${KMOD}.kld
147817b59bfSRuslan Ermilov.if !defined(DEBUG_FLAGS)
148817b59bfSRuslan Ermilov	${OBJCOPY} --strip-debug ${.TARGET}
1494c293d35SRuslan Ermilov.endif
1504d6bcc83SPeter Wemm.endif
15109be11baSPeter Wemm
15293f03548SMike SmithEXPORT_SYMS?=	NO
15393f03548SMike Smith.if ${EXPORT_SYMS} != YES
1540b3178a4SMike SmithCLEANFILES+=	${.OBJDIR}/export_syms
1550b3178a4SMike Smith.endif
1560b3178a4SMike Smith
1574d6bcc83SPeter Wemm.if ${MACHINE_ARCH} != amd64
15809be11baSPeter Wemm${KMOD}.kld: ${OBJS}
1594d6bcc83SPeter Wemm.else
1604d6bcc83SPeter Wemm${FULLPROG}: ${OBJS}
1614d6bcc83SPeter Wemm.endif
1620b3178a4SMike Smith	${LD} ${LDFLAGS} -r -d -o ${.TARGET} ${OBJS}
1630b3178a4SMike Smith.if defined(EXPORT_SYMS)
16493f03548SMike Smith.if ${EXPORT_SYMS} != YES
1650b3178a4SMike Smith.if ${EXPORT_SYMS} == NO
1660b3178a4SMike Smith	touch ${.OBJDIR}/export_syms
1670b3178a4SMike Smith.elif !exists(${.CURDIR}/${EXPORT_SYMS})
1680b3178a4SMike Smith	echo ${EXPORT_SYMS} > ${.OBJDIR}/export_syms
1690b3178a4SMike Smith.else
1700b3178a4SMike Smith	grep -v '^#' < ${EXPORT_SYMS} >  ${.OBJDIR}/export_syms
1710b3178a4SMike Smith.endif
1720b3178a4SMike Smith	awk -f ${SYSDIR}/conf/kmod_syms.awk ${.TARGET} \
1730b3178a4SMike Smith		${.OBJDIR}/export_syms | \
17493f03548SMike Smith	xargs -J% ${OBJCOPY} % ${.TARGET}
17593f03548SMike Smith.endif
1760b3178a4SMike Smith.endif
1774d6bcc83SPeter Wemm.if !defined(DEBUG_FLAGS) && ${MACHINE_ARCH} == amd64
1784d6bcc83SPeter Wemm	${OBJCOPY} --strip-debug ${.TARGET}
1794d6bcc83SPeter Wemm.endif
1800b3178a4SMike Smith
1814a2d2630SBruce Evans_ILINKS=@ machine
182639a2e50SGarrett Wollman
183b25a566dSRuslan Ermilovall: objwarn ${PROG}
1844a2d2630SBruce Evans
185985f41afSWarner Loshbeforedepend: ${_ILINKS}
186985f41afSWarner Losh	@rm -f .depend
187985f41afSWarner Losh
188f3cc9575SWarner Losh# Ensure that the links exist without depending on it when it exists which
189f3cc9575SWarner Losh# causes all the modules to be rebuilt when the directory pointed to changes.
190f3cc9575SWarner Losh.for _link in ${_ILINKS}
191f3cc9575SWarner Losh.if !exists(${.OBJDIR}/${_link})
192f3cc9575SWarner Losh${OBJS}: ${_link}
193f3cc9575SWarner Losh.endif
194f3cc9575SWarner Losh.endfor
1954a2d2630SBruce Evans
1969a8631b3SWarner Losh# Search for kernel source tree in standard places.
1979a8631b3SWarner Losh.for _dir in ${.CURDIR}/../.. ${.CURDIR}/../../.. /sys /usr/src/sys
198776f50b9SRuslan Ermilov.if !defined(SYSDIR) && exists(${_dir}/kern/)
1999a8631b3SWarner LoshSYSDIR=	${_dir}
2009a8631b3SWarner Losh.endif
2019a8631b3SWarner Losh.endfor
202776f50b9SRuslan Ermilov.if !defined(SYSDIR) || !exists(${SYSDIR}/kern/)
2039a8631b3SWarner Losh.error "can't find kernel source tree"
2049a8631b3SWarner Losh.endif
2059a8631b3SWarner Losh
2064a2d2630SBruce Evans${_ILINKS}:
2079a8631b3SWarner Losh	@case ${.TARGET} in \
20808a04a89SPeter Wemm	machine) \
2099a8631b3SWarner Losh		path=${SYSDIR}/${MACHINE_ARCH}/include ;; \
21008a04a89SPeter Wemm	@) \
2119a8631b3SWarner Losh		path=${SYSDIR} ;; \
21208a04a89SPeter Wemm	esac ; \
21308a04a89SPeter Wemm	path=`(cd $$path && /bin/pwd)` ; \
21408a04a89SPeter Wemm	${ECHO} ${.TARGET} "->" $$path ; \
21508a04a89SPeter Wemm	ln -s $$path ${.TARGET}
2164a2d2630SBruce Evans
217361186e5SMaxime HenrionCLEANFILES+= ${PROG} ${KMOD}.kld ${OBJS} ${_ILINKS} symb.tmp tmp.o
218361186e5SMaxime Henrion
219817b59bfSRuslan Ermilov.if defined(DEBUG_FLAGS)
220361186e5SMaxime HenrionCLEANFILES+= ${FULLPROG}
221361186e5SMaxime Henrion.endif
222639a2e50SGarrett Wollman
223639a2e50SGarrett Wollman.if !target(install)
224639a2e50SGarrett Wollman
225ea87b3cbSDavid E. O'Brien_INSTALLFLAGS:=	${INSTALLFLAGS}
226e902c1bbSTim Vanderhoek.for ie in ${INSTALLFLAGS_EDIT}
227e902c1bbSTim Vanderhoek_INSTALLFLAGS:=	${_INSTALLFLAGS${ie}}
228e902c1bbSTim Vanderhoek.endfor
229e902c1bbSTim Vanderhoek
230817b59bfSRuslan Ermilov.if defined(DEBUG_FLAGS)
231b25a566dSRuslan Ermilovinstall.debug:
2322cbc81ffSRuslan Ermilov	cd ${.CURDIR}; ${MAKE} -DINSTALL_DEBUG install
2332cbc81ffSRuslan Ermilov.endif
234a4c00586SDag-Erling Smørgrav
2352b06260dSRuslan Ermilov.if !target(realinstall)
2362b06260dSRuslan Ermilovrealinstall: _kmodinstall
2372b06260dSRuslan Ermilov.ORDER: beforeinstall _kmodinstall
2382b06260dSRuslan Ermilov_kmodinstall:
239817b59bfSRuslan Ermilov.if defined(DEBUG_FLAGS) && defined(INSTALL_DEBUG)
240d2893b16SRuslan Ermilov	${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
2412b06260dSRuslan Ermilov	    ${_INSTALLFLAGS} ${FULLPROG} ${DESTDIR}${KMODDIR}
2422cbc81ffSRuslan Ermilov.else
243d2893b16SRuslan Ermilov	${INSTALL} -o ${KMODOWN} -g ${KMODGRP} -m ${KMODMODE} \
2442b06260dSRuslan Ermilov	    ${_INSTALLFLAGS} ${PROG} ${DESTDIR}${KMODDIR}
2452b06260dSRuslan Ermilov
2462b06260dSRuslan Ermilov.include <bsd.links.mk>
2472b06260dSRuslan Ermilov
2484875819cSJake Burkholder.if !defined(NO_XREF)
2492b06260dSRuslan Ermilovafterinstall: _kldxref
2502b06260dSRuslan Ermilov.ORDER: realinstall _kldxref
2512b06260dSRuslan Ermilov.ORDER: _installlinks _kldxref
2522b06260dSRuslan Ermilov_kldxref:
253be1d673dSRuslan Ermilov	@if type kldxref >/dev/null 2>&1; then \
254be1d673dSRuslan Ermilov		${ECHO} kldxref ${DESTDIR}${KMODDIR}; \
255be1d673dSRuslan Ermilov		kldxref ${DESTDIR}${KMODDIR}; \
256be1d673dSRuslan Ermilov	fi
257505222d3SPeter Wemm.endif
2582cbc81ffSRuslan Ermilov.endif
2592b06260dSRuslan Ermilov.endif !target(realinstall)
260639a2e50SGarrett Wollman
2612b06260dSRuslan Ermilov.endif !target(install)
262639a2e50SGarrett Wollman
263639a2e50SGarrett Wollman.if !target(load)
2649a8631b3SWarner Loshload:	${PROG}
265dba3dc7bSNick Hibma	${KMODLOAD} -v ${.OBJDIR}/${KMOD}.ko
266639a2e50SGarrett Wollman.endif
267639a2e50SGarrett Wollman
268639a2e50SGarrett Wollman.if !target(unload)
269fe3cac87SNick Hibmaunload:
2709a8631b3SWarner Losh	${KMODUNLOAD} -v ${KMOD}
27108a04a89SPeter Wemm.endif
2721aa57be3SGarrett Wollman
2736b1bb559SWarner Losh.if defined(KERNBUILDDIR)
2746b1bb559SWarner Losh.PATH: ${KERNBUILDDIR}
2756b1bb559SWarner LoshCFLAGS += -I${KERNBUILDDIR}
2766b1bb559SWarner Losh.for _src in ${SRCS:Mopt_*.h}
2776b1bb559SWarner LoshCLEANFILES+=	${_src}
2786b1bb559SWarner Losh.if !target(${_src})
2796b1bb559SWarner Losh${_src}:
2803193579bSWarner Losh	ln -s ${KERNBUILDDIR}/${_src} ${.TARGET}
2816b1bb559SWarner Losh.endif
2826b1bb559SWarner Losh.endfor
2836b1bb559SWarner Losh.else
2844fea6704SBruce Evans.for _src in ${SRCS:Mopt_*.h}
2854fea6704SBruce EvansCLEANFILES+=	${_src}
2864fea6704SBruce Evans.if !target(${_src})
2874fea6704SBruce Evans${_src}:
2884fea6704SBruce Evans	touch ${.TARGET}
2894fea6704SBruce Evans.endif
2904fea6704SBruce Evans.endfor
2916b1bb559SWarner Losh.endif
2924fea6704SBruce Evans
2937fecffecSDoug RabsonMFILES?= kern/bus_if.m kern/device_if.m dev/iicbus/iicbb_if.m \
2946f2d8adbSBoris Popov    dev/iicbus/iicbus_if.m isa/isa_if.m \
2956f2d8adbSBoris Popov    libkern/iconv_converter_if.m \
2966732641eSWarner Losh    dev/eisa/eisa_if.m dev/mii/miibus_if.m \
2977e820aaaSMike Smith    dev/pccard/card_if.m dev/pccard/power_if.m dev/pci/pci_if.m \
2987e820aaaSMike Smith    dev/pci/pcib_if.m dev/ppbus/ppbus_if.m dev/smbus/smbus_if.m \
2990f55ac6cSCameron Grant    dev/usb/usb_if.m dev/sound/pcm/ac97_if.m dev/sound/pcm/channel_if.m \
300c4f9e3aeSSam Leffler    dev/sound/pcm/feeder_if.m dev/sound/pcm/mixer_if.m pci/agp_if.m \
3012bec1c89SMarcel Moolenaar    opencrypto/crypto_if.m pc98/pc98/canbus_if.m dev/uart/uart_if.m
3027fecffecSDoug Rabson
3037fecffecSDoug Rabson.for _srcsrc in ${MFILES}
3044fea6704SBruce Evans.for _ext in c h
3054fea6704SBruce Evans.for _src in ${SRCS:M${_srcsrc:T:R}.${_ext}}
3064fea6704SBruce EvansCLEANFILES+=	${_src}
3074fea6704SBruce Evans.if !target(${_src})
308f3cc9575SWarner Losh.if !exists(@)
3094fea6704SBruce Evans${_src}: @
310f3cc9575SWarner Losh.endif
3114fea6704SBruce Evans.if exists(@)
3129fa411aeSDavid E. O'Brien${_src}: @/tools/makeobjops.awk @/${_srcsrc}
3134fea6704SBruce Evans.endif
3149fa411aeSDavid E. O'Brien	${AWK} -f @/tools/makeobjops.awk @/${_srcsrc} -${_ext}
3154fea6704SBruce Evans.endif
3164fea6704SBruce Evans.endfor # _src
3174fea6704SBruce Evans.endfor # _ext
3184fea6704SBruce Evans.endfor # _srcsrc
3194fea6704SBruce Evans
3209029b644SPeter Wemm.for _ext in c h
3219029b644SPeter Wemm.if ${SRCS:Mvnode_if.${_ext}} != ""
3229029b644SPeter WemmCLEANFILES+=	vnode_if.${_ext}
323f3cc9575SWarner Losh.if !exists(@)
3249029b644SPeter Wemmvnode_if.${_ext}: @
325f3cc9575SWarner Losh.endif
3264fea6704SBruce Evans.if exists(@)
327b7bbb709SDavid E. O'Brienvnode_if.${_ext}: @/tools/vnode_if.awk @/kern/vnode_if.src
3284fea6704SBruce Evans.endif
329b7bbb709SDavid E. O'Brien	${AWK} -f @/tools/vnode_if.awk @/kern/vnode_if.src -${_ext}
3304fea6704SBruce Evans.endif
3319029b644SPeter Wemm.endfor
3321aa57be3SGarrett Wollman
333dba6dd17SWarner Losh.for _i in mii pccard usb
334dba6dd17SWarner Losh.if ${SRCS:M${_i}devs.h} != ""
335dba6dd17SWarner LoshCLEANFILES+=	${_i}devs.h
3362d3ce713SDavid E. O'Brien.if !exists(@)
337dba6dd17SWarner Losh${_i}devs.h: @
3382d3ce713SDavid E. O'Brien.endif
3392d3ce713SDavid E. O'Brien.if exists(@)
340dba6dd17SWarner Losh${_i}devs.h: @/tools/${_i}devs2h.awk @/dev/${_i}/${_i}devs
3412d3ce713SDavid E. O'Brien.endif
342dba6dd17SWarner Losh	${AWK} -f @/tools/${_i}devs2h.awk @/dev/${_i}/${_i}devs
3432d3ce713SDavid E. O'Brien.endif
344dba6dd17SWarner Losh.endfor # _i
3452d3ce713SDavid E. O'Brien
346684c1c1dSNate Lawson.if ${SRCS:Macpi_quirks.h} != ""
347684c1c1dSNate LawsonCLEANFILES+=	acpi_quirks.h
348684c1c1dSNate Lawson.if !exists(@)
349684c1c1dSNate Lawsonacpi_quirks.h: @
350684c1c1dSNate Lawson.endif
351684c1c1dSNate Lawson.if exists(@)
352684c1c1dSNate Lawsonacpi_quirks.h: @/tools/acpi_quirks2h.awk @/dev/acpica/acpi_quirks
353684c1c1dSNate Lawson.endif
354684c1c1dSNate Lawson	${AWK} -f @/tools/acpi_quirks2h.awk @/dev/acpica/acpi_quirks
355684c1c1dSNate Lawson.endif
356684c1c1dSNate Lawson
35771395925SPeter Wemmregress:
35869b87d3eSEivind Eklund
359766f7d6eSMark Murraylint: ${SRCS}
360bbb467cdSRuslan Ermilov	${LINT} ${LINTKERNFLAGS} ${CFLAGS:M-[DILU]*} ${.ALLSRC:M*.c}
361766f7d6eSMark Murray
36268e00b92SJordan K. Hubbard.include <bsd.dep.mk>
36347da63c3SBruce Evans
364f2bffe0fSRuslan Ermilov.if !exists(${.OBJDIR}/${DEPENDFILE})
365589d9341SBruce Evans${OBJS}: ${SRCS:M*.h}
36647da63c3SBruce Evans.endif
36747da63c3SBruce Evans
368afba897fSBruce Evans.include <bsd.obj.mk>
369ddc474a8SRuslan Ermilov.include "kern.mk"
370