RetroArch/Makefile.nintendoc
2018-07-27 19:26:15 +02:00

63 lines
2.4 KiB
Makefile

# Hakchi version added to ease confusion amongst Hakchi community due to messy past...
#
# Make sure you have readelf installed (sudo apt-get install readelf) to patch the binary
# Might not be needed for your build but it's a useful tool and for safety it should be
# run anyway to ensure the SDL2 link isn't broken...
HAKCHI_VER := Hakchi_Retroarch_Neo_v1_7_3b
HAKCHI_NAME := "Hakchi RetroArch 'Neo' v1.7.3b
MOD_CREATOR := TheOtherGuys
MOD_CATEGORY := RetroArch
HAKCHI_DIR := hakchi
TARGET := retroarch
GIT_COMMIT := $(shell echo "`git rev-parse --short HEAD``git diff-index --quiet HEAD -- || echo '-dirty'`")
all: $(TARGET)
retroarch:
readelf -v #Check if you have readelf installed... (sudo apt-get install readelf)
./configure --host=arm-linux-gnueabihf --disable-freetype --enable-opengles --enable-udev --enable-alsa --enable-neon --enable-floathard
make -f Makefile -j HAVE_HAKCHI=1
patchelf --replace-needed libSDL2-2.0.so.0 libSDL2.so retroarch #libSDL2-2.0.so.0 sym link doesn't exist on native build. Just patch the binary...
#/usr/bin/arm-linux-gnueabihf-strip retroarch
rm -f $(HAKCHI_DIR)/bin/retroarch
cp retroarch $(HAKCHI_DIR)/bin/retroarch
echo $$(echo "Built by: " $$USER @ $$(date) \\\\\\ Git Commit: $(GIT_COMMIT)) > $(HAKCHI_DIR)/etc/libretro/retroarch_version
cp $(HAKCHI_DIR)/readme.md $(HAKCHI_DIR)/readme_COPY.md
printf "%s\n" \
"---" \
"Name: $(HAKCHI_VER)" \
"Creator: $(MOD_CREATOR)" \
"Category: $(MOD_CATEGORY)" \
"Version: $(HAKCHI_VER)" \
"Built on: $(shell date)" \
"Git commit: $(GIT_COMMIT)" \
"---" > $(HAKCHI_DIR)/readme.md
cat $(HAKCHI_DIR)/readme_COPY.md >> $(HAKCHI_DIR)/readme.md
rm $(HAKCHI_DIR)/readme_COPY.md
@echo "** BUILDING HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
cd $(HAKCHI_DIR)/; tar -czvf "$(HAKCHI_VER).hmod" *
mv $(HAKCHI_DIR)/$(HAKCHI_VER).hmod .
@echo "** BUILT HAKCHI $(HAKCHI_VER) HMOD PACKAGE **"
clean:
rm -f *.o
rm -f audio/*.o
rm -f conf/*.o
rm -f gfx/*.o
rm -f gfx/drivers_font/*.o
rm -f gfx/drivers_font_renderer/*.o
rm -f gfx/drivers_context/*.o
rm -f gfx/py_state/*.o
rm -f compat/*.o
rm -f record/*.o
rm -f input/*.o
rm -f tools/*.o
rm -f $(BINDIR)/retroarch
rm -f $(BINDIR)/retroarch-joyconfig
rm -f $(PNDDIR)/readme.html
rm -f retroarch
rm -f $(HAKCHI_DIR)/bin/retroarch
rm -f $(HAKCHI_VER).hmod
rm -f $(HAKCHI_DIR)/etc/libretro/retroarch_version