forked from Xpndable/DotUI
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
211 lines (187 loc) · 9.82 KB
/
makefile
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
.PHONY: clean
###########################################################
ifeq (,$(PLATFORM))
PLATFORM=$(UNION_PLATFORM)
endif
ifeq (,$(PLATFORM))
$(error please specify PLATFORM, eg. PLATFORM=trimui make)
endif
###########################################################
BUILD_ARCH!=uname -m
BUILD_HASH!=git rev-parse --short HEAD
BUILD_TIME!=date "+%Y-%m-%d %H:%M:%S %Z"
BUILD_REPO=https://github.com/anzz1/DotUI-X
BUILD_GCC:=$(shell $(CROSS_COMPILE)gcc -dumpfullversion -dumpversion)
RELEASE_TIME!=date +%Y%m%d
RELEASE_BASE=DotUI-X-$(RELEASE_TIME)
RELEASE_DOT!=find ./releases/. -regex ".*/$(RELEASE_BASE)-[0-9]+-base\.zip" -printf '.' | wc -m
RELEASE_NAME=$(RELEASE_BASE)-$(RELEASE_DOT)
PATCH = git apply
LIBC_LIB=/opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib
BUNDLE_LIBS=
GCC_VER_GTE9_0 := $(shell echo `gcc -dumpversion | cut -f1-2 -d.` \>= 9.0 | bc )
ifeq "$(GCC_VER_GTE9_0)" "1"
BUNDLE_LIBS=bundle
endif
all: lib sdl deps core emu tools payload readmes $(BUNDLE_LIBS) zip
extras: emu tools
lib:
cd ./src/libmsettings && make
cd ./src/libmmenu && make
cd ./third-party/latency_reduction && make
cd ./third-party/libmamedb && make
deps:
cd ./third-party/deps && ./make-deps.sh
cd ./third-party/minizip && make miniunz
sdl: lib
cd ./third-party/SDL-1.2 && MSETTINGS=1 ./make.sh
core: lib
cd ./src/batmon && make
cd ./src/keymon && make
cd ./src/lumon && make
cd ./src/progressui && make
cd ./src/miniui && make
cd ./src/show && make
cd ./src/confirm && make
cd ./src/say && make
cd ./src/blank && make
cd ./src/keyboard && make
cd ./src/oss && make
emu:
cd ./third-party/picoarch && make platform=miyoomini -j
cd ./third-party/vvvvvv && make -j
./bits/commits.sh > ./commits.txt
tools:
cd ./third-party/DinguxCommander && make -j
cd ./third-party/screenshot && make
cd ./third-party/logotweak/logomake && make
cd ./third-party/logotweak/logowrite && make
cd ./third-party/st-sdl && make platform=miyoomini
cd ./third-party/dropbear-embedded && make
cd ./src/clock && make
readmes:
fmt -w 40 -s ./skeleton//README.txt > ./build/PAYLOAD/README.txt
fmt -w 40 -s ./extras//README.txt > ./build/EXTRAS/README.txt
payload:
rm -rf ./build
mkdir -p ./releases
mkdir -p ./build
cp -R ./skeleton/. ./build/PAYLOAD
cp -R ./extras/. ./build/EXTRAS
mv ./build/PAYLOAD/miyoo354/app/keymon.sh ./build/PAYLOAD/miyoo354/app/keymon
cd ./build && find . -type f -name '.keep' -delete
cd ./build && find . -type f -name '.DS_Store' -delete
cp ./src/libmsettings/libmsettings.so ./build/PAYLOAD/.system/lib/
cp ./src/libmmenu/libmmenu.so ./build/PAYLOAD/.system/lib/
cp ./third-party/latency_reduction/as_preload.so ./build/PAYLOAD/.system/lib/
cp ./third-party/latency_reduction/audioserver.mod ./build/PAYLOAD/.system/bin/
cp ./third-party/SDL-1.2/build/.libs/libSDL-1.2.so.0.11.5 ./build/PAYLOAD/.system/lib/libSDL-1.2.so.0
cp ./third-party/deps/tiny-curl-7.72.0/lib/.libs/libcurl.so.4.6.0 ./build/PAYLOAD/.system/lib/libcurl.so.4
cp ./third-party/deps/tiny-curl-7.72.0/src/.libs/curl ./build/PAYLOAD/.system/bin/
cp ./third-party/minizip/miniunz ./build/PAYLOAD/.system/bin/
cp ./third-party/libmamedb/libmamedb.so ./build/PAYLOAD/.system/lib/
cp ./src/batmon/batmon ./build/PAYLOAD/.system/bin/
cp ./src/keymon/keymon ./build/PAYLOAD/.system/bin/
cp ./src/lumon/lumon ./build/PAYLOAD/.system/bin/
cp ./src/progressui/progressui ./build/PAYLOAD/.system/bin/
cp ./src/progressui/progress.sh ./build/PAYLOAD/.system/bin/progress
cp ./src/miniui/MiniUI ./build/PAYLOAD/.system/paks/MiniUI.pak/
cp ./src/show/show ./build/PAYLOAD/.system/bin/
cp ./src/confirm/confirm ./build/PAYLOAD/.system/bin/
cp ./src/say/say ./build/PAYLOAD/.system/bin/
cp ./src/blank/blank ./build/PAYLOAD/.system/bin/
cp ./src/keyboard/keyboard ./build/PAYLOAD/.system/bin/
cp ./src/oss/oss ./build/PAYLOAD/.system/bin/
cp ./src/say/say ./build/PAYLOAD/miyoo354/app/
cp ./src/blank/blank ./build/PAYLOAD/miyoo354/app/
cp ./third-party/minizip/miniunz ./build/PAYLOAD/miyoo354/app/
cp ./third-party/picoarch/output/picoarch ./build/PAYLOAD/.system/bin/
cp ./third-party/picoarch/output/fceumm_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/picoarch/output/gambatte_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/picoarch/output/gpsp_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/picoarch/output/pcsx_rearmed_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/picoarch/output/picodrive_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/picoarch/output/mednafen_supafaust_libretro.so ./build/PAYLOAD/.system/cores/
cp ./third-party/DinguxCommander/output/DinguxCommander ./build/EXTRAS/Tools/Files.pak/
cp ./src/clock/clock ./build/EXTRAS/Tools/Clock.pak/
cp -r ./third-party/DinguxCommander/res ./build/EXTRAS/Tools/Files.pak/
cp ./third-party/screenshot/screenshot ./build/EXTRAS/Tools/Screenshots.pak/
cp ./third-party/picoarch/output/beetle-ngp_libretro.so ./build/EXTRAS/Emus/NGP.pak/mednafen_ngp_libretro.so
cp ./third-party/picoarch/output/beetle-pce-fast_libretro.so ./build/EXTRAS/Emus/PCE.pak/mednafen_pce_fast_libretro.so
cp ./third-party/picoarch/output/beetle-supergrafx_libretro.so ./build/EXTRAS/Emus/SGX.pak/mednafen_supergrafx_libretro.so
cp ./third-party/picoarch/output/pokemini_libretro.so ./build/EXTRAS/Emus/PKM.pak/
cp ./third-party/picoarch/output/mgba_libretro.so ./build/EXTRAS/Emus/MGBA.pak/
cp ./third-party/picoarch/output/mgba_sgb_libretro.so ./build/EXTRAS/Emus/SGB.pak/
cp ./third-party/picoarch/output/fake-08_libretro.so ./build/EXTRAS/Emus/P8.pak/
cp ./third-party/picoarch/output/smsplus-gx_libretro.so ./build/EXTRAS/Emus/GG.pak/smsplus_libretro.so
cp ./third-party/picoarch/output/mame2000_libretro.so ./build/EXTRAS/Emus/MAME.pak/
cp ./third-party/picoarch/output/prboom_libretro.so ./build/EXTRAS/Emus/DOOM.pak/
cp ./third-party/picoarch/cores/prboom/prboom.wad ./build/EXTRAS/Bios/DOOM/
cp ./third-party/picoarch/output/nxengine_libretro.so "./build/EXTRAS/Roms/Native Games (SH)/Cave Story/"
cp ./third-party/picoarch/output/xrick_libretro.so "./build/EXTRAS/Roms/Native Games (SH)/Rick Dangerous/"
cp ./third-party/st-sdl/st ./build/EXTRAS/Tools/Terminal.pak/
cp ./third-party/dropbear-embedded/dropbear ./build/EXTRAS/Tools/SSH.pak/
cp ./third-party/vvvvvv/vvvvvv "./build/EXTRAS/Roms/Native Games (SH)/VVVVVV/"
# cp -R ./bits/bootlogos/pak/. ./build/EXTRAS/Tools/Single-use/bootlogo.tmp
# cp ./third-party/logotweak/logomake/logomake ./build/EXTRAS/Tools/Single-use/bootlogo.tmp/
# cp ./third-party/logotweak/logowrite/logowrite ./build/EXTRAS/Tools/Single-use/bootlogo.tmp/
# cd ./build/EXTRAS/Tools/Single-use/ && cp -R ./bootlogo.tmp/. "02) Remove MiniUI Boot Logo.pak"
# cp -R ./bits/bootlogos/miniui/. ./build/EXTRAS/Tools/Single-use/bootlogo.tmp/
# cd ./build/EXTRAS/Tools/Single-use/ && cp -R ./bootlogo.tmp/. "02) Add MiniUI Boot Logo.pak"
# rm -rf ./build/EXTRAS/Tools/Single-use/bootlogo.tmp
bundle:
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/ld-linux-armhf.so.3 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libc.so.6 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libcrypt.so.1 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libdl.so.2 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libgcc_s.so.1 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libm.so.6 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libpcprofile.so ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libpthread.so.0 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libresolv.so.2 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/librt.so.1 ./build/PAYLOAD/.system/lib/
cp -L /opt/miyoomini-toolchain/arm-none-linux-gnueabihf/libc/lib/libstdc++.so.6 ./build/PAYLOAD/.system/lib/
zip:
cd ./build/PAYLOAD/.system/paks/MiniUI.pak && echo "$(RELEASE_NAME)\n$(BUILD_HASH)" > version.txt
cp ./commits.txt ./build/PAYLOAD/.system/paks/MiniUI.pak
cd ./build/PAYLOAD && zip -r MiniUI.zip .system .tmp_update
mv ./build/PAYLOAD/MiniUI.zip ./build/PAYLOAD/miyoo354/app/
cd ./build/PAYLOAD && zip -r ../../releases/$(RELEASE_NAME)-base.zip Bios Roms Saves miyoo354 README.txt
cd ./build/EXTRAS && zip -r ../../releases/$(RELEASE_NAME)-extras.zip Bios Emus Roms Saves Tools README.txt
echo "$(RELEASE_NAME)" > ./build/latest.txt
rezip: payload $(BUNDLE_LIBS) zip
clean:
rm -rf ./build
cd ./src/libmsettings && make clean
cd ./src/libmmenu && make clean
cd ./third-party/SDL-1.2 && make distclean || :
cd ./src/batmon && make clean
cd ./src/keymon && make clean
cd ./src/lumon && make clean
cd ./src/progressui && make clean
cd ./src/miniui && make clean
cd ./src/show && make clean
cd ./src/confirm && make clean
cd ./src/say && make clean
cd ./src/blank && make clean
cd ./src/clock && make clean
cd ./src/keyboard && make clean
cd ./src/oss && make clean
cd ./third-party/deps && ./make-deps.sh clean
cd ./third-party/minizip && make clean
cd ./third-party/libmamedb && make clean
cd ./third-party/DinguxCommander && make clean
cd ./third-party/latency_reduction && make clean
cd ./third-party/logotweak/logomake && make clean
cd ./third-party/logotweak/logoread && make clean
cd ./third-party/logotweak/logowrite && make clean
cd ./third-party/picoarch && make platform=miyoomini clean-all
cd ./third-party/screenshot && make clean
cd ./third-party/st-sdl && make platform=miyoomini clean
cd ./third-party/dropbear-embedded && make clean
cd ./third-party/vvvvvv && make clean
info:
@uname -srmo
@echo "CROSS_COMPILE=$(CROSS_COMPILE)"
@"$(CROSS_COMPILE)gcc" --version | head -1
@echo "$(BUILD_GCC)"