Index: share/mk/kmod.opts.mk =================================================================== --- /dev/null +++ share/mk/kmod.opts.mk @@ -0,0 +1,4 @@ +# $FreeBSD$ + +.include +.include "${SYSDIR}/conf/kmod.opts.mk" Index: sys/conf/kmod.mk =================================================================== --- sys/conf/kmod.mk +++ sys/conf/kmod.mk @@ -73,12 +73,7 @@ KMODISLOADED?= /sbin/kldstat -q -n OBJCOPY?= objcopy -.include -# Grab all the options for a kernel build. For backwards compat, we need to -# do this after bsd.own.mk. -.include "kern.opts.mk" -.include -.include "config.mk" +.include "kmod.opts.mk" .include .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S .m Index: sys/conf/kmod.opts.mk =================================================================== --- /dev/null +++ sys/conf/kmod.opts.mk @@ -0,0 +1,16 @@ +# $FreeBSD$ +# +# Handle options (KERN_OPTS) for kernel module options. This can be included earlier in a kmod Makefile +# to allow KERN_OPTS to control SRCS, etc. + +.if !target(____) +____: + +.include +# Grab all the options for a kernel build. For backwards compat, we need to +# do this after bsd.own.mk. +.include "kern.opts.mk" +.include +.include "config.mk" + +.endif # !target(____)