diff --git a/Libretro/Makefile b/Libretro/Makefile index 1c4a510a..8ffd2d81 100644 --- a/Libretro/Makefile +++ b/Libretro/Makefile @@ -69,22 +69,49 @@ ifeq ($(platform), unix) TARGET := $(TARGET_NAME)_libretro.$(EXT) fpic := -fPIC -pthread SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined + else ifeq ($(platform), linux-portable) TARGET := $(TARGET_NAME)_libretro.$(EXT) fpic := -fPIC -nostdlib SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T LIBM := -else ifeq ($(platform), nintendoc) - # Nintendo Classics (Hakchi) - CC = arm-linux-gnueabihf-gcc-5 - CXX = arm-linux-gnueabihf-g++-5 - EXT ?= so - TARGET := $(TARGET_NAME)_libretro.$(EXT) - fpic := -fPIC -pthread - SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/link.T -Wl,--no-undefined - CXXFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static -static-libgcc -static-libstdc++ - CFLAGS += -marm -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard -static -static-libgcc -static-libstdc++ - LDFLAGS += /usr/lib/gcc-cross/arm-linux-gnueabihf/5/libstdc++.a + +# 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 -pthread + SHARED := -shared -Wl,--version-script=$(LIBRETRO_DIR)/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 +####################################### + else ifneq (,$(findstring osx,$(platform))) TARGET := $(TARGET_NAME)_libretro.dylib fpic := -fPIC @@ -270,6 +297,7 @@ CXXFLAGS += -D LIBRETRO $(fpic) -std=c++14 all: $(TARGET) $(TARGET): $(OBJECTS) + @echo "** BUILDING $(TARGET) FOR PLATFORM $(platform) **" ifeq ($(STATIC_LINKING), 1) ifneq (,$(findstring msvc,$(platform))) $(LD) $(LINKOUT)$@ $(OBJECTS) @@ -279,15 +307,7 @@ endif else $(LD) $(fpic) $(SHARED) $(INCLUDES) $(LINKOUT)$@ $(OBJECTS) $(LDFLAGS) endif - -ifeq ($(platform),nintendoc) - @echo "** BUILDING HAKCHI HMOD PACKAGE **" - mkdir -p hakchi/etc/libretro/core/ hakchi/etc/libretro/info/ hakchi/etc/preinit.d/ - rm -f hakchi/etc/libretro/info/* - cp $(TARGET_NAME)_libretro.so hakchi/etc/libretro/core/ - cd hakchi/etc/libretro/info/; wget https://buildbot.libretro.com/assets/frontend/info/$(TARGET_NAME)_libretro.info - cd hakchi/; tar -czvf "CORE_$(TARGET_NAME).hmod" * -endif + @echo "** BUILD SUCCESSFUL! GG NO RE **" %.o: %.c $(CC) $(CFLAGS) $(fpic) -c $< $(OBJOUT)$@ @@ -296,7 +316,7 @@ endif $(CXX) $(CXXFLAGS) $(fpic) -c $< $(OBJOUT)$@ clean: - rm -f $(OBJECTS) $(TARGET) hakchi/CORE_$(TARGET_NAME).hmod + rm -f $(OBJECTS) $(TARGET) .PHONY: clean diff --git a/Libretro/hakchi/bin/mesen b/Libretro/hakchi/bin/mesen deleted file mode 100644 index 01e8e507..00000000 --- a/Libretro/hakchi/bin/mesen +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -exec retroarch-clover mesen "$@" diff --git a/Libretro/hakchi/install b/Libretro/hakchi/install deleted file mode 100644 index 6e0a0071..00000000 --- a/Libretro/hakchi/install +++ /dev/null @@ -1,4 +0,0 @@ -transfer_default -chmod +x $rootfs/bin/* -chmod +x $rootfs/usr/bin/* -return 1 diff --git a/Libretro/hakchi/readme.md b/Libretro/hakchi/readme.md deleted file mode 100644 index 766ca2ce..00000000 --- a/Libretro/hakchi/readme.md +++ /dev/null @@ -1,22 +0,0 @@ ------------------------ -Name: Mesen -Creator: Sour -Category: RetroArch Cores ------------------------ -=== Mesen Core for RetroArch === - -Module adds support for Famicom / Nintendo Entertainment System - -Available executables and arguments to run Core: -- /bin/mesen - -Core by Sour - -Built and assembled by HakchiCloud - [Website](https://hakchiresources.com) - -Hakchi module system by madmonkey - -NES/SNES Mini shell integration by Cluster - -(c) 2016-2018 -