aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-02-01 08:46:53 -0500
committerU-Fish-PC\Daniel <corrnondacqb@yahoo.com>2014-02-01 08:46:53 -0500
commited4ac6d55156f7dab8e609f4086db270264ce594 (patch)
tree20bf3f15d294c7e95d6f2be94cd913d7d6896cc6 /Makefile
parentFix BookshelfTileIDs format (diff)
parentMakefile: condense dependency scanning into one loop (diff)
downloadpokeyellow-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--Makefile41
1 files changed, 22 insertions, 19 deletions
diff --git a/Makefile b/Makefile
index 0d2d88df..f7cc2092 100644
--- a/Makefile
+++ b/Makefile
@@ -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" $@