-
Notifications
You must be signed in to change notification settings - Fork 77
/
Makefile
41 lines (32 loc) · 911 Bytes
/
Makefile
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
.PHONY: default all
default: build
all: eu jp usa demo_jp demo_usa
MAKEFLAGS += --no-print-directory
.PHONY: build eu jp usa demo_jp demo_usa custom
build: GAME_VERSION ?=USA
build: tools
@$(MAKE) -f GBA.mk build GAME_VERSION=$(GAME_VERSION)
eu: GAME_VERSION=EU
jp: GAME_VERSION=JP
usa: GAME_VERSION=USA
demo_jp: GAME_VERSION=DEMO_JP
demo_usa: GAME_VERSION=DEMO_USA
eu jp usa demo_jp demo_usa: tools
@$(MAKE) GAME_VERSION=$(GAME_VERSION)
custom: tools
@$(MAKE) GAME_VERSION=USA CUSTOM=1
.PHONY: extract_assets
extract_assets: tools
@$(MAKE) -f GBA.mk extract_assets
.PHONY: tools
tools: tools/bin
tools/bin:
mkdir -p tools/cmake-build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=tools -S tools -B tools/cmake-build
cmake --build tools/cmake-build -j --target install
.PHONY: clean clean-tools
clean:
@$(MAKE) -f GBA.mk clean
clean-tools:
rm -rf tools/bin
rm -rf tools/cmake-build