读书人

led驱动make后出现“ No rule to make

发布时间: 2012-08-28 12:37:01 作者: rapoo

led驱动make后出现“ No rule to make target”
被这个错误折磨了很久具体错误信息如下:
make -C /linux-2.6.22.6 M='pwd' modules
make[1]: Entering directory `/linux-2.6.22.6'
scripts/Makefile.build:17: /linux-2.6.22.6/pwd/Makefile: No such file or directory
make[2]: *** No rule to make target `/linux-2.6.22.6/pwd/Makefile'. Stop.
make[1]: *** [_module_pwd] Error 2
make[1]: Leaving directory `/linux-2.6.22.6'
make: *** [all] Error 2
makefile内容如下:

C/C++ code
KVERS = /linux-2.6.22.6#PWD = $(shell pwd)all:        make -C $(KVERS) M='pwd' modulesclean:        make -C $(KVERS) M='pwd' modules clean        rm -rf modules.orderobj-m   += frist_drv.o

虚拟机系统:ubuntu10.10
linux内核目录:

frist_drv存放目录:

希望知道的朋友帮忙解决解决。

[解决办法]
M=$(PWD)
[解决办法]
make -C /linux-2.6.22.6 M='pwd' modules

M='pwd' 当前路径命令的用法有问题吧 用 M=$(pwd) 试试。

读书人网 >驱动开发

热点推荐