From b95d30529b5bb70a23f9457c099944abd2f0e964 Mon Sep 17 00:00:00 2001 From: Ryan 'Swingflip' Hamlin Date: Tue, 16 Oct 2018 15:41:02 +0100 Subject: [PATCH] Added Classic Armv7 A7 --- libretro/Makefile | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/libretro/Makefile b/libretro/Makefile index 691ff69e..a720b710 100644 --- a/libretro/Makefile +++ b/libretro/Makefile @@ -101,6 +101,42 @@ else ifeq ($(platform), libnx) CXXFLAGS := $(ASFLAGS) $(CFLAGS) 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 + fpic := -fPIC + SHARED := -shared -Wl,--version-script=libretro/link.T -Wl,--no-undefined + 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) + CPPFLAGS += $(CFLAGS) + ASFLAGS += $(CFLAGS) + HAVE_NEON = 1 + ARCH = arm + BUILTIN_GPU = neon + USE_DYNAREC = 1 + 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 +####################################### + # iOS else ifneq (,$(findstring ios,$(platform))) CFLAGS += $(LTO) @@ -581,13 +617,14 @@ ${LIBRARY_NAME}_FILES = $(SOURCES_CXX) $(SOURCES_C) include $(THEOS_MAKE_PATH)/library.mk else all: $(TARGET) - + @echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **" $(TARGET): $(OBJECTS) ifeq ($(STATIC_LINKING), 1) $(AR) rcs $@ $(OBJECTS) else +$(LD) $(fpic) $(SHARED) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) $(LIBS) endif + @echo "** BUILD SUCCESSFUL! GG NO RE **" %.o: %.cpp $(CXX) $(INCFLAGS) $(CPPFLAGS) $(CXXFLAGS) -c $(OBJOUT)$@ $<