v550 bare-metal 裸机 结构

从makefile解读

TARGETS := emul executiontb cpu

define target_rule
$(1):
$$(MAKE) -f build/compile-$(1).mk ROOT_DIR=$(abspath $(CURDIR))
.PHONY: $(1)
endef

$(foreach target,$(TARGETS),$(eval $(call target_rule,$(target))))

以上就是分别执行

make -f build/compile-emul.mk ROOT_DIR=$(abspath $(CURDIR))

make -f build/compile-executiontb.mk ROOT_DIR=$(abspath $(CURDIR))

make -f build/compile-cpu.mk ROOT_DIR=$(abspath $(CURDIR))

原文地址:https://www.cnblogs.com/idyllcheung/p/12687402.html