Fixups for libretro cores.

This commit is contained in:
Themaister 2012-04-16 19:33:18 +02:00
parent 10e77564b0
commit 6ec6169d6c
3 changed files with 91 additions and 93 deletions

View File

@ -3,154 +3,152 @@
die() die()
{ {
echo $1 echo $1
exit 1 #exit 1
} }
build_libsnes() build_libretro_bsnes()
{ {
if [ -d "libsnes/perf" ]; then if [ -d "libretro-bsnes/perf" ]; then
echo "=== Building bSNES performance ===" echo "=== Building bSNES performance ==="
cd libsnes/perf cd libretro-bsnes/perf
make profile=performance -j4 || die "Failed to build bSNES performance core" make profile=performance -j4 || die "Failed to build bSNES performance core"
cp -f out/libsnes.so ../libsnes-performance.so cp -f out/libretro.so ../libretro-performance.so
cd ../.. cd ../..
else else
echo "bSNES performance not fetched, skipping ..." echo "bSNES performance not fetched, skipping ..."
fi fi
if [ -d "libsnes/compat" ]; then if [ -d "libretro-bsnes/compat" ]; then
echo "=== Building bSNES compatibility ===" echo "=== Building bSNES compatibility ==="
cd libsnes/compat cd libretro-bsnes/compat
make profile=compatibility -j4 || die "Failed to build bSNES compatibility core" make profile=compatibility -j4 || die "Failed to build bSNES compatibility core"
cp -f out/libsnes.so ../libsnes-compat.so cp -f out/libretro.so ../libretro-compat.so
cd ../.. cd ../..
else else
echo "bSNES compat not fetched, skipping ..." echo "bSNES compat not fetched, skipping ..."
fi fi
if [ -d "libsnes" ]; then if [ -d "libretro-bsnes" ]; then
echo "=== Building bSNES accuracy ===" echo "=== Building bSNES accuracy ==="
cd libsnes cd libretro-bsnes
make profile=accuracy -j4 || die "Failed to build bSNES accuracy core" make profile=accuracy -j4 || die "Failed to build bSNES accuracy core"
cp -f out/libsnes.so libsnes-accuracy.so cp -f out/libretro.so libretro-accuracy.so
cd .. cd ..
fi fi
} }
build_libsnes_s9x() build_libretro_s9x()
{ {
if [ -d "libsnes-s9x" ]; then if [ -d "libretro-s9x" ]; then
echo "=== Building SNES9x ===" echo "=== Building SNES9x ==="
cd libsnes-s9x/unix cd libretro-s9x/libretro
make -j4 || die "Failed to build SNES9x" make -j4 || die "Failed to build SNES9x"
cp libsnes.so ../libsnes-snes9x.so cp libretro.so ../libretro-snes9x.so
cd ../.. cd ../..
else else
echo "SNES9x not fetched, skipping ..." echo "SNES9x not fetched, skipping ..."
fi fi
} }
build_libsnes_s9x_next() build_libretro_s9x_next()
{ {
if [ -d "libsnes-s9x-next" ]; then if [ -d "libretro-s9x-next" ]; then
echo "=== Building SNES9x-Next ===" echo "=== Building SNES9x-Next ==="
cd libsnes-s9x-next/ cd libretro-s9x-next/
make -f Makefile.libsnes -j4 || die "Failed to build SNES9x-Next" make -f Makefile.libretro -j4 || die "Failed to build SNES9x-Next"
cp libsnes.so libsnes-snes9x-next.so cp libretro.so libretro-snes9x-next.so
cd .. cd ..
else else
echo "SNES9x-Next not fetched, skipping ..." echo "SNES9x-Next not fetched, skipping ..."
fi fi
} }
build_libsnes_genplus() build_libretro_genplus()
{ {
if [ -d "libsnes-genplus" ]; then if [ -d "libretro-genplus" ]; then
echo "=== Building Genplus GX ===" echo "=== Building Genplus GX ==="
cd libsnes-genplus/ cd libretro-genplus/
make -f Makefile.libsnes -j4 || die "Failed to build Genplus GX" make -f Makefile.libretro -j4 || die "Failed to build Genplus GX"
cp libsnes.so libsnes-genplus.so cp libretro.so libretro-genplus.so
cd .. cd ..
else else
echo "Genplus GX not fetched, skipping ..." echo "Genplus GX not fetched, skipping ..."
fi fi
} }
build_libsnes_fba() build_libretro_fba()
{ {
if [ -d "libsnes-fba" ]; then if [ -d "libretro-fba" ]; then
echo "=== Building Final Burn Alpha ===" echo "=== Building Final Burn Alpha ==="
cd libsnes-fba/ cd libretro-fba/
./compile_libsnes.sh make || die "Failed to build Final Burn Alpha" ./compile_libretro.sh make || die "Failed to build Final Burn Alpha"
cp src-0.2.97.21/libsnes.so libsnes-fba.so cp src-0.2.97.24/libretro.so libretro-fba.so
cd .. cd ..
else else
echo "Final Burn Alpha not fetched, skipping ..." echo "Final Burn Alpha not fetched, skipping ..."
fi fi
} }
build_libsnes_vba() build_libretro_vba()
{ {
if [ -d "libsnes-vba" ]; then if [ -d "libretro-vba" ]; then
echo "=== Building VBA-Next ===" echo "=== Building VBA-Next ==="
cd libsnes-vba/ cd libretro-vba/
make -f Makefile.libsnes -j4 || die "Failed to build VBA-Next" make -f Makefile.libretro -j4 || die "Failed to build VBA-Next"
cp libsnes.so libsnes-vba.so cp libretro.so libretro-vba.so
cd .. cd ..
else else
echo "VBA-Next not fetched, skipping ..." echo "VBA-Next not fetched, skipping ..."
fi fi
} }
build_libsnes_bnes() build_libretro_bnes()
{ {
if [ -d "libsnes-bnes" ]; then if [ -d "libretro-bnes" ]; then
echo "=== Building bNES ===" echo "=== Building bNES ==="
cd libsnes-bnes cd libretro-bnes
mkdir -p obj mkdir -p obj
make -j4 || die "Failed to build bNES" make -j4 || die "Failed to build bNES"
cp libnes.so libsnes-bnes.so cp libretro.so libretro-bnes.so
cd .. cd ..
else else
echo "bNES not fetched, skipping ..." echo "bNES not fetched, skipping ..."
fi fi
} }
build_libsnes_fceu() build_libretro_fceu()
{ {
if [ -d "libsnes-fceu" ]; then if [ -d "libretro-fceu" ]; then
echo "=== Building FCEU ===" echo "=== Building FCEU ==="
cd libsnes-fceu cd libretro-fceu
make -f Makefile.libsnes-fceumm -j4 || die "Failed to build FCEU" make -f Makefile.libretro-fceumm -j4 || die "Failed to build FCEU"
cp libsnes.so libsnes-fceu.so cp libretro.so libretro-fceu.so
cd .. cd ..
else else
echo "FCEU not fetched, skipping ..." echo "FCEU not fetched, skipping ..."
fi fi
} }
build_libsnes_gambatte() build_libretro_gambatte()
{ {
if [ -d "libsnes-gambatte" ]; then if [ -d "libretro-gambatte" ]; then
echo "=== Building Gambatte ===" echo "=== Building Gambatte ==="
cd libsnes-gambatte/libgambatte cd libretro-gambatte/libgambatte
make -j4 || die "Failed to build Gambatte" make -f Makefile.libretro -j4 || die "Failed to build Gambatte"
cd libsnes cp libretro.so ../libretro-gambatte.so
make -j4 || die "Failed to build Gambatte" cd ../..
cp libsnes.so ../../libsnes-gambatte.so
cd ../../..
else else
echo "Gambatte not fetched, skipping ..." echo "Gambatte not fetched, skipping ..."
fi fi
} }
build_libsnes_meteor() build_libretro_meteor()
{ {
if [ -d "libsnes-meteor" ]; then if [ -d "libretro-meteor" ]; then
echo "=== Building Meteor ===" echo "=== Building Meteor ==="
cd libsnes-meteor/libsnes cd libretro-meteor/libretro
make -j4 || die "Failed to build Meteor" make -j4 || die "Failed to build Meteor"
cp libsnes.so ../libsnes-meteor.so cp libretro.so ../libretro-meteor.so
cd ../ cd ../
else else
echo "Meteor not fetched, skipping ..." echo "Meteor not fetched, skipping ..."
@ -158,14 +156,14 @@ build_libsnes_meteor()
} }
build_libsnes build_libretro_bsnes
build_libsnes_s9x build_libretro_s9x
build_libsnes_s9x_next build_libretro_s9x_next
build_libsnes_genplus build_libretro_genplus
build_libsnes_fba build_libretro_fba
build_libsnes_vba build_libretro_vba
build_libsnes_bnes build_libretro_bnes
build_libsnes_fceu build_libretro_fceu
build_libsnes_gambatte build_libretro_gambatte
build_libsnes_meteor build_libretro_meteor

View File

@ -51,14 +51,14 @@ fetch_project()
REPO_BASE="git://github.com" REPO_BASE="git://github.com"
fetch_project_bsnes "$REPO_BASE/Themaister/libsnes.git" "libsnes" "libsnes/bSNES" fetch_project_bsnes "$REPO_BASE/Themaister/bsnes-libretro.git" "libretro-bsnes" "libretro/bSNES"
fetch_project "$REPO_BASE/Themaister/snes9x-libsnes.git" "libsnes-s9x" "libsnes/SNES9x" fetch_project "$REPO_BASE/snes9xgit/snes9x.git" "libretro-s9x" "libretro/SNES9x"
fetch_project "$REPO_BASE/twinaphex/snes9x-next.git" "libsnes-s9x-next" "libsnes/SNES9x-Next" fetch_project "$REPO_BASE/twinaphex/snes9x-next.git" "libretro-s9x-next" "libretro/SNES9x-Next"
fetch_project "$REPO_BASE/twinaphex/genesis-next.git" "libsnes-genplus" "libsnes/Genplus GX" fetch_project "$REPO_BASE/twinaphex/genesis-next.git" "libretro-genplus" "libretro/Genplus GX"
fetch_project "$REPO_BASE/twinaphex/fba-next-slim.git" "libsnes-fba" "libsnes/FBA" fetch_project "$REPO_BASE/twinaphex/fba-libretro.git" "libretro-fba" "libretro/FBA"
fetch_project "$REPO_BASE/twinaphex/vba-next.git" "libsnes-vba" "libsnes/VBA" fetch_project "$REPO_BASE/twinaphex/vba-next.git" "libretro-vba" "libretro/VBA"
fetch_project "$REPO_BASE/Themaister/bnes-libsnes.git" "libsnes-bnes" "libsnes/bNES" fetch_project "$REPO_BASE/Themaister/bnes-libretro.git" "libretro-bnes" "libretro/bNES"
fetch_project "$REPO_BASE/twinaphex/fceu-next.git" "libsnes-fceu" "libsnes/FCEU" fetch_project "$REPO_BASE/twinaphex/fceu-next.git" "libretro-fceu" "libretro/FCEU"
fetch_project "$REPO_BASE/Themaister/gambatte-libsnes.git" "libsnes-gambatte" "libsnes/Gambatte" fetch_project "$REPO_BASE/Themaister/gambatte-libretro.git" "libretro-gambatte" "libretro/Gambatte"
fetch_project "git://git.code.sf.net/p/meteorgba/code.git" "libsnes-meteor" "libsnes/Meteor" fetch_project "$REPO_BASE/Themaister/meteor-libretro.git" "libretro-meteor" "libretro/Meteor"

View File

@ -1,33 +1,33 @@
#!/bin/sh #!/bin/sh
if [ -z "$1" ]; then if [ -z "$1" ]; then
LIBSNES_DIR="/usr/local/lib/libsnes" LIBRETRO_DIR="/usr/local/lib/libretro"
else else
LIBSNES_DIR="$1" LIBRETRO_DIR="$1"
fi fi
if [ ! -d "$PREFIX/lib/libsnes" ]; then if [ ! -d "$PREFIX/lib/libretro" ]; then
mkdir -p "$LIBSNES_DIR" mkdir -p "$LIBRETRO_DIR"
fi fi
LIBS="" LIBS=""
LIBS="$LIBS libsnes/libsnes-performance.so" LIBS="$LIBS libretro-bsnes/libretro-performance.so"
LIBS="$LIBS libsnes/libsnes-compat.so" LIBS="$LIBS libretro-bsnes/libretro-compat.so"
LIBS="$LIBS libsnes/libsnes-accuracy.so" LIBS="$LIBS libretro-bsnes/libretro-accuracy.so"
LIBS="$LIBS libsnes-s9x/libsnes-snes9x.so" LIBS="$LIBS libretro-s9x/libretro-snes9x.so"
LIBS="$LIBS libsnes-s9x-next/libsnes-snes9x-next.so" LIBS="$LIBS libretro-s9x-next/libretro-snes9x-next.so"
LIBS="$LIBS libsnes-genplus/libsnes-genplus.so" LIBS="$LIBS libretro-genplus/libretro-genplus.so"
LIBS="$LIBS libsnes-fba/libsnes-fba.so" LIBS="$LIBS libretro-fba/libretro-fba.so"
LIBS="$LIBS libsnes-vba/libsnes-vba.so" LIBS="$LIBS libretro-vba/libretro-vba.so"
LIBS="$LIBS libsnes-fceu/libsnes-fceu.so" LIBS="$LIBS libretro-fceu/libretro-fceu.so"
LIBS="$LIBS libsnes-bnes/libsnes-bnes.so" LIBS="$LIBS libretro-bnes/libretro-bnes.so"
LIBS="$LIBS libsnes-gambatte/libsnes-gambatte.so" LIBS="$LIBS libretro-gambatte/libretro-gambatte.so"
LIBS="$LIBS libsnes-meteor/libsnes-meteor.so" LIBS="$LIBS libretro-meteor/libretro-meteor.so"
for lib in $LIBS for lib in $LIBS
do do
if [ -f $lib ]; then if [ -f $lib ]; then
install -v -m644 $lib "$LIBSNES_DIR" install -v -m644 $lib "$LIBRETRO_DIR"
else else
echo "Library $lib not found, skipping ..." echo "Library $lib not found, skipping ..."
fi fi