Get rid of globals.asm

This breaks the build until labels are exported again!
This commit is contained in:
yenatch 2014-02-01 13:55:48 -05:00
parent 65efbe55e7
commit 7f0f21b1fc
4 changed files with 5 additions and 14 deletions

View File

@ -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 $@

View File

@ -1,3 +1,2 @@
INCLUDE "globals.asm"
INCLUDE "contents.asm"
INCLUDE "constants.asm"

View File

@ -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__":

View File

@ -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