2021-06-21 12:43:46 +00:00
|
|
|
GAME_VERSION ?= HEARTGOLD
|
|
|
|
GAME_REMASTER ?= 0
|
|
|
|
GAME_LANGUAGE ?= ENGLISH
|
|
|
|
|
|
|
|
ifeq ($(GAME_VERSION),HEARTGOLD)
|
|
|
|
buildname := heartgold
|
2021-10-16 15:13:08 +00:00
|
|
|
shortname := gold
|
2021-06-21 12:43:46 +00:00
|
|
|
TITLE_NAME := POKEMON HG
|
|
|
|
GAME_CODE := IPK
|
|
|
|
else
|
|
|
|
ifeq ($(GAME_VERSION),SOULSILVER)
|
2021-10-16 15:13:08 +00:00
|
|
|
buildname := soulsilver
|
|
|
|
shortname := silver
|
2021-06-21 12:43:46 +00:00
|
|
|
TITLE_NAME := POKEMON SS
|
|
|
|
GAME_CODE := IPG
|
|
|
|
else
|
|
|
|
$(error Unrecognized game version: $(GAME_VERSION))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq ($(GAME_REMASTER),0)
|
|
|
|
buildname := $(buildname).rev$(GAME_REMASTER)
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(GAME_LANGUAGE),ENGLISH)
|
|
|
|
buildname := $(buildname).us
|
|
|
|
GAME_CODE := $(GAME_CODE)E
|
|
|
|
else
|
|
|
|
$(error Unsupported game language: $(GAME_LANGUAGE))
|
|
|
|
endif
|
|
|
|
|
|
|
|
BUILD_DIR := build/$(buildname)
|
|
|
|
NEFNAME := main
|
2021-06-21 22:42:03 +00:00
|
|
|
|
2021-11-11 01:19:24 +00:00
|
|
|
GF_DEFINES := -D$(GAME_VERSION) -DGAME_REMASTER=$(GAME_REMASTER) -D$(GAME_LANGUAGE)
|
2021-11-12 01:58:40 +00:00
|
|
|
ifeq ($(NO_GF_ASSERT),)
|
|
|
|
GF_DEFINES += -DPM_KEEP_ASSERTS
|
|
|
|
endif
|
2021-12-23 02:23:44 +00:00
|
|
|
GLB_DEFINES := -DSDK_ARM9 -DSDK_CODE_ARM -DSDK_FINALROM
|
2021-09-19 01:44:58 +00:00
|
|
|
DEFINES = $(GF_DEFINES) $(GLB_DEFINES)
|
2021-06-21 22:42:03 +00:00
|
|
|
|
|
|
|
# Secure CRC
|
|
|
|
ifeq ($(buildname),heartgold.us)
|
|
|
|
SECURE_CRC := 0xA0FF
|
|
|
|
endif
|
|
|
|
ifeq ($(buildname),soulsilver.us)
|
|
|
|
SECURE_CRC := 0x86A5
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifndef SECURE_CRC
|
|
|
|
$(error Unsupported ROM: $(GAME_VERSION) $(GAME_LANGUAGE))
|
|
|
|
endif
|
2021-08-01 20:06:26 +00:00
|
|
|
|
2021-08-03 01:14:08 +00:00
|
|
|
# At present this repository only supports the 1.0 US ROMs
|
|
|
|
SUPPORTED_ROMS := heartgold.us soulsilver.us
|
|
|
|
ifneq ($(filter $(buildname),$(SUPPORTED_ROMS)),$(buildname))
|
2021-08-01 20:06:26 +00:00
|
|
|
$(error $(buildname) is not supported, choose from: $(SUPPORTED_ROMS))
|
|
|
|
endif
|