Fixup libretro-build.sh

This commit is contained in:
twinaphex 2013-04-30 03:26:46 +02:00
parent 3e8a14d2b7
commit cd1d2eceb2
1 changed files with 44 additions and 27 deletions

View File

@ -2,6 +2,7 @@
SCRIPT=$(readlink -f $0) SCRIPT=$(readlink -f $0)
BASE_DIR=$(dirname $SCRIPT) BASE_DIR=$(dirname $SCRIPT)
JOBS=4
die() die()
{ {
@ -19,7 +20,8 @@ build_libretro_bsnes()
if [ -d "libretro-bsnes/perf" ]; then if [ -d "libretro-bsnes/perf" ]; then
echo "=== Building bSNES performance ===" echo "=== Building bSNES performance ==="
cd libretro-bsnes/perf/higan cd libretro-bsnes/perf/higan
make compiler="$CC" ui=target-libretro profile=performance -j4 || die "Failed to build bSNES performance core" make compiler="$CC" ui=target-libretro profile=performance -j$JOBS clean || die "Failed to clean bSNES performance core"
make compiler="$CC" ui=target-libretro profile=performance -j$JOBS || die "Failed to build bSNES performance core"
cp -f out/libretro.so ../../libretro-bsnes-performance.so cp -f out/libretro.so ../../libretro-bsnes-performance.so
else else
echo "bSNES performance not fetched, skipping ..." echo "bSNES performance not fetched, skipping ..."
@ -29,7 +31,8 @@ build_libretro_bsnes()
if [ -d "libretro-bsnes/balanced" ]; then if [ -d "libretro-bsnes/balanced" ]; then
echo "=== Building bSNES balanced ===" echo "=== Building bSNES balanced ==="
cd libretro-bsnes/balanced/higan cd libretro-bsnes/balanced/higan
make compiler="$CC" ui=target-libretro profile=balanced -j4 || die "Failed to build bSNES balanced core" make compiler="$CC" ui=target-libretro profile=balanced -j$JOBS clean || die "Failed to clean bSNES balanced core"
make compiler="$CC" ui=target-libretro profile=balanced -j$JOBS || die "Failed to build bSNES balanced core"
cp -f out/libretro.so ../../libretro-bsnes-balanced.so cp -f out/libretro.so ../../libretro-bsnes-balanced.so
else else
echo "bSNES compat not fetched, skipping ..." echo "bSNES compat not fetched, skipping ..."
@ -39,7 +42,8 @@ build_libretro_bsnes()
if [ -d "libretro-bsnes" ]; then if [ -d "libretro-bsnes" ]; then
echo "=== Building bSNES accuracy ===" echo "=== Building bSNES accuracy ==="
cd libretro-bsnes/higan cd libretro-bsnes/higan
make compiler="$CC" ui=target-libretro profile=accuracy -j4 || die "Failed to build bSNES accuracy core" make compiler="$CC" ui=target-libretro profile=accuracy -j$JOBS clean || die "Failed to clean bSNES accuracy core"
make compiler="$CC" ui=target-libretro profile=accuracy -j$JOBS || die "Failed to build bSNES accuracy core"
cp -f out/libretro.so ../libretro-bsnes-accuracy.so cp -f out/libretro.so ../libretro-bsnes-accuracy.so
fi fi
} }
@ -53,12 +57,9 @@ build_libretro_mednafen()
for core in psx pce-fast wswan ngp gba snes vb for core in psx pce-fast wswan ngp gba snes vb
do do
if [ -d $core ]; then make core=${core} -j$JOBS clean || die "Failed to clean mednafen/${core}"
cd $core make core=${core} -j$JOBS || die "Failed to build mednafen/${core}"
make core=${core} -j4 || die "Failed to build mednafen/${core}"
cp mednafen_$(echo ${core} | tr '[\-]' '[_]')_libretro.so ../libretro-mednafen-${core}.so cp mednafen_$(echo ${core} | tr '[\-]' '[_]')_libretro.so ../libretro-mednafen-${core}.so
cd ..
fi
done done
else else
echo "Mednafen not fetched, skipping ..." echo "Mednafen not fetched, skipping ..."
@ -71,7 +72,8 @@ build_libretro_s9x()
if [ -d "libretro-s9x" ]; then if [ -d "libretro-s9x" ]; then
echo "=== Building SNES9x ===" echo "=== Building SNES9x ==="
cd libretro-s9x/libretro cd libretro-s9x/libretro
make -j4 || die "Failed to build SNES9x" make -j$JOBS clean || die "Failed to clean SNES9x"
make -j$JOBS || die "Failed to build SNES9x"
cp libretro.so ../libretro-snes9x.so cp libretro.so ../libretro-snes9x.so
else else
echo "SNES9x not fetched, skipping ..." echo "SNES9x not fetched, skipping ..."
@ -84,7 +86,8 @@ build_libretro_s9x_next()
if [ -d "libretro-s9x-next" ]; then if [ -d "libretro-s9x-next" ]; then
echo "=== Building SNES9x-Next ===" echo "=== Building SNES9x-Next ==="
cd libretro-s9x-next/ cd libretro-s9x-next/
make -f Makefile.libretro -j4 || die "Failed to build SNES9x-Next" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean SNES9x-Next"
make -f Makefile.libretro -j$JOBS || die "Failed to build SNES9x-Next"
cp snes9x_next_libretro.so libretro-snes9x-next.so cp snes9x_next_libretro.so libretro-snes9x-next.so
else else
echo "SNES9x-Next not fetched, skipping ..." echo "SNES9x-Next not fetched, skipping ..."
@ -97,7 +100,8 @@ build_libretro_genplus()
if [ -d "libretro-genplus" ]; then if [ -d "libretro-genplus" ]; then
echo "=== Building Genplus GX ===" echo "=== Building Genplus GX ==="
cd libretro-genplus/ cd libretro-genplus/
make -f Makefile.libretro -j4 || die "Failed to build Genplus GX" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean Genplus GX"
make -f Makefile.libretro -j$JOBS || die "Failed to build Genplus GX"
cp genesis_plus_gx_libretro.so libretro-genplus.so cp genesis_plus_gx_libretro.so libretro-genplus.so
else else
echo "Genplus GX not fetched, skipping ..." echo "Genplus GX not fetched, skipping ..."
@ -110,8 +114,10 @@ build_libretro_fba()
if [ -d "libretro-fba" ]; then if [ -d "libretro-fba" ]; then
echo "=== Building Final Burn Alpha ===" echo "=== Building Final Burn Alpha ==="
cd libretro-fba/ cd libretro-fba/
./compile_libretro.sh make || die "Failed to build Final Burn Alpha" cd svn-current/trunk
cp svn-current/trunk/fb_alpha_libretro.so libretro-fba.so make -f makefile.libretro clean || die "Failed to clean Final Burn Alpha"
make -f makefile.libretro -j$JOBS || die "Failed to build Final Burn Alpha"
cp fb_alpha_libretro.so libretro-fba.so
else else
echo "Final Burn Alpha not fetched, skipping ..." echo "Final Burn Alpha not fetched, skipping ..."
fi fi
@ -123,7 +129,8 @@ build_libretro_vba()
if [ -d "libretro-vba" ]; then if [ -d "libretro-vba" ]; then
echo "=== Building VBA-Next ===" echo "=== Building VBA-Next ==="
cd libretro-vba/ cd libretro-vba/
make -f Makefile.libretro -j4 || die "Failed to build VBA-Next" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean VBA-Next"
make -f Makefile.libretro -j$JOBS || die "Failed to build VBA-Next"
cp vba_next_libretro.so libretro-vba.so cp vba_next_libretro.so libretro-vba.so
else else
echo "VBA-Next not fetched, skipping ..." echo "VBA-Next not fetched, skipping ..."
@ -137,7 +144,8 @@ build_libretro_bnes()
echo "=== Building bNES ===" echo "=== Building bNES ==="
cd libretro-bnes cd libretro-bnes
mkdir -p obj mkdir -p obj
make -j4 || die "Failed to build bNES" make -j$JOBS clean || die "Failed to clean bNES"
make -j$JOBS || die "Failed to build bNES"
cp libretro.so libretro-bnes.so cp libretro.so libretro-bnes.so
else else
echo "bNES not fetched, skipping ..." echo "bNES not fetched, skipping ..."
@ -150,7 +158,8 @@ build_libretro_fceu()
if [ -d "libretro-fceu" ]; then if [ -d "libretro-fceu" ]; then
echo "=== Building FCEU ===" echo "=== Building FCEU ==="
cd libretro-fceu cd libretro-fceu
make -C fceumm-code -f Makefile.libretro -j4 || die "Failed to build FCEU" make -C fceumm-code -f Makefile.libretro -j$JOBS clean || die "Failed to clean FCEU"
make -C fceumm-code -f Makefile.libretro -j$JOBS || die "Failed to build FCEU"
cp fceumm-code/fceumm_libretro.so libretro-fceu.so cp fceumm-code/fceumm_libretro.so libretro-fceu.so
else else
echo "FCEU not fetched, skipping ..." echo "FCEU not fetched, skipping ..."
@ -163,7 +172,8 @@ build_libretro_gambatte()
if [ -d "libretro-gambatte" ]; then if [ -d "libretro-gambatte" ]; then
echo "=== Building Gambatte ===" echo "=== Building Gambatte ==="
cd libretro-gambatte/libgambatte cd libretro-gambatte/libgambatte
make -f Makefile.libretro -j4 || die "Failed to build Gambatte" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean Gambatte"
make -f Makefile.libretro -j$JOBS || die "Failed to build Gambatte"
cp gambatte_libretro.so ../libretro-gambatte.so cp gambatte_libretro.so ../libretro-gambatte.so
else else
echo "Gambatte not fetched, skipping ..." echo "Gambatte not fetched, skipping ..."
@ -176,20 +186,21 @@ build_libretro_meteor()
if [ -d "libretro-meteor" ]; then if [ -d "libretro-meteor" ]; then
echo "=== Building Meteor ===" echo "=== Building Meteor ==="
cd libretro-meteor/libretro cd libretro-meteor/libretro
make -j4 || die "Failed to build Meteor" make -j$JOBS clean || die "Failed to clean Meteor"
make -j$JOBS || die "Failed to build Meteor"
cp libretro.so ../libretro-meteor.so cp libretro.so ../libretro-meteor.so
else else
echo "Meteor not fetched, skipping ..." echo "Meteor not fetched, skipping ..."
fi fi
} }
build_libretro_nx() build_libretro_nx()
{ {
cd $BASE_DIR cd $BASE_DIR
if [ -d "libretro-nx" ]; then if [ -d "libretro-nx" ]; then
echo "=== Building NXEngine ===" echo "=== Building NXEngine ==="
cd libretro-nx cd libretro-nx
make -j4 || die "Failed to build NXEngine" make -j$JOBS clean || die "Failed to clean NXEngine"
make -j$JOBS || die "Failed to build NXEngine"
cp nxengine_libretro.so libretro-nx.so cp nxengine_libretro.so libretro-nx.so
else else
echo "NXEngine not fetched, skipping ..." echo "NXEngine not fetched, skipping ..."
@ -202,7 +213,8 @@ build_libretro_prboom()
if [ -d "libretro-prboom" ]; then if [ -d "libretro-prboom" ]; then
echo "=== Building PRBoom ===" echo "=== Building PRBoom ==="
cd libretro-prboom cd libretro-prboom
make -j4 || die "Failed to build PRBoom" make -j$JOBS clean || die "Failed to clean PRBoom"
make -j$JOBS || die "Failed to build PRBoom"
cp prboom_libretro.so libretro-prboom.so cp prboom_libretro.so libretro-prboom.so
else else
echo "PRBoom not fetched, skipping ..." echo "PRBoom not fetched, skipping ..."
@ -215,7 +227,8 @@ build_libretro_stella()
if [ -d "libretro-stella" ]; then if [ -d "libretro-stella" ]; then
echo "=== Building Stella ===" echo "=== Building Stella ==="
cd libretro-stella cd libretro-stella
make -j4 || die "Failed to build Stella" make -j$JOBS clean || die "Failed to clean Stella"
make -j$JOBS || die "Failed to build Stella"
cp libretro.so libretro-stella.so cp libretro.so libretro-stella.so
else else
echo "Stella not fetched, skipping ..." echo "Stella not fetched, skipping ..."
@ -228,7 +241,8 @@ build_libretro_desmume()
if [ -d "libretro-desmume" ]; then if [ -d "libretro-desmume" ]; then
echo "=== Building Desmume ===" echo "=== Building Desmume ==="
cd libretro-desmume cd libretro-desmume
make -f Makefile.libretro -j4 || die "Failed to build Desmume" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean Desmume"
make -f Makefile.libretro -j$JOBS || die "Failed to build Desmume"
cp libretro.so libretro-desmume.so cp libretro.so libretro-desmume.so
else else
echo "Desmume not fetched, skipping ..." echo "Desmume not fetched, skipping ..."
@ -241,7 +255,8 @@ build_libretro_quicknes()
if [ -d "libretro-quicknes" ]; then if [ -d "libretro-quicknes" ]; then
echo "=== Building QuickNES ===" echo "=== Building QuickNES ==="
cd libretro-quicknes/libretro cd libretro-quicknes/libretro
make -j4 || die "Failed to build QuickNES" make -j$JOBS clean || die "Failed to clean QuickNES"
make -j$JOBS || die "Failed to build QuickNES"
cp libretro.so ../libretro-quicknes.so cp libretro.so ../libretro-quicknes.so
else else
echo "QuickNES not fetched, skipping ..." echo "QuickNES not fetched, skipping ..."
@ -254,7 +269,8 @@ build_libretro_nestopia()
if [ -d "libretro-nestopia" ]; then if [ -d "libretro-nestopia" ]; then
echo "=== Building Nestopia ===" echo "=== Building Nestopia ==="
cd libretro-nestopia/libretro cd libretro-nestopia/libretro
make -j4 || die "Failed to build Nestopia" make -j$JOBS clean || die "Failed to clean Nestopia"
make -j$JOBS || die "Failed to build Nestopia"
cp nestopia_libretro.so ../libretro-nestopia.so cp nestopia_libretro.so ../libretro-nestopia.so
else else
echo "Nestopia not fetched, skipping ..." echo "Nestopia not fetched, skipping ..."
@ -267,7 +283,8 @@ build_libretro_tyrquake()
if [ -d "libretro-tyrquake" ]; then if [ -d "libretro-tyrquake" ]; then
echo "=== Building Tyr Quake ===" echo "=== Building Tyr Quake ==="
cd libretro-tyrquake cd libretro-tyrquake
make -f Makefile.libretro -j4 || die "Failed to build Tyr Quake" make -f Makefile.libretro -j$JOBS clean || die "Failed to clean Tyr Quake"
make -f Makefile.libretro -j$JOBS || die "Failed to build Tyr Quake"
cp tyrquake_libretro.so libretro-tyrquake.so cp tyrquake_libretro.so libretro-tyrquake.so
else else
echo "Tyr Quake not fetched, skipping ..." echo "Tyr Quake not fetched, skipping ..."