From e66ebaa1f5eddb1295b61fc975ff0a98c07250ba Mon Sep 17 00:00:00 2001 From: garak Date: Thu, 23 May 2019 11:49:58 -0400 Subject: move pokemon graphics to mon-specific directories --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 05ac09c21..a59f032bb 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) all: rom -rom: $(ROM) +rom: tools $(ROM) tools: @$(MAKE) -C tools/gbagfx -- cgit v1.2.3 From b624de76db01db7e8b2e65f054483bfe1ec4b590 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Sun, 16 Jun 2019 16:55:40 -0400 Subject: item_pc: through sub_810DE94 --- Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a59f032bb..a5de0f9da 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,16 @@ MAPJSON := tools/mapjson/mapjson $(shell mkdir -p $(C_BUILDDIR) $(ASM_BUILDDIR) $(DATA_ASM_BUILDDIR) $(SONG_BUILDDIR)) +infoshell = $(foreach line, $(shell $1 | sed "s/ /__SPACE__/g"), $(info $(subst __SPACE__, ,$(line)))) + +# Build tools when building the rom +# Disable dependency scanning for clean/tidy/tools +ifeq (,$(filter-out all compare,$(MAKECMDGOALS))) +$(call infoshell, $(MAKE) tools) +else +NODEP := 1 +endif + C_SRCS := $(wildcard $(C_SUBDIR)/*.c) C_OBJS := $(patsubst $(C_SUBDIR)/%.c,$(C_BUILDDIR)/%.o,$(C_SRCS)) @@ -76,9 +86,11 @@ SONG_OBJS := $(patsubst $(SONG_SUBDIR)/%.s,$(SONG_BUILDDIR)/%.o,$(SONG_SRCS)) OBJS := $(C_OBJS) $(ASM_OBJS) $(DATA_ASM_OBJS) $(SONG_OBJS) OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) +MAKEFLAGS += --no-print-directory + all: rom -rom: tools $(ROM) +rom: $(ROM) tools: @$(MAKE) -C tools/gbagfx -- cgit v1.2.3 From 7eeba327bd6dc235a33f06a7779e3b3c52f04475 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Wed, 19 Jun 2019 18:03:24 -0400 Subject: Dump items and start decomp item_use --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a5de0f9da..5d01ba6b9 100644 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ PREPROC := tools/preproc/preproc RAMSCRGEN := tools/ramscrgen/ramscrgen FIX := tools/gbafix/gbafix MAPJSON := tools/mapjson/mapjson +JSONPROC := tools/jsonproc/jsonproc # Clear the default suffixes .SUFFIXES: @@ -103,6 +104,7 @@ tools: @$(MAKE) -C tools/mid2agb @$(MAKE) -C tools/gbafix @$(MAKE) -C tools/mapjson + @$(MAKE) -C tools/jsonproc # For contributors to make sure a change didn't affect the contents of the ROM. compare: rom @@ -126,6 +128,7 @@ clean: tidy @$(MAKE) clean -C tools/mid2agb @$(MAKE) clean -C tools/gbafix @$(MAKE) clean -C tools/mapjson + @$(MAKE) clean -C tools/jsonproc tidy: rm -f $(ROM) $(ELF) $(MAP) @@ -135,6 +138,7 @@ tidy: include graphics_file_rules.mk include tileset_rules.mk include map_data_rules.mk +include json_data_rules.mk %.s: ; %.png: ; -- cgit v1.2.3 From ba0fe59140dfe76c77e60746396326115a9c460e Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 21 Jun 2019 20:47:44 -0400 Subject: Fix building and update build instructions --- Makefile | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 5d01ba6b9..b8b021287 100644 --- a/Makefile +++ b/Makefile @@ -89,6 +89,8 @@ OBJS_REL := $(patsubst $(OBJ_DIR)/%,%,$(OBJS)) MAKEFLAGS += --no-print-directory +AUTO_GEN_TARGETS := + all: rom rom: $(ROM) @@ -117,6 +119,7 @@ clean: tidy rm -f $(DATA_ASM_SUBDIR)/layouts/layouts.inc $(DATA_ASM_SUBDIR)/layouts/layouts_table.inc rm -f $(DATA_ASM_SUBDIR)/maps/connections.inc $(DATA_ASM_SUBDIR)/maps/events.inc $(DATA_ASM_SUBDIR)/maps/groups.inc $(DATA_ASM_SUBDIR)/maps/headers.inc find $(DATA_ASM_SUBDIR)/maps \( -iname 'connections.inc' -o -iname 'events.inc' -o -iname 'header.inc' \) -exec rm {} + + rm -f $(AUTO_GEN_TARGETS) @$(MAKE) clean -C berry_fix @$(MAKE) clean -C tools/gbagfx @$(MAKE) clean -C tools/scaninc -- cgit v1.2.3 From 231b2aeb83f206396a884c862c669111b9faa078 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Thu, 4 Jul 2019 11:40:05 -0400 Subject: Foundation to support LG, Rev1 in the future --- Makefile | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index b8b021287..eb131ba38 100644 --- a/Makefile +++ b/Makefile @@ -3,15 +3,41 @@ CPP := $(CC) -E LD := tools/binutils/bin/arm-none-eabi-ld OBJCOPY := tools/binutils/bin/arm-none-eabi-objcopy +GAME_VERSION := FIRERED +REVISION := 0 +GAME_LANGUAGE := ENGLISH + +# So long as baserom.gba is required, we error out if the +# user tries to build any ROM other than FireRed. +ifneq ($(GAME_VERSION),FIRERED) +$(error We can only build English Pokemon FireRed v1.0 currently) +else ifneq ($(REVISION),0) +$(error We can only build English Pokemon FireRed v1.0 currently) +else ifneq ($(GAME_LANGUAGE),ENGLISH) +$(error We can only build English Pokemon FireRed v1.0 currently) +endif + +ifeq ($(GAME_VERSION),FIRERED) TITLE := POKEMON FIRE -GAME_CODE := BPRE +GAME_CODE := BPR +BUILD_NAME := firered +else +TITLE := POKEMON LEAF +GAME_CODE := BPL +BUILD_NAME := leafgreen +endif +ifeq ($(GAME_LANGUAGE),ENGLISH) +GAME_CODE := $(GAME_CODE)E +endif +ifneq ($(REVISION),0) +BUILD_NAME := $(BUILD_NAME)_rev$(REVISION) +endif MAKER_CODE := 01 -REVISION := 0 SHELL := /bin/bash -o pipefail -ROM := pokefirered.gba -OBJ_DIR := build/firered +ROM := poke$(BUILD_NAME).gba +OBJ_DIR := build/$(BUILD_NAME) ELF = $(ROM:.gba=.elf) MAP = $(ROM:.gba=.map) @@ -26,12 +52,12 @@ ASM_BUILDDIR = $(OBJ_DIR)/$(ASM_SUBDIR) DATA_ASM_BUILDDIR = $(OBJ_DIR)/$(DATA_ASM_SUBDIR) SONG_BUILDDIR = $(OBJ_DIR)/$(SONG_SUBDIR) -ASFLAGS := -mcpu=arm7tdmi +ASFLAGS := -mcpu=arm7tdmi --defsym $(GAME_VERSION)=1 --defsym REVISION=$(REVISION) --defsym $(GAME_LANGUAGE)=1 CC1 := tools/agbcc/bin/agbcc override CFLAGS += -mthumb-interwork -Wimplicit -Wparentheses -Werror -O2 -fhex-asm -CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef +CPPFLAGS := -I tools/agbcc -I tools/agbcc/include -iquote include -nostdinc -undef -D$(GAME_VERSION) -DREVISION=$(REVISION) -D$(GAME_LANGUAGE) LDFLAGS = -Map ../../$(MAP) -- cgit v1.2.3 From f64421dd8cc397f7d4551f3dc674e80a31d36631 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Fri, 12 Jul 2019 17:11:27 -0400 Subject: Remove hardcoded gap --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index eb131ba38..3f87a910d 100644 --- a/Makefile +++ b/Makefile @@ -244,10 +244,10 @@ $(OBJ_DIR)/ld_script.ld: ld_script.txt $(OBJ_DIR)/sym_bss.ld $(OBJ_DIR)/sym_comm $(ELF): $(OBJ_DIR)/ld_script.ld $(OBJS) cd $(OBJ_DIR) && ../../$(LD) $(LDFLAGS) -T ld_script.ld -o ../../$@ $(LIB) + $(FIX) $@ -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent $(ROM): $(ELF) - $(OBJCOPY) -O binary $< $@ - $(FIX) $@ -p -t"$(TITLE)" -c$(GAME_CODE) -m$(MAKER_CODE) -r$(REVISION) --silent + $(OBJCOPY) -O binary --gap-fill 0xFF --pad-to 0x9000000 $< $@ berry_fix/berry_fix.gba: @$(MAKE) -C berry_fix -- cgit v1.2.3