新手上路
- 积分
- 28
- 金钱
- 28
- 注册时间
- 2018-3-22
- 在线时间
- 5 小时
|
4金钱
顶层makefile中有如下模式匹配的代码:%.s: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.i: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.o: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.lst: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.s: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.o: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.symtypes: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
# 关于 libs-y 变量
libs-y += drivers/serial/
libs-y += drivers/usb/dwc3/
libs-y += drivers/usb/emul/
libs-y += drivers/usb/eth/
....
libs-y := $(patsubst %/, %/built-in.o, $(libs-y))
...
u-boot-main := $(libs-y)
所有目录被替换成了**/built-in.o,并且赋值给了u-boot-main,...u-boot-main是目标all的一个依赖。
%.o: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
@echo ************** $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) *****************
把工程清理,重新编译,
为什么没有看到 @echo ************** $(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@) ***************** 执行 ??
|
|