scutwyz 发表于 2012-09-23 11:07

求u-boot makefile 解析

    我们会执行 make all 在编译的时候

    对应到makefile当中:

    则有两个 "all:" 对应点?

第一点:ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk))



# Include autoconf.mk before config.mk so that the config options are available

# to all top level build files.We need the dummy all: target to prevent the

# dependency target in autoconf.mk.dep from being the default.

all:

sinclude $(obj)include/autoconf.mk.dep

sinclude $(obj)include/autoconf.mk第二点:ALL += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map $(U_BOOT_NAND) $(U_BOOT_ONENAND)



all:                $(ALL)求解释,我们到底执行的是哪个 “all ” 目标?

另外,第一个all 目标好像没有依赖项啊?

EricFisher 发表于 2012-09-24 11:11

缺省执行make命令时,会相当于执行第一个目标. 所以第一个all放在最前面,作为第一个目标.这样,当执行make时,就相当于执行了make all.

当有多个相同的目标出现时,会将它们合并在一起.

flyd1005 发表于 2012-10-15 16:37

Why not test with $(warning xxxxx)?
It's very simple to get out!

页: [1]
查看完整版本: 求u-boot makefile 解析