compiling modules in kernel 2.6
I write a simple test file, mymodule.c. Makefile as below
########################
obj-m := mymodule.o
all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
##########################
[root@localhost hello]# make
make -C /lib/modules/2.6.8.1-12mdk/build M=/home/yipiao/programing linux/code/chapter18/hello modules
make[1]: Entering directory `/usr/src/linux-2.6.8.1-12mdk'
make[1]: *** No rule to make target `linux/code/chapter18/hello'. Stop.
make[1]: Leaving directory `/usr/src/linux-2.6.8.1-12mdk'
make: *** [all] Error 2
what is the problem?
|