summaryrefslogtreecommitdiff
path: root/sys/lib
diff options
context:
space:
mode:
authorrin <rin@NetBSD.org>2018-09-22 12:24:01 +0000
committerrin <rin@NetBSD.org>2018-09-22 12:24:01 +0000
commit78bb4e0433d2d2e91f5437c53ebbf8ece989392e (patch)
treeb00efc605ed07fb4fbe9f53ce1f73e803565e235 /sys/lib
parent18a9434357d36a188f19d75feb8fd61094a32c03 (diff)
- 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
Diffstat (limited to 'sys/lib')
-rw-r--r--sys/lib/libkern/Makefile.inc9
1 files changed, 7 insertions, 2 deletions
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