diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2005-07-07 20:56:08 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-07 21:23:36 -0400 |
commit | 155ad605b3c9c5874ff068f23c6ea8537190e0a8 (patch) | |
tree | 29de329925f9d7238f7d38c699a794ee39d672dc /Makefile | |
parent | f182ae626189d8a346aae142e7b8b182663dac44 (diff) |
[PATCH] kbuild: build a single module using 'make dir/module.ko'
Using the syntax:
make dir/module.ko
kbuild now allows one to build a module including the final link stage.
This is usefull when one only wants to compile a single module and thus do
not have to wait until a full kernel has finished compiling. Tested by:
randy_dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -792,6 +792,9 @@ export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) | |||
792 | $(Q)$(MAKE) $(build)=$(@D) $@ | 792 | $(Q)$(MAKE) $(build)=$(@D) $@ |
793 | %.o: %.c scripts FORCE | 793 | %.o: %.c scripts FORCE |
794 | $(Q)$(MAKE) $(build)=$(@D) $@ | 794 | $(Q)$(MAKE) $(build)=$(@D) $@ |
795 | %.ko: scripts FORCE | ||
796 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) $(@:.ko=.o) | ||
797 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost | ||
795 | %/: scripts prepare FORCE | 798 | %/: scripts prepare FORCE |
796 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) | 799 | $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) |
797 | %.lst: %.c scripts FORCE | 800 | %.lst: %.c scripts FORCE |
@@ -1033,6 +1036,7 @@ help: | |||
1033 | @echo ' modules_install - Install all modules' | 1036 | @echo ' modules_install - Install all modules' |
1034 | @echo ' dir/ - Build all files in dir and below' | 1037 | @echo ' dir/ - Build all files in dir and below' |
1035 | @echo ' dir/file.[ois] - Build specified target only' | 1038 | @echo ' dir/file.[ois] - Build specified target only' |
1039 | @echo ' dir/file.ko - Build module including final link' | ||
1036 | @echo ' rpm - Build a kernel as an RPM package' | 1040 | @echo ' rpm - Build a kernel as an RPM package' |
1037 | @echo ' tags/TAGS - Generate tags file for editors' | 1041 | @echo ' tags/TAGS - Generate tags file for editors' |
1038 | @echo ' cscope - Generate cscope index' | 1042 | @echo ' cscope - Generate cscope index' |