summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-07-13 20:42:46 -0700
committeryenatch <yenatch@gmail.com>2014-07-13 20:45:21 -0700
commit4ad367ba98b15a8b03d25963cd7b9a8125d2285f (patch)
tree3e62ebbb26527207bf4181a9a57fcb457b21b59f
parentdbef0efa6c44245907bea443fdee58c937ee54c7 (diff)
Combine poke%.gbc build targets into a generalized one.
Now only one target is needed for all versions. $$* also works instead of %, but in a pattern rule % is probably clearer.
-rw-r--r--Makefile12
1 files changed, 2 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index b61c0502..37a9ea76 100644
--- a/Makefile
+++ b/Makefile
@@ -90,17 +90,9 @@ $(all_obj): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_dep))
# Make a symfile for debugging. rgblink will segfault if a mapfile isn't made too.
link = rgblink -n $*.sym -m $*.map
-pokered.gbc: $(red_obj)
+poke%.gbc: $$(%_obj)
$(link) -o $@ $^
- rgbfix $(red_opt) $@
-
-pokeblue.gbc: $(blue_obj)
- $(link) -o $@ $^
- rgbfix $(blue_opt) $@
-
-pokeyellow.gbc: $(yellow_obj)
- $(link) -o $@ $^
- rgbfix $(yellow_opt) $@
+ rgbfix $($*_opt) $@
clean: