summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorYamaArashi <shadow962@live.com>2016-06-28 22:34:22 -0700
committerYamaArashi <shadow962@live.com>2016-06-28 22:34:22 -0700
commit174036ebb4aa9d2e6d8c9569b2a3385e7fa6ce2d (patch)
treef170edff4a113e71af0ba495e7c2ab832f6c5bda /Makefile
parentf68fbc7b5e84671f779ae2d4dc5ee20d32edb0df (diff)
parent8c55493c5a523cab5ce72988ae51b677ed52d6df (diff)
Merge branch 'yenatch-master'
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 6 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index fcfe3229f..0c6767587 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,8 @@ CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp
CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
-pokeruby_LDFLAGS := -T ld_script_ruby.txt -T iwram_syms.txt -T ewram_syms.txt
-pokesapphire_LDFLAGS := -T ld_script_sapphire.txt -T iwram_syms.txt -T ewram_syms.txt
+pokeruby_LDFLAGS := -T ld_script_ruby.txt -T iwram_syms.txt -T ewram_syms.txt -Map pokeruby.map
+pokesapphire_LDFLAGS := -T ld_script_sapphire.txt -T iwram_syms.txt -T ewram_syms.txt -Map pokesapphire.map
OBJCOPY := $(DEVKITARM)/bin/arm-none-eabi-objcopy
@@ -63,11 +63,11 @@ compare: both
@$(SHA1) rom.sha1
clean:
- rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i)
+ rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i) pokeruby.map pokesapphire.map
find . \( -iname '*.1bpp' -o -iname '*.4bpp' -o -iname '*.8bpp' -o -iname '*.gbapal' -o -iname '*.lz' \) -exec rm {} +
tidy:
- rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i)
+ rm -f $(ROM) $(ELF) $(OBJS) $(pokeruby_OBJS) $(pokesapphire_OBJS) $(C_SRCS:%.c=%.i) pokeruby.map pokesapphire.map
include castform.mk
include tilesets.mk
@@ -108,6 +108,7 @@ src/%_sapphire.o: src/%.c
asm/%_ruby.o: dep = $(shell $(SCANINC) asm/$*.s)
asm/%_sapphire.o: dep = $(shell $(SCANINC) asm/$*.s)
+
asm/%_ruby.o: asm/%.s $$(dep)
$(AS) $(ASFLAGS) --defsym RUBY=1 -o $@ $<
asm/%_sapphire.o: asm/%.s $$(dep)
@@ -115,6 +116,7 @@ asm/%_sapphire.o: asm/%.s $$(dep)
data/%_ruby.o: dep = $(shell $(SCANINC) data/$*.s)
data/%_sapphire.o: dep = $(shell $(SCANINC) data/$*.s)
+
data/%_ruby.o: data/%.s $$(dep)
$(PREPROC) $< charmap.txt | $(AS) $(ASFLAGS) --defsym RUBY=1 -o $@
data/%_sapphire.o: data/%.s $$(dep)