summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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)