From e4eebad5de67e4254a94c17cc10fb7253f0b0e33 Mon Sep 17 00:00:00 2001 From: natinusala Date: Sat, 29 Sep 2018 21:06:22 +0200 Subject: [PATCH] libnx port --- Makefile.libretro | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Makefile.libretro b/Makefile.libretro index 812201a..674ffb6 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -239,6 +239,21 @@ else ifeq ($(platform), switch) include $(LIBTRANSISTOR_HOME)/libtransistor.mk STATIC_LINKING=1 +# Nintendo Switch (libnx) +else ifeq ($(platform), libnx) + include $(DEVKITPRO)/libnx/switch_rules + EXT=a + TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT) + DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL + CFLAGS := $(DEFINES) -g \ + -O2 \ + -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs + CFLAGS += $(INCDIRS) + CFLAGS += $(INCLUDE) -D__SWITCH__ -DHAVE_LIBNX + CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 + CFLAGS += -std=gnu11 + STATIC_LINKING = 1 + # emscripten else ifeq ($(platform), emscripten) TARGET := $(TARGET_NAME)_libretro_$(platform).bc