Clean up variable usage in the makefile.

This commit is contained in:
yenatch 2014-02-01 20:36:44 -05:00
parent cf2acc1001
commit 8e24af1f22

View File

@ -27,14 +27,10 @@ OBJS := $(CRYSTAL_OBJS)
ROMS := pokecrystal.gbc
ALL_DEPENDENCIES :=
# generate a list of dependencies for each object file
$(shell $(foreach obj, $(OBJS), \
$(eval $(obj:.o=)_DEPENDENCIES := $(shell $(PYTHON) $(POKEMONTOOLS)/scan_includes.py $(obj:.o=.asm))) \
))
$(shell $(foreach obj, $(OBJS), \
$(eval ALL_DEPENDENCIES += $($(obj:.o=)_DEPENDENCIES)) \
))
all: $(ROMS)
@ -52,12 +48,12 @@ baserom.gbc: ;
%.asm: ;
.asm.tx:
$(eval TEXTQUEUE := $(TEXTQUEUE) $<)
$(eval TEXTQUEUE += $<)
@rm -f $@
$(OBJS): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_DEPENDENCIES))
@$(PYTHON) prequeue.py $(TEXTQUEUE)
@$(eval TEXTQUEUE :=)
$(eval TEXTQUEUE :=)
rgbasm -o $@ $*.tx
pokecrystal.gbc: $(CRYSTAL_OBJS)