内核模块makefile中的SUBDIRS变量 [英] SUBDIRS variable in kernel module makefile
本文介绍了内核模块makefile中的SUBDIRS变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑以下makefile:
Consider the following makefile:
CUR = $(shell uname -r)
DIR = /lib/modules/$(CUR)/build
PWD = $(shell pwd)
obj-m := m1.o m2.o
default:
$(MAKE) -C $(DIR) SUBDIRS=$(PWD) modules
clean:
@rm -f *.o .*.cmd .*.flags *.mod.c *.order
@rm -f .*.*.cmd *~ *.*~ TODO.*
@rm -fR .tmp*
@rm -rf .tmp_versions
disclean: clean
@rm *.ko *.symvers
SUBDIRS
变量在内核模块makefile中是什么意思?
What does SUBDIRS
variable mean in the kernel module makefile?
推荐答案
内核文件在Documentation/kbuild/modules.txt中说,
the kernel document says in Documentation/kbuild/modules.txt,
链接: 与M =相同.保留SUBDIRS =语法是为了向后兼容.
Same as M=. The SUBDIRS= syntax is kept for backwards compatibility. 并从Documentation/kbuild/kbuild.txt and from Documentation/kbuild/kbuild.txt 链接:
这篇关于内核模块makefile中的SUBDIRS变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文