LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1274|回复: 1

2.6模块编译

[复制链接]
发表于 2007-9-20 21:01:25 | 显示全部楼层 |阅读模式
写了一个最经典的模块程序,对应的makefile如下,
#Makefile 2.6
ifneq ($(ERNELRELEASE),)
module-objs:=hello.o
obj-m:=module.o
else
PWD:=$(shell pwd)
KVER?=$(shell uname -r)
KDIR:=/lib/modules/$(KVER)/build
module:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
endif

但是执行make结果如下:
make: Nothing to be done for `module'.

不知为什么,请高手指点.....
发表于 2007-9-27 02:08:41 | 显示全部楼层
写那么麻烦干什么呢?先用简单的命令验证一下再说啊。
  1. obj-m := hello.o
  2. all:
  3.         make -C /usr/src/linux M=`pwd` modules
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表