summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorSam Ravnborg <sam@mars.ravnborg.org>2006-01-25 07:13:18 +0100
committerSam Ravnborg <sam@mars.ravnborg.org>2006-02-19 09:51:17 +0100
commit06300b21f4c79fd1578f4b7ca4b314fbab61a383 (patch)
tree9b9506e34286f0333ed747c47ec03fd5559f5b71 /Documentation
parentbd71c2b17468a2531fb4c81ec1d73520845e97e1 (diff)
kbuild: support building individual files for external modules
Support building individual files when dealing with separate modules. So say you have a module named "foo" which consist of two .o files bar.o and fun.o. You can then do: make -C $KERNELSRC M=`pwd` bar.o make -C $KERNELSRC M=`pwd` bar.lst make -C $KERNELSRC M=`pwd` bar.i make -C $KERNELSRC M=`pwd` / <= will build all .o files and link foo.o make -C $KERNELSRC M=`pwd` foo.ko <= will build the module and do the modpost step to create foo.ko The above will also work if the external module is placed in a subdirectory using a hirachy of kbuild files. Thanks to Andreas Gruenbacher <agruen@suse.de> for initial feature request / bug report. Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/kbuild/modules.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 7e77f93634ea..87d858df4e34 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -13,6 +13,7 @@ In this document you will find information about:
--- 2.2 Available targets
--- 2.3 Available options
--- 2.4 Preparing the kernel tree for module build
+ --- 2.5 Building separate files for a module
=== 3. Example commands
=== 4. Creating a kbuild file for an external module
=== 5. Include files
@@ -131,6 +132,16 @@ when building an external module.
Therefore a full kernel build needs to be executed to make
module versioning work.
+--- 2.5 Building separate files for a module
+ It is possible to build single files which is part of a module.
+ This works equal for the kernel, a module and even for external
+ modules.
+ Examples (module foo.ko, consist of bar.o, baz.o):
+ make -C $KDIR M=`pwd` bar.lst
+ make -C $KDIR M=`pwd` bar.o
+ make -C $KDIR M=`pwd` foo.ko
+ make -C $KDIR M=`pwd` /
+
=== 3. Example commands