diff --git a/src/libretro/Makefile b/src/libretro/Makefile index fa3d2f2f..56e58808 100644 --- a/src/libretro/Makefile +++ b/src/libretro/Makefile @@ -118,6 +118,39 @@ else ifeq ($(platform), vita) USE_MOTION_SENSOR=1 HAVE_NEON=1 +# Classic Platforms #################### +# Platform affix = classic__<µARCH> +# Help at https://modmyclassic.com/comp + +# (armv7 a7, hard point, neon based) ### +# NESC, SNESC, C64 mini +else ifeq ($(platform), classic_armv7_a7) + TARGET := $(TARGET_NAME)_libretro.so + fpic := -fPIC + SHARED := -shared + TILED_RENDERING = 1 + CFLAGS += -Ofast \ + -flto=4 -fwhole-program -fuse-linker-plugin \ + -fdata-sections -ffunction-sections -Wl,--gc-sections \ + -fno-stack-protector -fno-ident -fomit-frame-pointer \ + -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ + -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \ + -fmerge-all-constants -fno-math-errno \ + -marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard + CXXFLAGS += $(CFLAGS) + HAVE_NEON = 1 + ARCH = arm + ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1) + CFLAGS += -march=armv7-a + else + CFLAGS += -march=armv7ve + # If gcc is 5.0 or later + ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1) + LDFLAGS += -static-libgcc -static-libstdc++ + endif + endif +####################################### + # Windows MSVC 2017 all architectures else ifneq (,$(findstring windows_msvc2017,$(platform))) @@ -233,8 +266,9 @@ VBA_DEFINES += -DFRONTEND_SUPPORTS_RGB565 endif ifneq ($(SANITIZER),) - CFLAGS += -fsanitize=$(SANITIZER) - LDFLAGS += -fsanitize=$(SANITIZER) + CFLAGS += -fsanitize=$(SANITIZER) + CXXFLAGS += -fsanitize=$(SANITIZER) + LDFLAGS += -fsanitize=$(SANITIZER) endif ifeq ($(DEBUG), 1)