forked from libretro/RetroArch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.nintendoc
62 lines (58 loc) · 2.37 KB
/
Makefile.nintendoc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# 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