diff --git a/Makefile b/Makefile index 406b3ac96..09e81d6a3 100644 --- a/Makefile +++ b/Makefile @@ -30,7 +30,7 @@ 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) | sed s/globals.asm//g)) \ + $(eval $(obj:.o=)_DEPENDENCIES := $(shell $(PYTHON) $(POKEMONTOOLS)/scan_includes.py $(obj:.o=.asm))) \ )) $(shell $(foreach obj, $(OBJS), \ $(eval ALL_DEPENDENCIES += $($(obj:.o=)_DEPENDENCIES)) \ @@ -44,7 +44,6 @@ crystal: pokecrystal.gbc clean: rm -f $(ROMS) rm -f $(OBJS) - rm -f globals.asm find -iname '*.tx' -exec rm {} + baserom.gbc: ; @@ -56,17 +55,13 @@ baserom.gbc: ; $(eval TEXTQUEUE := $(TEXTQUEUE) $<) @rm -f $@ -globals.asm: $(ALL_DEPENDENCIES:.asm=.tx) $(OBJS:.o=.tx) - @touch $@ - @$(PYTHON) prequeue.py $(TEXTQUEUE) -globals.tx: globals.asm - @cp $< $@ - $(OBJS): $$*.tx $$(patsubst %.asm, %.tx, $$($$*_DEPENDENCIES)) + @$(PYTHON) prequeue.py $(TEXTQUEUE) + @$(eval TEXTQUEUE :=) rgbasm -o $@ $*.tx -pokecrystal.gbc: globals.tx $(CRYSTAL_OBJS) - rgblink -n $*.sym -m $*.map -o $@ $(CRYSTAL_OBJS) +pokecrystal.gbc: $(CRYSTAL_OBJS) + rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -Cjv -i BYTE -k 01 -l 0x33 -m 0x10 -p 0 -r 3 -t PM_CRYSTAL $@ cmp baserom.gbc $@ diff --git a/includes.asm b/includes.asm index cb82f5d1c..456623d9f 100644 --- a/includes.asm +++ b/includes.asm @@ -1,3 +1,2 @@ -INCLUDE "globals.asm" INCLUDE "contents.asm" INCLUDE "constants.asm" diff --git a/preprocessor.py b/preprocessor.py index b9165e60e..ed79259d2 100644 --- a/preprocessor.py +++ b/preprocessor.py @@ -66,7 +66,6 @@ def setup_processor(): def main(): processor = setup_processor() processor.preprocess() - processor.update_globals() # only run against stdin when not included as a module if __name__ == "__main__": diff --git a/prequeue.py b/prequeue.py index a91f1b336..8125f7035 100644 --- a/prequeue.py +++ b/prequeue.py @@ -23,8 +23,6 @@ def preprocess_queue(filenames=sys.argv[1:]): sys.stdout = open(dest, 'w') processor.preprocess() - processor.update_globals() - sys.stdin = stdin sys.stdout = stdout