summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPikalaxALT <pikalaxalt@gmail.com>2017-12-23 12:57:46 -0500
committerPikalaxALT <pikalaxalt@gmail.com>2017-12-23 12:57:46 -0500
commitfdd7e7cb848747a1e0ace8a63d29aaa22dfd1140 (patch)
tree6ddaed4de52bfcc517d573a8f30c5bd0a1650782 /Makefile
parentbb8f652504f886af296ffcaac57bf76cdc893c97 (diff)
parent1c1ce902515ccb3ccecde29611711c9b1a3ce955 (diff)
Merge branch 'master' into cable_car
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 5 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index f471a1626..e7e2a7156 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ CC1 := tools/agbcc/bin/agbcc
override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm
CPP := $(DEVKITARM)/bin/arm-none-eabi-cpp
-CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror
+CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror -Wno-trigraphs
LD := $(DEVKITARM)/bin/arm-none-eabi-ld
@@ -40,9 +40,9 @@ VERSIONS := ruby sapphire ruby_rev1 sapphire_rev1 ruby_rev2 sapphire_rev2 ruby_d
$(VERSIONS) $(VERSIONS:%=compare_%)
-$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle,/field,/debug,/scene,/pokemon,/engine,/libs}}))
+$(shell mkdir -p build/ $(VERSIONS:%=build/%/{,asm,data,src{,/battle{,/anim},/field,/debug,/scene,/pokemon,/engine,/libs}}))
-C_SRCS := $(wildcard src/*/*.c) $(wildcard src/*.c)
+C_SRCS := $(shell find src -iname "*.c")
ASM_SRCS := $(wildcard asm/*.s)
DATA_ASM_SRCS := $(wildcard data/*.s)
@@ -143,7 +143,7 @@ $$($1_DATA_ASM_OBJS): VERSION := $2
$$($1_DATA_ASM_OBJS): REVISION := $3
$$($1_DATA_ASM_OBJS): LANGUAGE := $4
build/$1/data/%.o: data/%.s $$$$(asm_dep)
- $$(PREPROC) $$< charmap.txt | $$(AS) $$(ASFLAGS) --defsym $$(VERSION)=1 --defsym REVISION=$$(REVISION) --defsym $$(LANGUAGE)=1 -o $$@
+ $$(PREPROC) $$< charmap.txt | $$(CPP) -I include | $$(AS) $$(ASFLAGS) --defsym $$(VERSION)=1 --defsym REVISION=$$(REVISION) --defsym $$(LANGUAGE)=1 -o $$@
build/$1/sym_bss.ld: LANGUAGE := $4
build/$1/sym_bss.ld: sym_bss.txt
@@ -161,7 +161,7 @@ build/$1/ld_script.ld: ld_script.txt build/$1/sym_bss.ld build/$1/sym_common.ld
cd build/$1 && sed -f ../../ld_script.sed ../../ld_script.txt | sed "s#tools/#../../tools/#g" | sed "s#sound/#../../sound/#g" >ld_script.ld
poke$1.elf: build/$1/ld_script.ld $$($1_OBJS)
- cd build/$1 && $$(LD) -T ld_script.ld -T ../../shared_syms.txt -Map ../../poke$1.map -o ../../$$@ $$($1_OBJS_REL) ../../$$(LIBGCC)
+ cd build/$1 && $$(LD) -T ld_script.ld -Map ../../poke$1.map -o ../../$$@ $$($1_OBJS_REL) ../../$$(LIBGCC)
poke$1.gba: %.gba: %.elf
$$(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $$< $$@