summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 13 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 02f00c22e..67616449d 100644
--- a/Makefile
+++ b/Makefile
@@ -26,11 +26,15 @@ SCANINC := tools/scaninc/scaninc$(EXE)
RAMSCRGEN := tools/ramscrgen/ramscrgen$(EXE)
GBAFIX := tools/gbafix/gbafix$(EXE)
MAPJSON := tools/mapjson/mapjson$(EXE)
+JSONPROC := tools/jsonproc/jsonproc$(EXE)
ASFLAGS := -mcpu=arm7tdmi -I include --defsym $(GAME_VERSION)=1 --defsym REVISION=$(GAME_REVISION) --defsym $(GAME_LANGUAGE)=1 --defsym DEBUG=$(DEBUG)
CC1FLAGS := -mthumb-interwork -Wimplicit -Wparentheses -Wunused -Werror -O2 -fhex-asm
CPPFLAGS := -I tools/agbcc/include -iquote include -nostdinc -undef -Werror -Wno-trigraphs -D $(GAME_VERSION) -D REVISION=$(GAME_REVISION) -D $(GAME_LANGUAGE) -D DEBUG=$(DEBUG)
-
+ifneq (,$(NONMATCHING))
+CPPFLAGS += -DNONMATCHING
+ASFLAGS += --defsym NONMATCHING=1
+endif
#### Files ####
@@ -46,7 +50,8 @@ C_OBJECTS := $(addprefix $(BUILD_DIR)/, $(C_SOURCES:%.c=%.o))
ASM_OBJECTS := $(addprefix $(BUILD_DIR)/, $(ASM_SOURCES:%.s=%.o))
ALL_OBJECTS := $(C_OBJECTS) $(ASM_OBJECTS)
-SUBDIRS := $(sort $(dir $(ALL_OBJECTS)))
+SUBDIRS := $(sort $(dir $(ALL_OBJECTS)))
+DATA_SRC_SUBDIR = src/data
LIBC := tools/agbcc/lib/libc.a
LIBGCC := tools/agbcc/lib/libgcc.a
@@ -102,6 +107,8 @@ MAKEFLAGS += --no-print-directory
# Create build subdirectories
$(shell mkdir -p $(SUBDIRS))
+AUTO_GEN_TARGETS :=
+
all: $(ROM)
ifeq ($(COMPARE),1)
@$(SHA1SUM) $(BUILD_NAME).sha1
@@ -114,6 +121,7 @@ clean: tidy
rm -f data/layouts/layouts.inc data/layouts/layouts_table.inc
rm -f data/maps/connections.inc data/maps/events.inc data/maps/groups.inc data/maps/headers.inc
find data/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} +
+ rm -f $(AUTO_GEN_TARGETS)
$(MAKE) clean -C tools/gbagfx
$(MAKE) clean -C tools/scaninc
$(MAKE) clean -C tools/preproc
@@ -123,6 +131,7 @@ clean: tidy
$(MAKE) clean -C tools/ramscrgen
$(MAKE) clean -C tools/gbafix
$(MAKE) clean -C tools/mapjson
+ $(MAKE) clean -C tools/jsonproc
tools:
@$(MAKE) -C tools/gbagfx
@@ -135,6 +144,7 @@ tools:
@$(MAKE) -C tools/mid2agb
@$(MAKE) -C tools/gbafix
@$(MAKE) -C tools/mapjson
+ @$(MAKE) -C tools/jsonproc
tidy:
$(RM) $(ALL_BUILDS:%=poke%{.gba,.elf,.map})
@@ -188,6 +198,7 @@ include misc.mk
include spritesheet_rules.mk
include override.mk
include map_data_rules.mk
+include json_data_rules.mk
%.1bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS)
%.4bpp: %.png ; $(GBAGFX) $< $@ $(GFX_OPTS)