From 06219d4134ec44f8342595ca1adbc93f923c883a Mon Sep 17 00:00:00 2001 From: natinusala Date: Sat, 29 Sep 2018 21:47:06 +0200 Subject: [PATCH] libnx port --- .gitignore | 2 +- Makefile | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index ef42ed8..59333e2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,4 @@ *.dll *.dylib /old - +*.a diff --git a/Makefile b/Makefile index 71fc25a..69e721b 100644 --- a/Makefile +++ b/Makefile @@ -215,6 +215,21 @@ else ifneq (,$(filter $(platform), ngc wii wiiu)) ENDIANNESS_DEFINES += -DHW_DOL -mrvl endif +# 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 \ + -O3 \ + -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 -DARM -march=armv8-a -mtune=cortex-a57 -mtp=soft -fomit-frame-pointer -ffast-math + 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