From c2f6e868a4f727f07d9f4bed4b2f83c875d92e9b Mon Sep 17 00:00:00 2001 From: lacastri <43101266+lacastri@users.noreply.github.com> Date: Sun, 7 Oct 2018 19:30:11 -0500 Subject: [PATCH] libnx port Miguel Castiblanco authored --- .gitignore | 3 +++ Makefile.libretro | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/.gitignore b/.gitignore index 8127ff0..745a711 100644 --- a/.gitignore +++ b/.gitignore @@ -13,3 +13,6 @@ sdl/build_sdl sdl/build_sdl2 /libretro/msvc/msvc-2017/msvc-2017.vcxproj.user + +*.o +*.a diff --git a/Makefile.libretro b/Makefile.libretro index bd91682..8ce3a7c 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -240,6 +240,15 @@ else ifeq ($(platform), switch) STATIC_LINKING=1 STATIC_LINKING_LINK=1 +# Nintendo Switch (libnx) +else ifeq ($(platform), libnx) + include $(DEVKITPRO)/libnx/switch_rules + TARGET := $(TARGET_NAME)_libretro_$(platform).a + CFLAGS += -D__SWITCH__ -DHAVE_LIBNX -I$(LIBNX)/include/ -fPIE -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs + PLATFORM_DEFINES += -DARM -march=armv8-a -mtune=cortex-a57 -mtp=soft -DLSB_FIRST -DBYTE_ORDER=LITTLE_ENDIAN -D__LIBRETRO__ -DALIGN_LONG -DALIGN_WORD -DM68K_OVERCLOCK_SHIFT=20 -DHAVE_ZLIB + STATIC_LINKING=1 + STATIC_LINKING_LINK=1 + # emscripten else ifeq ($(platform), emscripten) TARGET := $(TARGET_NAME)_libretro_$(platform).bc