From faeb1d2e184a5bd4c9cdd023baaf09298eb57b68 Mon Sep 17 00:00:00 2001 From: slash0042 <57612744+slash0042@users.noreply.github.com> Date: Fri, 9 Oct 2020 23:21:20 +0000 Subject: [PATCH] Add libnx port --- libretro/Makefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libretro/Makefile b/libretro/Makefile index b327628..00b28cd 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -97,6 +97,15 @@ else ifeq ($(platform), switch) include $(LIBTRANSISTOR_HOME)/libtransistor.mk CFLAGS += -Wl,-q -O3 -fno-short-enums -fno-optimize-sibling-calls STATIC_LINKING=1 +# Nintendo Switch (libnx) +else ifeq ($(platform), libnx) + include $(DEVKITPRO)/libnx/switch_rules + TARGET := $(TARGET_NAME)_libretro_$(platform).a + DEFINES += -DSWITCH=1 -D__SWITCH__ -DARM + CFLAGS += $(DEFINES) -fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec + CFLAGS += -march=armv8-a -mtune=cortex-a57 -mtp=soft -mcpu=cortex-a57+crc+fp+simd -ffast-math + CXXFLAGS := $(ASFLAGS) $(CFLAGS) + STATIC_LINKING = 1 # Nintendo WiiU else ifeq ($(platform), wiiu) TARGET := $(TARGET_NAME)_libretro_$(platform).a