[问题] Makefile variable in subdir

楼主: godman362 (萧青)   2016-02-16 20:40:40
想请教关于Makefile中把variable传入subdir的方式
关于export的部分我已经看过了,不过似乎没办法适用在我目前的状况
我想实作的是像Kernel,经过config后,产生一个 .config 档
然后整个Kernel source都会根据这个 .config 档的variable进行判别编译
例如 module 资料夹内容如下:
a d main.c Makefile config.mk
a folder: a1.c a2.c a3.c Makefile
Makefile(under a folder)的内容如下:
obj-$(CONFIG_A1) += a1.o
obj-$(CONFIG_A2) += a2.o
obj-$(CONFIG_A3) += a3.o

Links booklink

Contact Us: admin [ a t ] ucptt.com