From 7e554bd24c918b139112bfea387d707c3d12dc87 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Sat, 10 Feb 2024 10:32:08 +0100 Subject: [PATCH] Add libnx build target (without dynarec) --- Makefile | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 7e19f397..8b1c3a63 100644 --- a/Makefile +++ b/Makefile @@ -197,12 +197,16 @@ else ifeq ($(platform), psl1ght) CFLAGS += -DMSB_FIRST -D__ppc__ STATIC_LINKING = 1 -# Nintendo Switch (libtransistor) -else ifeq ($(platform), switch) - EXT=a - TARGET := $(TARGET_NAME)_libretro_$(platform).$(EXT) - include $(LIBTRANSISTOR_HOME)/libtransistor.mk - STATIC_LINKING=1 +# Nintendo Switch (libnx) +else ifeq ($(platform), libnx) + include $(DEVKITPRO)/libnx/switch_rules + TARGET := $(TARGET_NAME)_libretro_$(platform).a + CFLAGS += -O3 -fomit-frame-pointer -ffast-math -I$(DEVKITPRO)/libnx/include/ + CFLAGS += -specs=$(DEVKITPRO)/libnx/switch.specs + CFLAGS += -D__SWITCH__ -DHAVE_LIBNX + CFLAGS += -DARM -D__aarch64__=1 -march=armv8-a -mtune=cortex-a57 -mtp=soft -ffast-math + STATIC_LINKING=1 + STATIC_LINKING_LINK = 1 # Nintendo Game Cube / Wii / WiiU else ifneq (,$(filter $(platform), ngc wii wiiu))