Commit 80d462ac authored by Libretro-Admin's avatar Libretro-Admin
Browse files

Add libnx target

parent 82843002
......@@ -88,10 +88,8 @@ else ifeq ($(platform), osx)
OSXVER = `sw_vers -productVersion | cut -d. -f 2`
OSX_LT_MAVERICKS = `(( $(OSXVER) <= 9)) && echo "YES"`
fpic += -mmacosx-version-min=10.1
ifndef ($(NOUNIVERSAL))
CFLAGS += $(ARCHFLAGS)
LDFLAGS += $(ARCHFLAGS)
endif
CFLAGS += $(ARCHFLAGS)
LDFLAGS += $(ARCHFLAGS)
# iOS
else ifneq (,$(findstring ios,$(platform)))
......@@ -221,6 +219,20 @@ else ifeq ($(platform), wii)
PLATFORM_DEFINES += -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
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 -O3 \
-fPIE -I$(LIBNX)/include/ -ffunction-sections -fdata-sections -ftls-model=local-exec -Wl,--allow-multiple-definition -specs=$(LIBNX)/switch.specs
CFLAGS += $(INCDIRS)
CFLAGS += -D__SWITCH__ -DHAVE_LIBNX -march=armv8-a -mtune=cortex-a57 -mtp=soft
CXXFLAGS := $(ASFLAGS) $(CFLAGS) -fno-rtti -std=gnu++11
CFLAGS += -std=gnu11
STATIC_LINKING = 1
# Nintendo WiiU
else ifeq ($(platform), wiiu)
EXT=a
......@@ -413,13 +425,6 @@ CFLAGS += $(INCFLAGS)
LFLAGS :=
LDFLAGS += $(LIBM)
ifeq ($(platform), osx)
ifndef ($(NOUNIVERSAL))
CFLAGS += $(ARCHFLAGS)
LFLAGS += $(ARCHFLAGS)
endif
endif
with_fpic=
ifneq ($(fpic),)
with_fpic := --with-pic=yes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment