From 78bb4e0433d2d2e91f5437c53ebbf8ece989392e Mon Sep 17 00:00:00 2001 From: rin Date: Sat, 22 Sep 2018 12:24:01 +0000 Subject: - Determine KERN_AS automatically depending on whether OPT_MODULAR is set or not, in the same way as libcompat. - Specify OPT_MODULAR in the port Makefile instead of KERN_AS. Now, KERN_AS=library is used for kernels without module(7) for all ports. OK christos --- sys/lib/libkern/Makefile.inc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'sys/lib') diff --git a/sys/lib/libkern/Makefile.inc b/sys/lib/libkern/Makefile.inc index 839c1e72328..c487c739419 100644 --- a/sys/lib/libkern/Makefile.inc +++ b/sys/lib/libkern/Makefile.inc @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.45 2018/05/27 01:14:50 christos Exp $ +# $NetBSD: Makefile.inc,v 1.46 2018/09/22 12:24:04 rin Exp $ # # Configuration variables (default values are below): # @@ -7,7 +7,8 @@ # objects are to be built. Defaults to ${.OBJDIR}/lib/kern. # KERN_AS may be set to 'obj' to build a object from the library's # object files. (Otherwise, a library will be built.) -# Defaults to 'library'. +# Defaults to 'obj' if OPT_MODULAR is set. Otherwise, +# 'library' is used as a default value. # KERNMISCCPPFLAGS # Miscellaneous cpp flags to be passed to the library's Makefile # when building. @@ -18,7 +19,11 @@ # Default values: KERNDST?= ${.OBJDIR}/lib/kern +.if !empty(OPT_MODULAR) +KERN_AS?= obj +.else KERN_AS?= library +.endif KERNDOTDIR?= ../../. KERNDIR= ${S:S@^.@${KERNDOTDIR}@:q}/lib/libkern -- cgit