编写makefile以后 make不通过
时间:2010-09-19
来源:互联网
我的makefile是这么写的:
内核的源码在/home/juer/src/linux-2.6.25.16里面
PWD=$(shell pwd)
KERNEL_SRC=/home/juer/src/linux-2.6.25.16
obj-m :=ip46natForTest.o
module-objs :=ip46natForTest.o
all:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
clean:
rm *.ko
rm *.o
报错:
root@juer:/home/juer/ip46natForTest# make
make: Warning: File `Makefile' has modification time 5.3e+04 s in the future
make -C /lib/modules/2.6.25.16juer/build M=/home/juer/ip46natForTest modules
make[1]: Entering directory `/home/juer/src/linux-2.6.25.16'
make[2]: Warning: File `/home/juer/ip46natForTest/Makefile' has modification time 5.3e+04 s in the future
make[2]: *** No rule to make target `/home/juer/ip46natForTest/ip46natForTest.c', needed by `/home/juer/ip46natForTest/ip46natForTest.o'. Stop.
make[1]: *** [_module_/home/juer/ip46natForTest] Error 2
make[1]: Leaving directory `/home/juer/src/linux-2.6.25.16'
make: *** [default] Error 2
希望高手来指点下
内核的源码在/home/juer/src/linux-2.6.25.16里面
PWD=$(shell pwd)
KERNEL_SRC=/home/juer/src/linux-2.6.25.16
obj-m :=ip46natForTest.o
module-objs :=ip46natForTest.o
all:
$(MAKE) -C $(KERNEL_SRC) M=$(PWD) modules
clean:
rm *.ko
rm *.o
报错:
root@juer:/home/juer/ip46natForTest# make
make: Warning: File `Makefile' has modification time 5.3e+04 s in the future
make -C /lib/modules/2.6.25.16juer/build M=/home/juer/ip46natForTest modules
make[1]: Entering directory `/home/juer/src/linux-2.6.25.16'
make[2]: Warning: File `/home/juer/ip46natForTest/Makefile' has modification time 5.3e+04 s in the future
make[2]: *** No rule to make target `/home/juer/ip46natForTest/ip46natForTest.c', needed by `/home/juer/ip46natForTest/ip46natForTest.o'. Stop.
make[1]: *** [_module_/home/juer/ip46natForTest] Error 2
make[1]: Leaving directory `/home/juer/src/linux-2.6.25.16'
make: *** [default] Error 2
希望高手来指点下
作者: lantian0811 发布时间: 2010-09-19
obj-m :=ip46natForTest.o
module-objs :=ip46natForTest.o
修改为
obj-m :=ip46natForTest.o
ip46natForTest-objs :=ip46natForTest.o
如果模块的依赖目标文件只有一个... 第二句话完全可以不要...
module-objs :=ip46natForTest.o
修改为
obj-m :=ip46natForTest.o
ip46natForTest-objs :=ip46natForTest.o
如果模块的依赖目标文件只有一个... 第二句话完全可以不要...
作者: PCliangtao 发布时间: 2010-09-19
回复 PCliangtao
谢谢 我试试
谢谢 我试试
作者: lantian0811 发布时间: 2010-09-19
回复 PCliangtao
貌似还是不行
貌似还是不行
作者: lantian0811 发布时间: 2010-09-19
回复 PCliangtao
错误信息::
root@juer:/home/juer/ip46natForTest# make
make: Warning: File `Makefile' has modification time 5.4e+04 s in the future
make -C /home/juer/src/linux-2.6.25.16 M=/home/juer/ip46natForTest modules
make[1]: Entering directory `/home/juer/src/linux-2.6.25.16'
make[2]: Warning: File `/home/juer/ip46natForTest/Makefile' has modification time 5.4e+04 s in the future
make[2]: Circular /home/juer/ip46natForTest/ip46natForTest.o <- /home/juer/ip46natForTest/ip46natForTest.o dependency dropped.
LD [M] /home/juer/ip46natForTest/ip46natForTest.o
ld: no input files
make[2]: *** [/home/juer/ip46natForTest/ip46natForTest.o] Error 1
make[1]: *** [_module_/home/juer/ip46natForTest] Error 2
make[1]: Leaving directory `/home/juer/src/linux-2.6.25.16'
make: *** [all] Error 2
错误信息::
root@juer:/home/juer/ip46natForTest# make
make: Warning: File `Makefile' has modification time 5.4e+04 s in the future
make -C /home/juer/src/linux-2.6.25.16 M=/home/juer/ip46natForTest modules
make[1]: Entering directory `/home/juer/src/linux-2.6.25.16'
make[2]: Warning: File `/home/juer/ip46natForTest/Makefile' has modification time 5.4e+04 s in the future
make[2]: Circular /home/juer/ip46natForTest/ip46natForTest.o <- /home/juer/ip46natForTest/ip46natForTest.o dependency dropped.
LD [M] /home/juer/ip46natForTest/ip46natForTest.o
ld: no input files
make[2]: *** [/home/juer/ip46natForTest/ip46natForTest.o] Error 1
make[1]: *** [_module_/home/juer/ip46natForTest] Error 2
make[1]: Leaving directory `/home/juer/src/linux-2.6.25.16'
make: *** [all] Error 2
作者: lantian0811 发布时间: 2010-09-19
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28