社区
Linux_Kernel
帖子详情
怎么编写linux2.6.x下内核模块的Makefile
wwwspirit
2006-02-13 05:34:32
初学linux内核编程,这个我一直搞不定Makefile的编写。
最好能说明如下情况时Makefile的编写:
编写三个模块mod1、mod2、mod3(对应的文件分别为mod1.c、mod1.h;mod2.c、mod2.h;mod3.c、mod3.h),其中mod2要依赖到mod1.c中定义的某个变量。
哪位大虾能写个示范,并给出简单的分析,本人感激不尽!
...全文
298
4
打赏
收藏
怎么编写linux2.6.x下内核模块的Makefile
初学linux内核编程,这个我一直搞不定Makefile的编写。 最好能说明如下情况时Makefile的编写: 编写三个模块mod1、mod2、mod3(对应的文件分别为mod1.c、mod1.h;mod2.c、mod2.h;mod3.c、mod3.h),其中mod2要依赖到mod1.c中定义的某个变量。 哪位大虾能写个示范,并给出简单的分析,本人感激不尽!
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
4 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
gprsgsn
2006-02-24
打赏
举报
回复
http://dev.csdn.net/user/haoel
你去看看这位大虾写的《跟我写makefile》通俗易懂,边看边写,很快你就明白了,不难的。
wwwspirit
2006-02-21
打赏
举报
回复
下面是一个标准的Makefile文件,可是我看不懂,谁能帮我详细解释一下呢?
# If KERNELRELEASE is defined, we've been invoked from the
# kernel build system and can use its language.
ifneq ($(KERNELRELEASE),)
obj-m := hello.o
# Otherwise we were called directly from the command
# line; invoke the kernel build system.
else
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
default:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
wwwspirit
2006-02-21
打赏
举报
回复
没有高手肯帮忙吗?
float_sky
2006-02-15
打赏
举报
回复
请问你是否知道当只有一个模块时该怎么写?
LINUX
2.6
内核
makefile
详解
本文档主要讲解
linux
2.6
内核的
makefile
的写法,适合初学者、需要写内核
makefile
(驱动的
makefile
)看。
Linux
2.6
内核模块
编程范例
Linux
2.6
内核模块
编程范例,内含helloworld程序及标准的
makefile
范本
Linux
2.6
内核模块
编译
Makefile
[归类].pdf
Linux
2.6
内核模块
编译
Makefile
[归类].pdf
基于
Linux
-
2.6
内核模块
程序设计.pdf
基于
Linux
-
2.6
内核模块
程序设计.pdf
linux
2.6
内核编译过程
这是一个关于
linux
-
2.6
内核编译过程的文档文件 里边有几种方法 内容很全 大家可以借鉴
Linux_Kernel
4,468
社区成员
17,459
社区内容
发帖
与我相关
我的任务
Linux_Kernel
Linux/Unix社区 内核源代码研究区
复制链接
扫一扫
分享
社区描述
Linux/Unix社区 内核源代码研究区
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章