2013-02-10 17:30:38 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
SCRIPT=$(readlink -f $0)
|
|
|
|
BASE_DIR=$(dirname $SCRIPT)
|
|
|
|
RARCH_DIR=$BASE_DIR/dist
|
2013-02-10 17:30:38 +00:00
|
|
|
JOBS=7
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
echo $RARCH_DIR
|
|
|
|
|
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-02-10 17:30:38 +00:00
|
|
|
echo "=== Building Mednafen ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-mednafen
|
2013-02-10 17:30:38 +00:00
|
|
|
cd jni
|
|
|
|
ndk-build clean || die "Failed to clean mednafen_ngp"
|
|
|
|
ndk-build core=ngp clean || die "Failed to clean mednafen_ngp"
|
|
|
|
ndk-build core=ngp -j$JOBS || die "Failed to build mednafen_ngp"
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_mednafen_ngp.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_mednafen_ngp.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_mednafen_ngp.so
|
2013-02-10 17:30:38 +00:00
|
|
|
|
|
|
|
ndk-build clean || die "Failed to clean mednafen_wswan"
|
|
|
|
ndk-build core=wswan clean || die "Failed to clean mednafen_wswan"
|
|
|
|
ndk-build core=wswan -j$JOBS || die "Failed to build mednafen_wswan"
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_mednafen_wswan.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_mednafen_wswan.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_mednafen_wswan.so
|
2013-02-10 17:30:38 +00:00
|
|
|
|
|
|
|
ndk-build clean || die "Failed to clean mednafen_vb"
|
|
|
|
ndk-build core=vb clean || die "Failed to clean mednafen_vb"
|
|
|
|
ndk-build core=vb -j$JOBS || die "Failed to build mednafen_vb"
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_mednafen_vb.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_mednafen_vb.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_mednafen_vb.so
|
2013-02-10 17:30:38 +00:00
|
|
|
|
|
|
|
ndk-build clean || die "Failed to clean mednafen_pce_fast"
|
|
|
|
ndk-build core=pce-fast clean || die "Failed to clean mednafen_pce_fast"
|
|
|
|
ndk-build core=pce-fast -j$JOBS || die "Failed to build mednafen_pce_fast"
|
|
|
|
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_mednafen_pce_fast.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_mednafen_pce_fast.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_mednafen_pce_fast.so
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Mednafen not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_snes9x_next.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_snes9x_next.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_snes9x_next.so
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "SNES9x-Next not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_genesis_plus_gx.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_genesis_plus_gx.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_genesis_plus_gx.so
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Genplus GX not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_fba()
|
|
|
|
{
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_fba.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_fba.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_fba.so
|
2013-02-10 17:30:38 +00:00
|
|
|
else
|
|
|
|
echo "Final Burn Alpha not fetched, skipping ..."
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
build_libretro_vba()
|
|
|
|
{
|
2013-04-29 20:12:35 +00:00
|
|
|
cd $BASE_DIR
|
|
|
|
if [ -d "libretro-vba" ]; then
|
2013-02-10 17:30:38 +00:00
|
|
|
echo "=== Building VBA-Next ==="
|
2013-04-29 20:12:35 +00:00
|
|
|
cd libretro-vba/
|
2013-02-10 17:30:38 +00:00
|
|
|
cd libretro/jni
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_vba_next.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_vba_next.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_vba_next.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_fceumm.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_fceumm.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_fceumm.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_gambatte.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_gambatte.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_gambatte.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_nxengine.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_nxengine.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_nxengine.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_prboom.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_prboom.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_prboom.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_nestopia.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_nestopia.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_nestopia.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS NO_NEON=1
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro-noneon.so $RARCH_DIR/android/armeabi-v7a/libretro_pcsx_rearmed.so
|
2013-02-10 17:30:38 +00:00
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_pcsx_rearmed-neon.so
|
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
|
|
|
|
ndk-build clean
|
|
|
|
ndk-build -j$JOBS
|
2013-04-29 20:12:35 +00:00
|
|
|
cp ../libs/armeabi-v7a/libretro.so $RARCH_DIR/android/armeabi-v7a/libretro_tyrquake.so
|
|
|
|
cp ../libs/mips/libretro.so $RARCH_DIR/android/mips/libretro_tyrquake.so
|
|
|
|
cp ../libs/x86/libretro.so $RARCH_DIR/android/x86/libretro_tyrquake.so
|
2013-03-10 17:16:49 +00:00
|
|
|
else
|
|
|
|
echo "TyrQuake not fetched, skipping ..."
|
|
|
|
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
|
|
|
|
|
|
|
|
if [ -d $RARCH_DIR/android ]; then
|
|
|
|
echo "Directory $RARCH_DIR/android already exists, skipping creation..."
|
|
|
|
else
|
|
|
|
mkdir $RARCH_DIR/android
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $RARCH_DIR/android/armeabi-v7a ]; then
|
|
|
|
echo "Directory $RARCH_DIR/android/armeabi-v7a already exists, skipping creation..."
|
|
|
|
else
|
|
|
|
mkdir $RARCH_DIR/android/armeabi-v7a
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $RARCH_DIR/android/mips ]; then
|
|
|
|
echo "Directory $RARCH_DIR/android/mips already exists, skipping creation..."
|
|
|
|
else
|
|
|
|
mkdir $RARCH_DIR/android/mips
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d $RARCH_DIR/android/x86 ]; then
|
|
|
|
echo "Directory $RARCH_DIR/android/x86 already exists, skipping creation..."
|
|
|
|
else
|
|
|
|
mkdir $RARCH_DIR/android/x86
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
create_dist_dir
|
|
|
|
|
2013-02-10 17:30:38 +00:00
|
|
|
build_libretro_pcsx_rearmed
|
|
|
|
build_libretro_mednafen
|
|
|
|
build_libretro_s9x_next
|
|
|
|
build_libretro_genplus
|
|
|
|
build_libretro_fba
|
|
|
|
build_libretro_vba
|
|
|
|
build_libretro_fceu
|
|
|
|
build_libretro_gambatte
|
|
|
|
build_libretro_nx
|
|
|
|
build_libretro_prboom
|
|
|
|
build_libretro_nestopia
|
2013-03-10 17:16:49 +00:00
|
|
|
build_libretro_tyrquake
|