libnx port

This commit is contained in:
natinusala 2018-09-29 21:47:06 +02:00
parent b4dc85b0ad
commit 06219d4134
2 changed files with 16 additions and 1 deletions

2
.gitignore vendored
View File

@ -3,4 +3,4 @@
*.dll
*.dylib
/old
*.a

View File

@ -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