~ 1 min read
Compiling single kernel module
We sometimes find ourselves in the need to compile just one module, and not the entire set of modules under the tree.
The Makefile that is present in the dir of the module you wish to compile should read obj-m := module.o
Run make -C /usr/src/linux-headers-2.6.XX-YY-ZZZ/ SUBDIRS=$PWD modules
Compiliation should be successful and you should see the binary objects in the current dir now.
Reference: http://lwn.net/Articles/21835/