mirror of
https://github.com/pret/pokediamond.git
synced 2024-11-23 05:59:42 +00:00
Add variable to shift the ROM
This commit is contained in:
parent
dc06934d12
commit
47e39cc081
8
Makefile
8
Makefile
@ -194,10 +194,10 @@ $(BUILD_DIR)/%.o: %.s $$(dep)
|
||||
$(AS) $(ASFLAGS) $< -o $@
|
||||
|
||||
arm9:
|
||||
$(MAKE) -C arm9 COMPARE=$(COMPARE) GAME_LANGUAGE=$(GAME_LANGUAGE) GAME_VERSION=$(GAME_VERSION)
|
||||
$(MAKE) -C arm9 $(MAKE_VARS)
|
||||
|
||||
arm7:
|
||||
$(MAKE) -C arm7 COMPARE=$(COMPARE) GAME_LANGUAGE=$(GAME_LANGUAGE) GAME_VERSION=$(GAME_VERSION)
|
||||
$(MAKE) -C arm7 $(MAKE_VARS)
|
||||
|
||||
include filesystem.mk
|
||||
|
||||
@ -205,7 +205,11 @@ include filesystem.mk
|
||||
# FIXME: Computed secure area CRC in header is incorrect due to first 8 bytes of header not actually being "encryObj"
|
||||
$(ROM): rom.rsf arm9 arm7 filesystem $(BNR) tools/bin/rom_header.template.sbin
|
||||
$(MAKEROM) -DBUILD_DIR="$(BUILD_DIR)" -DBNR="$(BNR)" -DTITLE_NAME="$(TITLE_NAME)" -DNITROFS_FILES="$(NITROFS_FILES)" $< $@
|
||||
ifeq ($(SHIFTED),0)
|
||||
$(FIXROM) $@ --secure-crc $(SECURE_CRC) --game-code $(GAME_CODE)
|
||||
else
|
||||
$(FIXROM) $@ --game-code $(GAME_CODE)
|
||||
endif
|
||||
|
||||
# Make sure build directory exists before compiling anything
|
||||
DUMMY != mkdir -p $(ALL_DIRS)
|
||||
|
@ -202,7 +202,12 @@ $(ROM): $(BUILD_DIR)/$(LD_SCRIPT) $(O_FILES) $(STATIC_LIBS)
|
||||
cd $(BUILD_DIR) && LM_LICENSE_FILE=../../$(LM_LICENSE_FILE) $(WINE) ../../$(MWLDARM) $(LDFLAGS) $(LIBS) -o ../../$(ELF) $(LD_SCRIPT) $(O_FILES:$(BUILD_DIR)/%=%)
|
||||
$(OBJCOPY) $(foreach ov,arm9 $(OVERLAYS),--update-section $(ov)=$(BUILD_DIR)/$(ov).sbin -j $(ov)) $(ELF) 2>/dev/null
|
||||
|
||||
$(BUILD_DIR)/lib/libsyscall.a: $(BUILD_DIR)/lib/syscall/secure.o
|
||||
ifeq ($(SHIFTED),0)
|
||||
SYSCALL_OBJS := $(BUILD_DIR)/lib/syscall/secure.o
|
||||
else
|
||||
SYSCALL_OBJS := $(BUILD_DIR)/lib/syscall/_svc_mw.o
|
||||
endif
|
||||
$(BUILD_DIR)/lib/libsyscall.a: $(SYSCALL_OBJS)
|
||||
$(AR) $(ARFLAGS) -o $@ $^
|
||||
|
||||
# Make sure build directory exists before compiling anything
|
||||
|
@ -1,6 +1,10 @@
|
||||
GAME_VERSION ?= DIAMOND
|
||||
GAME_LANGUAGE ?= ENGLISH
|
||||
COMPARE ?= 1
|
||||
SHIFTED ?= 0
|
||||
ifneq ($(SHIFTED),0)
|
||||
COMPARE := 0
|
||||
endif
|
||||
|
||||
ifeq ($(GAME_VERSION),DIAMOND)
|
||||
GAME_CODE := ADA
|
||||
@ -37,3 +41,5 @@ endif
|
||||
endif
|
||||
|
||||
BUILD_TARGET := poke$(BUILD_NAME)
|
||||
|
||||
MAKE_VARS := SHIFTED=$(SHIFTED) COMPARE=$(COMPARE) GAME_LANGUAGE=$(GAME_LANGUAGE) GAME_VERSION=$(GAME_VERSION)
|
||||
|
Loading…
Reference in New Issue
Block a user