Commit 96663d0b authored by Kai Germaschewski's avatar Kai Germaschewski

kbuild: built-in and modules in one pass

Use "make BUILD_MODULES=1 {,bzImage,zImage,vmlinux,...}" to build
your kernel - and it'll also build the modules as you go.
parent 36a805ed
......@@ -52,7 +52,7 @@ obj-m := $(filter-out %/, $(obj-m))
# add it to $(subdir-m)
both-m := $(filter $(mod-subdirs), $(subdir-y))
SUB_DIRS := $(subdir-y)
SUB_DIRS := $(subdir-y) $(if $(BUILD_MODULES),$(subdir-m))
MOD_SUB_DIRS := $(sort $(subdir-m) $(both-m))
ALL_SUB_DIRS := $(sort $(subdir-y) $(subdir-m) $(subdir-n) $(subdir-))
......@@ -90,7 +90,7 @@ real-objs-m := $(foreach m, $(obj-m), $(if $($(m:.o=-objs)),$($(m:.o=-objs)),$(m
#
# Get things started.
#
first_rule: vmlinux
first_rule: vmlinux $(if $(BUILD_MODULES),$(obj-m))
#
# Common rules
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment