Commit da79ded8 authored by Kornilios Kourtis's avatar Kornilios Kourtis Committed by Sam Ravnborg

kbuild: Two simple kbuild patches

foo1.patch:   spelling correction in Makefile
foo2.patch:   replace SUBDIRS with M in Documentation/kbuild/modules.txt

From: Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
parent 8ecf9f0b
...@@ -23,7 +23,7 @@ with changes in the build system the most portable way to compile a ...@@ -23,7 +23,7 @@ with changes in the build system the most portable way to compile a
module outside the kernel is to use the kernel build system, module outside the kernel is to use the kernel build system,
kbuild. Use the following command-line: kbuild. Use the following command-line:
make -C path/to/kernel/src SUBDIRS=$PWD modules make -C path/to/kernel/src M=$PWD modules
This requires that a makefile exits made in accordance to This requires that a makefile exits made in accordance to
Documentation/kbuild/makefiles.txt. Read that file for more details on Documentation/kbuild/makefiles.txt. Read that file for more details on
...@@ -65,4 +65,4 @@ yourmodule-objs := file1.o file2.o file3.o ...@@ -65,4 +65,4 @@ yourmodule-objs := file1.o file2.o file3.o
# Invokes the kernel build system to come back to the current # Invokes the kernel build system to come back to the current
# directory and build yourmodule.ko. # directory and build yourmodule.ko.
default: default:
make -C ${KERNEL_SOURCE} SUBDIRS=`pwd` modules make -C ${KERNEL_SOURCE} M=`pwd` modules
...@@ -53,7 +53,7 @@ ifndef KBUILD_CHECKSRC ...@@ -53,7 +53,7 @@ ifndef KBUILD_CHECKSRC
KBUILD_CHECKSRC = 0 KBUILD_CHECKSRC = 0
endif endif
# Use make M=dir to specify direcotry of external module to build # Use make M=dir to specify directory of external module to build
# Old syntax make ... SUBDIRS=$PWD is still supported # Old syntax make ... SUBDIRS=$PWD is still supported
# Setting the environment variable KBUILD_EXTMOD take precedence # Setting the environment variable KBUILD_EXTMOD take precedence
ifdef SUBDIRS ifdef SUBDIRS
......
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