2013-02-10 17:30:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-07-12 15:31:12 +00:00
|
|
|
# BSDs don't have readlink -f
|
|
|
|
read_link()
|
|
|
|
{
|
|
|
|
TARGET_FILE="$1"
|
|
|
|
cd $(dirname "$TARGET_FILE")
|
|
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
|
|
|
|
|
|
while [ -L "$TARGET_FILE" ]
|
|
|
|
do
|
|
|
|
TARGET_FILE=$(readlink "$TARGET_FILE")
|
|
|
|
cd $(dirname "$TARGET_FILE")
|
|
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
|
|
done
|
|
|
|
|
|
|
|
PHYS_DIR=$(pwd -P)
|
|
|
|
RESULT="$PHYS_DIR/$TARGET_FILE"
|
|
|
|
echo $RESULT
|
|
|
|
}
|
|
|
|
|
|
|
|
SCRIPT=$(read_link "$0")
|
|
|
|
echo "Script: $SCRIPT"
|
2013-04-29 20:12:35 +00:00
|
|
|
BASE_DIR=$(dirname $SCRIPT)
|
|
|
|
RARCH_DIR=$BASE_DIR/dist
|
2013-04-29 20:36:13 +00:00
|
|
|
RARCH_DIST_DIR=$RARCH_DIR/android
|
2013-05-18 00:11:06 +00:00
|
|
|
FORMAT_EXT=so
|
2013-07-12 15:31:12 +00:00
|
|
|
|
|
|
|
if [ -z "$JOBS" ]; then
|
|
|
|
JOBS=4
|
|
|
|
fi
|
2013-02-10 17:30:38 +00:00
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo $1
|
|
|
|
#exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_mednafen()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
pwd
|
|
|
|
if [ -d "libretro-mednafen" ]; then
|
2013-07-31 13:37:07 +00:00
|
|
|
echo "=== Building Mednafen cores ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-mednafen
|
2013-02-10 17:30:38 +00:00
|
|
|
cd jni
|
2013-07-31 13:37:07 +00:00
|
|
|
echo "=== Building Mednafen NGP ==="
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_ngp"
|
|
|
|
ndk-build core=ngp clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_ngp"
|
|
|
|
ndk-build core=ngp -j$JOBS APP_ABI="armeabi-v7a mips x86" || die "Failed to build mednafen_ngp"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_mednafen_ngp.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_mednafen_ngp.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_mednafen_ngp.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-07-31 13:37:07 +00:00
|
|
|
echo "=== Building Mednafen WonderSwan ==="
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_wswan"
|
|
|
|
ndk-build core=wswan clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_wswan"
|
|
|
|
ndk-build core=wswan -j$JOBS APP_ABI="armeabi-v7a mips x86" || die "Failed to build mednafen_wswan"
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_mednafen_wswan.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_mednafen_wswan.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_mednafen_wswan.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-07-31 13:37:07 +00:00
|
|
|
echo "=== Building Mednafen VirtualBoy ==="
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_vb"
|
|
|
|
ndk-build core=vb clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_vb"
|
|
|
|
ndk-build core=vb -j$JOBS APP_ABI="armeabi-v7a mips x86" || die "Failed to build mednafen_vb"
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_mednafen_vb.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_mednafen_vb.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_mednafen_vb.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-07-31 13:37:07 +00:00
|
|
|
echo "=== Building Mednafen PCE Fast ==="
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_pce_fast"
|
|
|
|
ndk-build core=pce-fast clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_pce_fast"
|
|
|
|
ndk-build core=pce-fast -j$JOBS APP_ABI="armeabi-v7a mips x86" || die "Failed to build mednafen_pce_fast"
|
2013-02-10 17:30:38 +00:00
|
|
|
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_mednafen_pce_fast.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_mednafen_pce_fast.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_mednafen_pce_fast.${FORMAT_EXT}
|
2013-07-31 13:37:07 +00:00
|
|
|
|
|
|
|
echo "=== Building Mednafen PSX ==="
|
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_psx"
|
|
|
|
ndk-build core=psx clean APP_ABI="armeabi-v7a mips x86" || die "Failed to clean mednafen_psx"
|
|
|
|
ndk-build core=psx -j$JOBS APP_ABI="armeabi-v7a mips x86" || die "Failed to build mednafen_psx"
|
|
|
|
|
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_mednafen_psx.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_mednafen_psx.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_mednafen_psx.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Mednafen not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-07-31 10:49:36 +00:00
|
|
|
build_libretro_s9x()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-s9x" ]; then
|
|
|
|
echo "=== Building SNES9x ==="
|
|
|
|
cd libretro-s9x/
|
|
|
|
cd libretro/jni
|
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_snes9x.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_snes9x.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_snes9x.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "SNES9x not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-02-10 17:30:38 +00:00
|
|
|
build_libretro_s9x_next()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-s9x-next" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building SNES9x-Next ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-s9x-next/
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_snes9x_next.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_snes9x_next.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_snes9x_next.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "SNES9x-Next not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-07-31 00:05:30 +00:00
|
|
|
build_libretro_stella()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-stella" ]; then
|
|
|
|
echo "=== Building Stella ==="
|
|
|
|
cd libretro-stella/
|
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-07-31 00:05:30 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_stella.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_stella.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_stella.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "Stella not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-02-10 17:30:38 +00:00
|
|
|
build_libretro_genplus()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-genplus" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building Genplus GX ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-genplus/
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_genesis_plus_gx.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_genesis_plus_gx.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_genesis_plus_gx.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Genplus GX not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-07-31 13:47:58 +00:00
|
|
|
build_libretro_fba_full()
|
2013-02-10 17:30:38 +00:00
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-fba" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building Final Burn Alpha ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-fba
|
|
|
|
cd svn-current/trunk
|
2013-02-10 17:30:38 +00:00
|
|
|
cd projectfiles/libretro-android/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_fba.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_fba.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_fba.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Final Burn Alpha not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-08-15 12:50:25 +00:00
|
|
|
build_libretro_vba_next()
|
2013-02-10 17:30:38 +00:00
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
2013-08-15 12:50:25 +00:00
|
|
|
if [ -d "libretro-vba-next" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building VBA-Next ==="
|
2013-08-15 12:50:25 +00:00
|
|
|
cd libretro-vba-next/
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_vba_next.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_vba_next.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_vba_next.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "VBA-Next not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_fceu()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-fceu" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building FCEU ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-fceu
|
2013-02-10 17:30:38 +00:00
|
|
|
cd fceumm-code/src/drivers/libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_fceumm.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_fceumm.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_fceumm.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "FCEU not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_gambatte()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-gambatte" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building Gambatte ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-gambatte/libgambatte
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_gambatte.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_gambatte.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_gambatte.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Gambatte not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_nx()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-nx" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building NXEngine ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-nx
|
2013-02-10 17:30:38 +00:00
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_nxengine.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_nxengine.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_nxengine.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "NXEngine not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_prboom()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-prboom" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building PRBoom ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-prboom
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_prboom.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_prboom.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_prboom.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "PRBoom not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_nestopia()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-nestopia" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building Nestopia ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-nestopia/libretro
|
2013-02-10 17:30:38 +00:00
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_nestopia.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_nestopia.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_nestopia.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Nestopia not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_pcsx_rearmed()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
pwd
|
|
|
|
if [ -d "libretro-pcsx-rearmed" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building PCSX ReARMed ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-pcsx-rearmed
|
2013-02-10 17:30:38 +00:00
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI=armeabi-v7a
|
2013-07-31 00:13:53 +00:00
|
|
|
ndk-build -j$JOBS NO_NEON=1 APP_ABI=armeabi-v7a
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro-noneon.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_pcsx_rearmed.${FORMAT_EXT}
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI=armeabi-v7a
|
2013-07-31 00:13:53 +00:00
|
|
|
ndk-build -j$JOBS APP_ABI=armeabi-v7a
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_pcsx_rearmed-neon.${FORMAT_EXT}
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "PCSX ReARMed not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-03-10 17:16:49 +00:00
|
|
|
build_libretro_tyrquake()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-tyrquake" ]; then
|
2013-03-10 17:16:49 +00:00
|
|
|
echo "=== Building TyrQuake ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-tyrquake
|
2013-03-10 17:16:49 +00:00
|
|
|
cd libretro/jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 00:11:06 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_tyrquake.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_tyrquake.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_tyrquake.${FORMAT_EXT}
|
2013-03-10 17:16:49 +00:00
|
|
|
else
|
|
|
|
echo "TyrQuake not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-18 01:31:59 +00:00
|
|
|
build_libretro_modelviewer()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-gl-modelviewer" ]; then
|
|
|
|
echo "=== Building Modelviewer (GL) ==="
|
|
|
|
cd libretro-gl-modelviewer
|
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 01:31:59 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_modelviewer.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_modelviewer.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_modelviewer.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "ModelViewer not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-08-04 20:59:05 +00:00
|
|
|
build_libretro_instancingviewer()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-gl-instancingviewer" ]; then
|
|
|
|
echo "=== Building InstancingViewer (GL) ==="
|
|
|
|
cd libretro-gl-instancingviewer
|
|
|
|
cd jni
|
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_instancingviewer.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_instancingviewer.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_instancingviewer.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "InstancingViewer not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-05-18 01:31:59 +00:00
|
|
|
build_libretro_scenewalker()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-gl-scenewalker" ]; then
|
|
|
|
echo "=== Building SceneWalker (GL) ==="
|
|
|
|
cd libretro-gl-scenewalker
|
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
2013-05-18 01:31:59 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_scenewalker.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/mips/libretro_scenewalker.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_scenewalker.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "SceneWalker not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-06-30 16:01:11 +00:00
|
|
|
build_libretro_picodrive()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-picodrive" ]; then
|
|
|
|
echo "=== Building Picodrive ==="
|
|
|
|
cd libretro-picodrive
|
|
|
|
cd jni
|
2013-07-31 10:49:36 +00:00
|
|
|
ndk-build clean APP_ABI=armeabi-v7a
|
2013-07-31 00:13:53 +00:00
|
|
|
ndk-build -j$JOBS APP_ABI=armeabi-v7a
|
2013-07-31 00:05:30 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro_picodrive.${FORMAT_EXT} "$RARCH_DIST_DIR"/armeabi-v7a/libretro_picodrive.${FORMAT_EXT}
|
2013-06-30 16:01:11 +00:00
|
|
|
else
|
|
|
|
echo "Picodrive not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
2013-07-31 13:37:07 +00:00
|
|
|
|
|
|
|
build_libretro_desmume()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-desmume" ]; then
|
|
|
|
echo "=== Building Desmume ==="
|
|
|
|
cd libretro-desmume
|
|
|
|
cd jni
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS APP_ABI=armeabi-v7a
|
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} "$RARCH_DIST_DIR"/armeabi-v7a/libretro_desmume.${FORMAT_EXT}
|
|
|
|
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS APP_ABI=x86
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} "$RARCH_DIST_DIR"/x86/libretro_desmume.${FORMAT_EXT}
|
|
|
|
else
|
2013-07-31 13:47:58 +00:00
|
|
|
echo "Desmume not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_quicknes()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-quicknes" ]; then
|
|
|
|
echo "=== Building QuickNES ==="
|
|
|
|
cd libretro-quicknes
|
|
|
|
cd libretro/jni
|
|
|
|
ndk-build clean APP_ABI="armeabi-v7a mips x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a mips x86"
|
|
|
|
cp ../libs/armeabi-v7a/libretro.${FORMAT_EXT} "$RARCH_DIST_DIR"/armeabi-v7a/libretro_quicknes.${FORMAT_EXT}
|
|
|
|
cp ../libs/mips/libretro.${FORMAT_EXT} "$RARCH_DIST_DIR"/mips/libretro_quicknes.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro.${FORMAT_EXT} "$RARCH_DIST_DIR"/x86/libretro_quicknes.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "QuickNES not fetched, skipping ..."
|
2013-07-31 13:37:07 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
create_dist_dir()
|
|
|
|
{
|
|
|
|
if [ -d $RARCH_DIR ]; then
|
|
|
|
echo "Directory $RARCH_DIR already exists, skipping creation..."
|
|
|
|
else
|
|
|
|
mkdir $RARCH_DIR
|
|
|
|
fi
|
|
|
|
|
2013-04-29 20:36:13 +00:00
|
|
|
if [ -d $RARCH_DIST_DIR ]; then
|
|
|
|
echo "Directory $RARCH_DIST_DIR already exists, skipping creation..."
|
2013-04-29 20:12:35 +00:00
|
|
|
else
|
2013-04-29 20:36:13 +00:00
|
|
|
mkdir $RARCH_DIST_DIR
|
2013-04-29 20:12:35 +00:00
|
|
|
fi
|
|
|
|
|
2013-04-29 20:36:13 +00:00
|
|
|
if [ -d $RARCH_DIST_DIR/armeabi-v7a ]; then
|
|
|
|
echo "Directory $RARCH_DIST_DIR/armeabi-v7a already exists, skipping creation..."
|
2013-04-29 20:12:35 +00:00
|
|
|
else
|
2013-04-29 20:36:13 +00:00
|
|
|
mkdir $RARCH_DIST_DIR/armeabi-v7a
|
2013-04-29 20:12:35 +00:00
|
|
|
fi
|
|
|
|
|
2013-04-29 20:36:13 +00:00
|
|
|
if [ -d $RARCH_DIST_DIR/mips ]; then
|
|
|
|
echo "Directory $RARCH_DIST_DIR/mips already exists, skipping creation..."
|
2013-04-29 20:12:35 +00:00
|
|
|
else
|
2013-04-29 20:36:13 +00:00
|
|
|
mkdir $RARCH_DIST_DIR/mips
|
2013-04-29 20:12:35 +00:00
|
|
|
fi
|
|
|
|
|
2013-04-29 20:36:13 +00:00
|
|
|
if [ -d $RARCH_DIST_DIR/x86 ]; then
|
|
|
|
echo "Directory $RARCH_DIST_DIR/x86 already exists, skipping creation..."
|
2013-04-29 20:12:35 +00:00
|
|
|
else
|
2013-04-29 20:36:13 +00:00
|
|
|
mkdir $RARCH_DIST_DIR/x86
|
2013-04-29 20:12:35 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-09-06 06:01:33 +00:00
|
|
|
build_libretro_bsnes_performance()
|
|
|
|
{
|
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-bsnes" ]; then
|
|
|
|
echo "=== Building bsnes (performance core) ==="
|
|
|
|
cd libretro-bsnes/perf
|
|
|
|
cd target-libretro/jni
|
|
|
|
ndk-build clean APP_ABI="armeabi-v7a x86"
|
|
|
|
ndk-build -j$JOBS APP_ABI="armeabi-v7a x86"
|
|
|
|
cp ../libs/armeabi-v7a/libretro_bsnes_performance.${FORMAT_EXT} $RARCH_DIST_DIR/armeabi-v7a/libretro_bsnes_performance.${FORMAT_EXT}
|
|
|
|
cp ../libs/x86/libretro_bsnes_performance.${FORMAT_EXT} $RARCH_DIST_DIR/x86/libretro_bsnes_performance.${FORMAT_EXT}
|
|
|
|
else
|
|
|
|
echo "bsnes not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
create_dist_dir
|
|
|
|
|
2013-05-03 15:22:09 +00:00
|
|
|
if [ $1 ]; then
|
|
|
|
$1
|
|
|
|
else
|
|
|
|
build_libretro_pcsx_rearmed
|
|
|
|
build_libretro_mednafen
|
2013-07-31 10:49:36 +00:00
|
|
|
build_libretro_s9x
|
2013-05-03 15:22:09 +00:00
|
|
|
build_libretro_s9x_next
|
|
|
|
build_libretro_genplus
|
2013-07-31 13:47:58 +00:00
|
|
|
build_libretro_fba_full
|
2013-08-15 12:50:25 +00:00
|
|
|
build_libretro_vba_next
|
2013-05-03 15:22:09 +00:00
|
|
|
build_libretro_fceu
|
|
|
|
build_libretro_gambatte
|
|
|
|
build_libretro_nx
|
|
|
|
build_libretro_prboom
|
2013-07-31 13:47:58 +00:00
|
|
|
build_libretro_stella
|
|
|
|
build_libretro_quicknes
|
2013-07-31 13:37:07 +00:00
|
|
|
build_libretro_desmume
|
2013-05-03 15:22:09 +00:00
|
|
|
build_libretro_nestopia
|
|
|
|
build_libretro_tyrquake
|
2013-05-18 01:31:59 +00:00
|
|
|
build_libretro_modelviewer
|
2013-08-04 20:59:05 +00:00
|
|
|
build_libretro_instancingviewer
|
2013-05-18 01:31:59 +00:00
|
|
|
build_libretro_scenewalker
|
2013-07-31 13:47:58 +00:00
|
|
|
build_libretro_picodrive
|
2013-09-06 06:01:33 +00:00
|
|
|
build_libretro_bsnes_performance
|
2013-05-03 15:22:09 +00:00
|
|
|
fi
|