- 论坛徽章:
- 0
|
Makefile文件如下:
ifeq($(KERNELRELEASE),)
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
modules:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
modules_install:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
clean:
rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions .PHONY: modules modules_install clean
else
obj-m :=hello.o
endif
错误提示信息:Makefile:1: ***missing separator. stop.
我的hello.c是这样写的
#include<linux/init.h>
#include<linux/module.h>
#include<linux/config.h>
MODULE_LICENSE("GPL");
static int hello_init(void)
{
printk(KERN_ALERT "hello arm!\n");
`return 0;
}
static viod hello_exit(void)
{
printk("byebye!\n");
}
module_init(hello_init);
module_exit(hello_exit);
linux的版本是2.6.13
问题出在哪?用tab键了。请大家给予指点,不胜感激!!
[ 本帖最后由 yufeng1009 于 2009-7-18 15:04 编辑 ] |
|