-
Notifications
You must be signed in to change notification settings - Fork 13
/
config.mk
52 lines (44 loc) · 1.28 KB
/
config.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
GAME_REMASTER ?= 0
GAME_LANGUAGE ?= NORTH_AMERICA
buildname := pmdsky
shortname := sky
TITLE_NAME := POKEDUN SORA
GAME_CODE := C2S
ifneq ($(GAME_REMASTER),0)
buildname := $(buildname).rev$(GAME_REMASTER)
endif
ifeq ($(GAME_LANGUAGE),NORTH_AMERICA)
buildname := $(buildname).us
GAME_CODE := $(GAME_CODE)E
else ifeq ($(GAME_LANGUAGE),EUROPE)
buildname := $(buildname).eu
GAME_CODE := $(GAME_CODE)P
else ifeq ($(GAME_LANGUAGE),JAPAN)
buildname := $(buildname).jp
GAME_CODE := $(GAME_CODE)J
else
$(error Unsupported game language: $(GAME_LANGUAGE))
endif
BUILD_DIR := build/$(buildname)
NEFNAME := main
GF_DEFINES := -DGAME_REMASTER=$(GAME_REMASTER) -D$(GAME_LANGUAGE)
ifeq ($(NO_GF_ASSERT),)
GF_DEFINES += -DPM_KEEP_ASSERTS
endif
GLB_DEFINES := -DSDK_ARM9 -DSDK_CODE_ARM -DSDK_FINALROM
DEFINES = $(GF_DEFINES) $(GLB_DEFINES)
# Secure CRC
ifeq ($(buildname),pmdsky.us)
SECURE_CRC := 0x96A1
else ifeq ($(buildname),pmdsky.eu)
SECURE_CRC := 0x8EBE
else ifeq ($(buildname),pmdsky.jp)
SECURE_CRC := 0x74E4
endif
ifndef SECURE_CRC
$(error Unsupported ROM: $(GAME_LANGUAGE))
endif
SUPPORTED_ROMS := pmdsky.us pmdsky.eu pmdsky.jp
ifneq ($(filter $(buildname),$(SUPPORTED_ROMS)),$(buildname))
$(error $(buildname) is not supported, choose from: $(SUPPORTED_ROMS))
endif