diff options
| author | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-02-01 08:46:53 -0500 |
|---|---|---|
| committer | U-Fish-PC\Daniel <corrnondacqb@yahoo.com> | 2014-02-01 08:46:53 -0500 |
| commit | ed4ac6d55156f7dab8e609f4086db270264ce594 (patch) | |
| tree | 20bf3f15d294c7e95d6f2be94cd913d7d6896cc6 /Makefile | |
| parent | Fix BookshelfTileIDs format (diff) | |
| parent | Makefile: condense dependency scanning into one loop (diff) | |
| download | pokeyellow-ed4ac6d55156f7dab8e609f4086db270264ce594.tar.gz pokeyellow-ed4ac6d55156f7dab8e609f4086db270264ce594.tar.xz pokeyellow-ed4ac6d55156f7dab8e609f4086db270264ce594.zip | |
Merge branch 'master' of https://github.com/iimarckus/pokered
Conflicts:
main.asm
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 41 |
1 files changed, 22 insertions, 19 deletions
@@ -6,18 +6,26 @@ PYTHON := python TEXTQUEUE := -RED_OBJS := pokered.o -BLUE_OBJS := pokeblue.o +RED_OBJS := \ +pokered.o \ +audio_red.o \ +wram.o \ +text.o + +BLUE_OBJS := \ +pokeblue.o \ +audio_blue.o \ +wram.o \ +text.o OBJS := $(RED_OBJS) $(BLUE_OBJS) +OBJS := $(sort $(OBJS)) ROMS := pokered.gbc pokeblue.gbc # generate dependencies for each object $(shell $(foreach obj, $(OBJS), \ - $(eval $(obj:.o=)_DEPENDENCIES := $(shell $(PYTHON) extras/pokemontools/scan_includes.py $(obj:.o=.asm) | sed s/globals.asm//g)) \ -)) -$(shell $(foreach obj, $(OBJS), \ + $(eval $(obj:.o=)_DEPENDENCIES := $(shell $(PYTHON) extras/pokemontools/scan_includes.py $(obj:.o=.asm))) \ $(eval ALL_DEPENDENCIES += $($(obj:.o=)_DEPENDENCIES)) \ )) @@ -33,33 +41,28 @@ redrle: extras/redtools/redrle.c clean: rm -f $(ROMS) rm -f $(OBJS) - rm -f globals.asm - @echo "removing *.tx" && find . -iname '*.tx' -exec rm {} + + find . -iname '*.tx' -exec rm {} + rm -f redrle baserom.gbc: ; - @echo "Wait! Need baserom.gbc first. Check README and INSTALL for details." && false + @echo "Wait! Need baserom.gbc first. Check README for details." && false %.asm: ; .asm.tx: - $(eval TEXTQUEUE := $(TEXTQUEUE) $<) + $(eval 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 -pokered.gbc: globals.tx $(RED_OBJS) - rgblink -n $*.sym -m $*.map -o $@ $(RED_OBJS) +pokered.gbc: $(RED_OBJS) + rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON RED" $@ -pokeblue.gbc: globals.tx $(BLUE_OBJS) - rgblink -n $*.sym -m $*.map -o $@ $(BLUE_OBJS) +pokeblue.gbc: $(BLUE_OBJS) + rgblink -n $*.sym -m $*.map -o $@ $^ rgbfix -jsv -k 01 -l 0x33 -m 0x13 -p 0 -r 03 -t "POKEMON BLUE" $@ |
