summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2005-10-05 10:05:55 +0000
committerglebius <glebius@FreeBSD.org>2005-10-05 10:05:55 +0000
commite2de919bb508d643b919555e8928a3ce4e6d1259 (patch)
treec08c9c0d19b1ce3a404c66f29a4a0a2a02fbefeb /sys
parenta358b1f631f4f2d790b8e98b419e92c9090ad6dd (diff)
downloadFreeBSD-src-e2de919bb508d643b919555e8928a3ce4e6d1259.zip
FreeBSD-src-e2de919bb508d643b919555e8928a3ce4e6d1259.tar.gz
Define HAVE_KERNEL_OPTION_HEADERS when building kernel and when building
modules along with kernel. After this change it is possible to embrace opt_*.h includes with ifdef HAVE_KERNEL_OPTION_HEADERS. And thus, avoid editing a lot of Makefiles in modules directory each time we introduce a new opt_xxx.h. Requested by: bde
Diffstat (limited to 'sys')
-rw-r--r--sys/conf/kern.pre.mk2
-rw-r--r--sys/conf/kmod.mk2
2 files changed, 2 insertions, 2 deletions
diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk
index 8a23769..a38c04b 100644
--- a/sys/conf/kern.pre.mk
+++ b/sys/conf/kern.pre.mk
@@ -81,7 +81,7 @@ INCLUDES+= -I$S/dev/twa
.endif
CFLAGS= ${COPTFLAGS} ${CWARNFLAGS} ${DEBUG}
-CFLAGS+= ${INCLUDES} -D_KERNEL -include opt_global.h
+CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h
.if ${CC} != "icc"
CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT}
CFLAGS+= --param inline-unit-growth=100
diff --git a/sys/conf/kmod.mk b/sys/conf/kmod.mk
index 8a24eb2..fb06870 100644
--- a/sys/conf/kmod.mk
+++ b/sys/conf/kmod.mk
@@ -91,7 +91,7 @@ NOSTDINC= -nostdinc
.endif
CFLAGS+= ${NOSTDINC} -I- ${INCLMAGIC} ${_ICFLAGS}
.if defined(KERNBUILDDIR)
-CFLAGS+= -include ${KERNBUILDDIR}/opt_global.h
+CFLAGS+= -DHAVE_KERNEL_OPTION_HEADERS -include ${KERNBUILDDIR}/opt_global.h
.endif
# Add -I paths for system headers. Individual module makefiles don't
OpenPOWER on IntegriCloud