Do not try to build any module-related artifacts when CONFIG_MODULES
is disabled.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
endif
+ifndef CONFIG_MODULES
+KBUILD_MODULES :=
+endif
+
# Handle descending into subdirectories listed in $(build-dirs)
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
builtin-target := $(obj)/built-in.a
endif
-ifeq ($(CONFIG_MODULES)$(need-modorder),y1)
+ifdef need-modorder
modorder-target := $(obj)/modules.order
endif