diff options
author | yenatch <yenatch@gmail.com> | 2018-01-23 00:36:44 -0500 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2018-01-23 00:36:44 -0500 |
commit | 51b9b47e2d0299c5fcca8f08ea059208e82a5fe2 (patch) | |
tree | 8f255fd9499111c168068537efe4210eaa1eeb6d | |
parent | a37cc479cd6133c14debde87cb6a624893a68fb2 (diff) |
fix unhelpful errors when missing prerequisites in implcit rules
-rw-r--r-- | Makefile | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -33,12 +33,16 @@ compare: pokegold.gbc pokesilver.gbc %.asm: ; -%_gold.o: dep = $(shell $(includes) $(@D)/$*.asm) -%_gold.o: %.asm $$(dep) +define DEP +$1: $$(shell $$(includes) $2) +endef +$(foreach obj, $(gold_obj), $(eval $(call DEP,$(obj),$(obj:_gold.o=.asm)))) +$(foreach obj, $(silver_obj), $(eval $(call DEP,$(obj),$(obj:_silver.o=.asm)))) + +$(gold_obj): %_gold.o: %.asm $$(dep) rgbasm -D GOLD -o $@ $< -%_silver.o: dep = $(shell $(includes) $(@D)/$*.asm) -%_silver.o: %.asm $$(dep) +$(silver_obj): %_silver.o: %.asm $$(dep) rgbasm -D SILVER -o $@ $< pokegold.gbc: $(gold_obj) |