Libretro: Integrated makefile updates for Hakchi (by swingflip)

This commit is contained in:
Sour 2018-08-08 20:27:22 -04:00
parent 02ba4128b0
commit 1aef0c3d63
5 changed files with 54 additions and 3 deletions

4
.gitignore vendored
View file

@ -177,4 +177,6 @@ PGOHelper/PGOMesenHome
*.profraw
*.profdata
packages/*
packages/*
!Libretro/hakchi/bin

View file

@ -74,6 +74,17 @@ else ifeq ($(platform), linux-portable)
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
else ifneq (,$(findstring osx,$(platform)))
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
@ -240,7 +251,7 @@ else
endif
else
OBJOUT = -o
LINKOUT = -o
LINKOUT = -o
LD = $(CXX)
endif
@ -269,6 +280,15 @@ 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
%.o: %.c
$(CC) $(CFLAGS) $(fpic) -c $< $(OBJOUT)$@
@ -276,7 +296,7 @@ endif
$(CXX) $(CXXFLAGS) $(fpic) -c $< $(OBJOUT)$@
clean:
rm -f $(OBJECTS) $(TARGET)
rm -f $(OBJECTS) $(TARGET) hakchi/CORE_$(TARGET_NAME).hmod
.PHONY: clean

View file

@ -0,0 +1,3 @@
#!/bin/sh
exec retroarch-clover mesen "$@"

4
Libretro/hakchi/install Normal file
View file

@ -0,0 +1,4 @@
transfer_default
chmod +x $rootfs/bin/*
chmod +x $rootfs/usr/bin/*
return 1

22
Libretro/hakchi/readme.md Normal file
View file

@ -0,0 +1,22 @@
-----------------------
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 <rom> <clover_args>
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