From d31488e021d4c344362d97cf0dd3900a2d0aa335 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Sep 2019 04:48:21 +0100 Subject: [PATCH] Changes for PSClassic --- backends/platform/libretro/build/Makefile | 34 +++++++++++++++++++++++ rules.mk | 2 ++ 2 files changed, 36 insertions(+) diff --git a/backends/platform/libretro/build/Makefile b/backends/platform/libretro/build/Makefile index c49a0cf94212..4c8d58905722 100644 --- a/backends/platform/libretro/build/Makefile +++ b/backends/platform/libretro/build/Makefile @@ -35,6 +35,10 @@ else ifneq ($(findstring Darwin,$(shell uname -a)),) ifeq ($(shell uname -p),powerpc) arch = ppc endif +else ifneq (,$(findstring armv,$(platform))) + ifeq (,$(findstring classic_,$(platform))) + override platform += unix + endif else ifneq ($(findstring win,$(shell uname -a)),) platform = win endif @@ -182,6 +186,34 @@ else ifeq ($(platform), vita) DEFINES += -DVITA STATIC_LINKING = 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 + DEFINES := -fPIC -marm -mcpu=cortex-a7 -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard + LDFLAGS += -shared -Wl,--version-script=../link.T -fPIC -Wl,--no-undefined -mcpu=cortex-a7 -mtune=cortex-a7 -static-libgcc -static-libstdc++ + USE_VORBIS = 0 + USE_THEORADEC = 0 + USE_TREMOR = 1 + HAVE_MT32EMU = 0 + HAVE_NEON = 1 + +# (armv8 a35, hard point, neon based) ### +# Playstation Classic +else ifeq ($(platform), classic_armv8_a35) + TARGET := $(TARGET_NAME)_libretro.so + DEFINES := -fPIC -marm -mcpu=cortex-a35 -mtune=cortex-a35 -mfpu=neon-fp-armv8 -mfloat-abi=hard + LDFLAGS += -shared -Wl,--version-script=../link.T -fPIC -Wl,--no-undefined -mcpu=cortex-a35 -mtune=cortex-a35 -static-libgcc -static-libstdc++ + USE_VORBIS = 0 + USE_THEORADEC = 0 + USE_TREMOR = 1 + HAVE_MT32EMU = 0 + HAVE_NEON = 1 + +####################################### else ifeq ($(platform), android-armv7) TARGET := $(TARGET_NAME)_libretro_android.so DEFINES += -fPIC -Wno-multichar -D_ARM_ASSEM_ @@ -453,6 +485,8 @@ libdeps.a: $(OBJS_DEPS) ifeq ($(platform), libnx) @echo Linking $@... $(HIDE)$(AR) -rc $@ $^ +else ifeq ($(platform), classic_armv8_a35) + $(HIDE)$(AR) -rc $@ $^ else @echo Linking $@... $(HIDE)$(AR) $@ $^ diff --git a/rules.mk b/rules.mk index 5ab67cdefd36..9fe4aa304694 100644 --- a/rules.mk +++ b/rules.mk @@ -76,6 +76,8 @@ $(MODULE_LIB-$(MODULE)): $(MODULE_OBJS-$(MODULE)) $(QUIET)-$(RM) $@ ifeq ($(platform), libnx) $(QUIET_AR)$(AR) -rc $@ $+ +else ifeq ($(platform), classic_armv8_a35) + $(QUIET_AR)$(AR) -rc $@ $+ else $(QUIET_AR)$(AR) $@ $+ endif