forked from libretro/stella2014-libretro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlibretro-build.sh
executable file
·232 lines (211 loc) · 5.5 KB
/
libretro-build.sh
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
#!/bin/sh
die()
{
echo $1
#exit 1
}
build_libretro_bsnes()
{
if [ -z "$CC" ]; then
CC=gcc
fi
if [ -d "libretro-bsnes/perf" ]; then
echo "=== Building bSNES performance ==="
cd libretro-bsnes/perf/bsnes
make compiler="$CC" ui=target-libretro profile=performance -j4 || die "Failed to build bSNES performance core"
cp -f out/libretro.so ../../libretro-bsnes-performance.so
cd ../../..
else
echo "bSNES performance not fetched, skipping ..."
fi
if [ -d "libretro-bsnes/compat" ]; then
echo "=== Building bSNES compatibility ==="
cd libretro-bsnes/compat/bsnes
make compiler="$CC" ui=target-libretro profile=compatibility -j4 || die "Failed to build bSNES compatibility core"
cp -f out/libretro.so ../../libretro-bsnes-compat.so
cd ../../..
else
echo "bSNES compat not fetched, skipping ..."
fi
if [ -d "libretro-bsnes" ]; then
echo "=== Building bSNES accuracy ==="
cd libretro-bsnes/bsnes
make compiler="$CC" ui=target-libretro profile=accuracy -j4 || die "Failed to build bSNES accuracy core"
cp -f out/libretro.so ../libretro-bsnes-accuracy.so
cd ../..
fi
}
build_libretro_s9x()
{
if [ -d "libretro-s9x" ]; then
echo "=== Building SNES9x ==="
cd libretro-s9x/libretro
make -j4 || die "Failed to build SNES9x"
cp libretro.so ../libretro-snes9x.so
cd ../..
else
echo "SNES9x not fetched, skipping ..."
fi
}
build_libretro_s9x_next()
{
if [ -d "libretro-s9x-next" ]; then
echo "=== Building SNES9x-Next ==="
cd libretro-s9x-next/
make -f Makefile.libretro -j4 || die "Failed to build SNES9x-Next"
cp libretro.so libretro-snes9x-next.so
cd ..
else
echo "SNES9x-Next not fetched, skipping ..."
fi
}
build_libretro_genplus()
{
if [ -d "libretro-genplus" ]; then
echo "=== Building Genplus GX ==="
cd libretro-genplus/
make -f Makefile.libretro -j4 || die "Failed to build Genplus GX"
cp libretro.so libretro-genplus.so
cd ..
else
echo "Genplus GX not fetched, skipping ..."
fi
}
build_libretro_fba()
{
if [ -d "libretro-fba" ]; then
echo "=== Building Final Burn Alpha ==="
cd libretro-fba/
./compile_libretro.sh make || die "Failed to build Final Burn Alpha"
cp src-0.2.97.26/libretro.so libretro-fba.so
cd ..
else
echo "Final Burn Alpha not fetched, skipping ..."
fi
}
build_libretro_vba()
{
if [ -d "libretro-vba" ]; then
echo "=== Building VBA-Next ==="
cd libretro-vba/
make -f Makefile.libretro -j4 || die "Failed to build VBA-Next"
cp libretro.so libretro-vba.so
cd ..
else
echo "VBA-Next not fetched, skipping ..."
fi
}
build_libretro_bnes()
{
if [ -d "libretro-bnes" ]; then
echo "=== Building bNES ==="
cd libretro-bnes
mkdir -p obj
make -j4 || die "Failed to build bNES"
cp libretro.so libretro-bnes.so
cd ..
else
echo "bNES not fetched, skipping ..."
fi
}
build_libretro_fceu()
{
if [ -d "libretro-fceu" ]; then
echo "=== Building FCEU ==="
cd libretro-fceu
make -f Makefile.libretro-fceumm -j4 || die "Failed to build FCEU"
cp libretro.so libretro-fceu.so
cd ..
else
echo "FCEU not fetched, skipping ..."
fi
}
build_libretro_gambatte()
{
if [ -d "libretro-gambatte" ]; then
echo "=== Building Gambatte ==="
cd libretro-gambatte/libgambatte
make -f Makefile.libretro -j4 || die "Failed to build Gambatte"
cp libretro.so ../libretro-gambatte.so
cd ../..
else
echo "Gambatte not fetched, skipping ..."
fi
}
build_libretro_meteor()
{
if [ -d "libretro-meteor" ]; then
echo "=== Building Meteor ==="
cd libretro-meteor/libretro
make -j4 || die "Failed to build Meteor"
cp libretro.so ../libretro-meteor.so
cd ../..
else
echo "Meteor not fetched, skipping ..."
fi
}
build_libretro_nx()
{
if [ -d "libretro-nx" ]; then
echo "=== Building NXEngine ==="
cd libretro-nx
make -j4 || die "Failed to build NXEngine"
cp libretro.so libretro-nx.so
cd ../
else
echo "NXEngine not fetched, skipping ..."
fi
}
build_libretro_prboom()
{
if [ -d "libretro-prboom" ]; then
echo "=== Building PRBoom ==="
cd libretro-prboom
make -j4 || die "Failed to build PRBoom"
cp libretro.so libretro-prboom.so
cd ../
else
echo "PRBoom not fetched, skipping ..."
fi
}
build_libretro_stella()
{
if [ -d "libretro-stella" ]; then
echo "=== Building Stella ==="
cd libretro-stella
make -j4 || die "Failed to build Stella"
cp libretro.so libretro-stella.so
cd ../
else
echo "Stella not fetched, skipping ..."
fi
}
build_libretro_mednafen()
{
if [ -d "libretro-mednafen-${1}" ]; then
echo "=== Building Mednafen/${2} ==="
cd libretro-mednafen-${1}
make -j4 || die "Failed to build Mednafen/${2}"
cp libretro.so libretro-mednafen-${1}.so
cd ../
else
echo "Mednafen/${2} not fetched, skipping ..."
fi
}
build_libretro_bsnes
build_libretro_s9x
build_libretro_s9x_next
build_libretro_genplus
build_libretro_fba
build_libretro_vba
build_libretro_bnes
build_libretro_fceu
build_libretro_gambatte
build_libretro_meteor
build_libretro_nx
build_libretro_prboom
build_libretro_stella
build_libretro_mednafen psx PSX
build_libretro_mednafen pce PCE
build_libretro_mednafen wswan WSwan
build_libretro_mednafen ngp NGP