- 论坛徽章:
- 1
|
我在网上找的一个makefile:
obj-m := hello.o
KERNELDIR := /lib/modules/2.6.39.4/build
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
root@bt:~/nel# make
make -C /lib/modules/2.6.39.4/build M=/root/kernel modules
make[1]: Entering directory `/usr/src/linux-source-2.6.39.4'
scripts/Makefile.build:44: /root/kernel/Makefile: No such file or directory
make[2]: *** No rule to make target `/root/kernel/Makefile'. Stop.
make[1]: *** [_module_/root/kernel] Error 2
make[1]: Leaving directory `/usr/src/linux-source-2.6.39.4'
make: *** [modules] Error 2
我是新手,请高手帮助下! |
|