]> git.hungrycats.org Git - linux/commitdiff
kbuild: built-in and modules in one pass
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 28 May 2002 08:50:58 +0000 (03:50 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 28 May 2002 08:50:58 +0000 (03:50 -0500)
Use "make BUILD_MODULES=1 {,bzImage,zImage,vmlinux,...}" to build
your kernel - and it'll also build the modules as you go.

Rules.make

index 95f2b210fb58c118289096807f8d1c925fabdf27..7c6b52ddb90fda9766c7a62416e0ef960068e6cb 100644 (file)
@@ -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