suppose you have a module simple.c, to compile create a makefile
with the contents as
obj-m := simple.o
Then type at shell as make -C pathtokernelsource(2.6) SUBDIRS=$PWD modules
then insmod simple.ko
More info can be found in the kbuild.txt file in Documentation directory
of the kernel.
***********************************
S.THAYUMANAVAR,
Engineer-SC
SST1 Operation And Control
INSTITUTE FOR PLASMA RESEARCH,
GANDHINAGAR,INDIA.
Mobile No: 09426394817.
http://www.plasma.ernet.in/~vsst
***********************************