Skip to content

Commit b95b02d

Browse files
Use Makefile args for GBARunner3 paths
Currently we support 3 locations: - /GBARunner3.nds - /_nds/TWiLightMenu/emulators/GBARunner3.nds - /__rpg/APP/GBARunner3.nds
1 parent 3ef63dc commit b95b02d

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ INCLUDES := include
3030
DATA := data
3131
GRAPHICS := gfx
3232

33+
GBARUNNER3_PATH ?= DEFAULT
34+
3335
#---------------------------------------------------------------------------------
3436
# options for code generation
3537
#---------------------------------------------------------------------------------
@@ -41,6 +43,12 @@ CFLAGS := -g -Wall -O2 \
4143
-ffast-math \
4244
$(ARCH)
4345

46+
ifeq ($(GBARUNNER3_PATH),TWLMENU)
47+
CFLAGS += -DWITH_TWLMENU
48+
else ifeq ($(GBARUNNER3_PATH),AOS)
49+
CFLAGS += -DWITH_AOS
50+
endif
51+
4452
CFLAGS += $(INCLUDE) -DARM9
4553
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions
4654

source/args.h

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,15 @@
2727
#include <string>
2828
#include <vector>
2929

30-
#ifndef GBARUNNER3_PATH
30+
#ifdef WITH_AOS
3131
#define GBARUNNER3_PATH "/__rpg/APP/GBARunner3.nds"
3232
#endif
33+
#ifdef WITH_TWLMENU
34+
#define GBARUNNER3_PATH "/_nds/TWiLightMenu/emulators/GBARunner3.nds"
35+
#endif
36+
#ifndef GBARUNNER3_PATH
37+
#define GBARUNNER3_PATH "/GBARunner3.nds"
38+
#endif
3339

3440
/* Convert a file path of any type (e.g. .nds or .argv) into a path to the NDS
3541
* file to be opened. The returned path may be absolute or relative to the

0 commit comments

Comments
 (0)