summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authoraliaspider2015-09-11 22:02:04 +0100
committeraliaspider2015-09-11 22:02:04 +0100
commitc1d061e20459e863075c66adb21280a8cdbb0031 (patch)
tree69318ca620472c2b17b6f183a0485605acfcd6b0 /Makefile
parenta99c3552a41645942cd5480c6cc4416c2a25392e (diff)
downloadpicogpsp-c1d061e20459e863075c66adb21280a8cdbb0031.tar.gz
picogpsp-c1d061e20459e863075c66adb21280a8cdbb0031.tar.bz2
picogpsp-c1d061e20459e863075c66adb21280a8cdbb0031.zip
(3DS) add dynarec support when started from a .cia install
use libkhax for ninjhax 1.0
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 19 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 1180d28..0f90efd 100644
--- a/Makefile
+++ b/Makefile
@@ -209,7 +209,7 @@ else ifeq ($(platform), ctr)
CFLAGS += -Wall -mword-relocations
CFLAGS += -fomit-frame-pointer -ffast-math
CPU_ARCH := arm
- # dynarec currently requires ninjahax to work
+ # dynarec unavailable on ninjhax 2.0
HAVE_DYNAREC = 1
STATIC_LINKING = 1
@@ -322,6 +322,7 @@ ifeq ($(CPU_ARCH), arm)
DEFINES += -DARM_ARCH
endif
+
WARNINGS_DEFINES =
CODE_DEFINES =
@@ -334,6 +335,23 @@ ifeq ($(FRONTEND_SUPPORTS_RGB565), 1)
endif
+ifeq ($(platform), ctr)
+ifeq ($(HAVE_DYNAREC), 1)
+OBJECTS += 3ds/3ds_utils.o 3ds/libkhax/khaxinit.o
+
+ifeq ($(strip $(CTRULIB)),)
+$(error "Please set CTRULIB in your environment. export CTRULIB=<path to>ctrulib")
+endif
+
+CFLAGS += -I$(CTRULIB)/include
+
+3ds/libkhax/khaxinit.o: 3ds/libkhax/khaxinit.cpp
+ $(CXX) $(INCFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 $(OPTIMIZE) -c -o $@ $<
+
+endif
+endif
+
+
ifeq ($(platform), theos_ios)
COMMON_FLAGS := -DIOS $(COMMON_DEFINES) $(INCFLAGS) -I$(THEOS_INCLUDE_PATH) -Wno-error
$(LIBRARY_NAME)_CFLAGS += $(COMMON_FLAGS) $(CFLAGS)