2011-11-02 15:27:23 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo $1
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes/perf" ]; then
|
|
|
|
echo "=== Building bSNES performance ==="
|
|
|
|
cd libsnes/perf
|
|
|
|
make profile=performance -j4 || die "Failed to build bSNES performance core"
|
|
|
|
cp -f out/libsnes.so ../libsnes-performance.so
|
|
|
|
cd ../..
|
|
|
|
else
|
|
|
|
echo "bSNES performance not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "libsnes/compat" ]; then
|
|
|
|
echo "=== Building bSNES compatibility ==="
|
|
|
|
cd libsnes/compat
|
|
|
|
make profile=compatibility -j4 || die "Failed to build bSNES compatibility core"
|
|
|
|
cp -f out/libsnes.so ../libsnes-compat.so
|
|
|
|
cd ../..
|
|
|
|
else
|
|
|
|
echo "bSNES compat not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "libsnes" ]; then
|
|
|
|
echo "=== Building bSNES accuracy ==="
|
|
|
|
cd libsnes
|
|
|
|
make profile=accuracy -j4 || die "Failed to build bSNES accuracy core"
|
|
|
|
cp -f out/libsnes.so libsnes-accuracy.so
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_s9x()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-s9x" ]; then
|
|
|
|
echo "=== Building SNES9x ==="
|
|
|
|
cd libsnes-s9x/unix
|
|
|
|
make -j4 || die "Failed to build SNES9x"
|
|
|
|
cp libsnes.so ../libsnes-snes9x.so
|
|
|
|
cd ../..
|
|
|
|
else
|
|
|
|
echo "SNES9x not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-11-08 20:20:44 +00:00
|
|
|
build_libsnes_s9x_next()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-s9x-next" ]; then
|
|
|
|
echo "=== Building SNES9x-Next ==="
|
2011-11-28 16:43:07 +00:00
|
|
|
cd libsnes-s9x-next/
|
|
|
|
make -f Makefile.libsnes -j4 || die "Failed to build SNES9x-Next"
|
2011-11-28 16:53:14 +00:00
|
|
|
cp libsnes.so libsnes-snes9x-next.so
|
2011-11-28 16:43:07 +00:00
|
|
|
cd ..
|
2011-11-08 20:20:44 +00:00
|
|
|
else
|
|
|
|
echo "SNES9x-Next not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2011-11-02 15:27:23 +00:00
|
|
|
build_libsnes_genplus()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-genplus" ]; then
|
|
|
|
echo "=== Building Genplus GX ==="
|
2011-11-28 16:43:07 +00:00
|
|
|
cd libsnes-genplus/
|
|
|
|
make -f Makefile.libsnes -j4 || die "Failed to build Genplus GX"
|
2011-11-28 16:53:14 +00:00
|
|
|
cp libsnes.so libsnes-genplus.so
|
2011-11-28 16:43:07 +00:00
|
|
|
cd ..
|
2011-11-02 15:27:23 +00:00
|
|
|
else
|
|
|
|
echo "Genplus GX not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_fba()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-fba" ]; then
|
|
|
|
echo "=== Building Final Burn Alpha ==="
|
|
|
|
cd libsnes-fba/src-0.2.97.13/burner/libsnes
|
|
|
|
make -j4 || die "Failed to build Final Burn Alpha"
|
|
|
|
cp libsnes.so ../../../libsnes-fba.so
|
|
|
|
cd ../../../..
|
|
|
|
else
|
|
|
|
echo "Final Burn Alpha not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_vba()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-vba" ]; then
|
|
|
|
echo "=== Building VBA-Next ==="
|
2011-11-28 16:43:07 +00:00
|
|
|
cd libsnes-vba/
|
|
|
|
make -f Makefile.libsnes -j4 || die "Failed to build VBA-Next"
|
2011-11-28 16:53:14 +00:00
|
|
|
cp libsnes.so libsnes-vba.so
|
2011-11-28 16:43:07 +00:00
|
|
|
cd ..
|
2011-11-02 15:27:23 +00:00
|
|
|
else
|
|
|
|
echo "VBA-Next not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_bnes()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-bnes" ]; then
|
|
|
|
echo "=== Building bNES ==="
|
|
|
|
cd libsnes-bnes
|
|
|
|
mkdir -p obj
|
|
|
|
make -j4 || die "Failed to build bNES"
|
|
|
|
cp libnes.so libsnes-bnes.so
|
|
|
|
cd ..
|
|
|
|
else
|
|
|
|
echo "bNES not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_fceu()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-fceu" ]; then
|
|
|
|
echo "=== Building FCEU ==="
|
2011-11-28 16:43:07 +00:00
|
|
|
cd libsnes-fceu
|
|
|
|
make -f Makefile.libsnes-fceumm -j4 || die "Failed to build FCEU"
|
2011-11-28 16:53:14 +00:00
|
|
|
cp libsnes.so libsnes-fceu.so
|
2011-11-28 16:43:07 +00:00
|
|
|
cd ..
|
2011-11-02 15:27:23 +00:00
|
|
|
else
|
2011-11-19 19:53:53 +00:00
|
|
|
echo "FCEU not fetched, skipping ..."
|
2011-11-02 15:27:23 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libsnes_gambatte()
|
|
|
|
{
|
|
|
|
if [ -d "libsnes-gambatte" ]; then
|
|
|
|
echo "=== Building Gambatte ==="
|
|
|
|
cd libsnes-gambatte/libgambatte
|
|
|
|
make -j4 || die "Failed to build Gambatte"
|
|
|
|
cd libsnes
|
|
|
|
make -j4 || die "Failed to build Gambatte"
|
|
|
|
cp libsnes.so ../../libsnes-gambatte.so
|
|
|
|
cd ../../..
|
|
|
|
else
|
|
|
|
echo "Gambatte not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
build_libsnes
|
|
|
|
build_libsnes_s9x
|
2011-11-08 20:20:44 +00:00
|
|
|
build_libsnes_s9x_next
|
2011-11-02 15:27:23 +00:00
|
|
|
build_libsnes_genplus
|
|
|
|
build_libsnes_fba
|
|
|
|
build_libsnes_vba
|
|
|
|
build_libsnes_bnes
|
|
|
|
build_libsnes_fceu
|
|
|
|
build_libsnes_gambatte
|
|
|
|
|