Chinaunix
标题:
内核模块编程头文件的问题
[打印本页]
作者:
goingstudy
时间:
2014-05-21 11:53
标题:
内核模块编程头文件的问题
在内核模块编程时,头文件的路径问题是怎么确定的,Makefile如下
ifneq ($(KERNELRELEASE),)
obj-m := get_vcpu_info.o
else
KVER := $(shell uname -r)
KDIR := /lib/modules/$(KVER)/build
PWD := $(shell pwd)
all:
$(MAKE) -C $(KDIR) M=$(PWD) modules
clean:
rm -rf *.o *.ko *.mod.c *.mod.o *.symvers *.order *.markers *~ *.ko.unsigned \
.*.ko.cmd .*.ko.unsigned.cmd .*.mod.o.cmd .*.o.cmd
rm -rf .tmp_versions
endif
复制代码
应该不是我们普通编程中的那个路径吧,那是$KDIR那个目录吗?
求大婶指点
作者:
goingstudy
时间:
2014-05-21 11:59
知道了,就是$KDIR下的include目录
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2