1
0
mirror of https://github.com/libretro/libretro-super synced 2025-02-15 03:40:32 +00:00

Initial commit.

This commit is contained in:
Themaister 2011-11-02 16:27:23 +01:00
commit 3039887257
3 changed files with 239 additions and 0 deletions

144
libsnes-build.sh Executable file

@ -0,0 +1,144 @@
#!/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
./configure || die "Failed to build SNES9x"
make -j4 || die "Failed to build SNES9x"
cp libsnes.so ../libsnes-snes9x.so
cd ../..
else
echo "SNES9x not fetched, skipping ..."
fi
}
build_libsnes_genplus()
{
if [ -d "libsnes-genplus" ]; then
echo "=== Building Genplus GX ==="
cd libsnes-genplus/src/libsnes
make -j4 || die "Failed to build Genplus GX"
cp libsnes.so ../../libsnes-genplus.so
cd ../../..
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 ==="
cd libsnes-vba/trunk/platform/libsnes-gba
make -j4 || die "Failed to build VBA-Next"
cp libsnes.so ../../../libsnes-vba.so
cd ../../../..
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 ==="
cd libsnes-fceu/src/libsnes
make -j4 || die "Failed to build FCEU"
cp libsnes.so ../../libsnes-fceu.so
cd ../../..
else
echo "bNES not fetched, skipping ..."
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
build_libsnes_genplus
build_libsnes_fba
build_libsnes_vba
build_libsnes_bnes
build_libsnes_fceu
build_libsnes_gambatte

62
libsnes-fetch.sh Executable file

@ -0,0 +1,62 @@
#!/bin/sh
REPO_BASE="git://github.com"
# Keep three copies so we don't have to rebuild stuff all the time.
fetch_project_bsnes()
{
echo "=== Fetching $3 ==="
if [ -d "$2" ]; then
cd "$2"
git pull
cd ..
else
git clone "$REPO_BASE/$1" "$2"
fi
if [ -d "$2" ]; then
cd "$2"
if [ -d "perf" ]; then
cd perf
git pull ..
cd ..
else
git clone . perf
fi
if [ -d "compat" ]; then
cd perf
git pull ..
cd ..
else
git clone . compat
fi
cd ..
fi
}
fetch_project()
{
echo "=== Fetching $3 ==="
if [ -d "$2" ]; then
cd "$2"
git pull
cd ..
else
git clone "$REPO_BASE/$1" "$2"
fi
echo "=== Fetched ==="
}
fetch_project_bsnes "Themaister/libsnes.git" "libsnes" "libsnes/bSNES"
fetch_project "Themaister/snes9x-libsnes.git" "libsnes-s9x" "libsnes/SNES9x"
fetch_project "twinaphex/genesis-next.git" "libsnes-genplus" "libsnes/Genplus GX"
fetch_project "twinaphex/fba-next-slim.git" "libsnes-fba" "libsnes/FBA"
fetch_project "twinaphex/vba-next.git" "libsnes-vba" "libsnes/VBA"
fetch_project "Themaister/bnes-libsnes.git" "libsnes-bnes" "libsnes/bNES"
fetch_project "twinaphex/fceu-next.git" "libsnes-fceu" "libsnes/FCEU"
fetch_project "Themaister/gambatte-libsnes.git" "libsnes-gambatte" "libsnes/Gambatte"

33
libsnes-install.sh Executable file

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