diff --git a/Makefile b/Makefile index b014714..3afef56 100644 --- a/Makefile +++ b/Makefile @@ -112,9 +112,21 @@ define build_target fi endef +define add_target_arch + $(1).$(ARCH): $$(OBJECTS) $$(LIBFILES) Application/$(strip $(1)).o.$(ARCH) + $$(call build_target_arch,$$@,$$^) +endef +define add_target + ifeq ($(.DEFAULT_GOAL),artifacts) + .DEFAULT_GOAL := $(1) + endif + $(eval $(call add_target_arch, $(1))) + $(1): + $$(call build_target,$$@) +endef --include Makefile.target +$(foreach target,$(TARGETS),$(eval $(call add_target,$(target)))) ifneq ($(MAKECMDGOALS),clean) -include $(LOCALDEPENDS)