libretro-super/libretro-build-android-mk.sh

921 lines
28 KiB
Bash
Raw Normal View History

2013-12-09 01:10:42 +00:00
#!/bin/bash
2013-02-10 17:30:38 +00:00
. ./libretro-config.sh
#split TARGET_ABI string into an array we can iterate over
IFS=' ' read -ra ABIS <<< "$TARGET_ABIS"
# 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"
BASE_DIR=$(dirname $SCRIPT)
RARCH_DIR=$BASE_DIR/dist
RARCH_DIST_DIR=$RARCH_DIR/android
FORMAT=_android
2013-05-18 00:11:06 +00:00
FORMAT_EXT=so
2013-02-10 17:30:38 +00:00
die()
{
echo $1
#exit 1
}
2014-06-22 23:50:36 +00:00
build_libretro_beetle_bsnes()
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-bsnes"
2014-06-22 23:50:36 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-22 23:50:36 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_bsnes_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-22 23:50:36 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-22 23:50:36 +00:00
fi
}
2014-06-22 22:41:47 +00:00
build_libretro_beetle_lynx()
2013-02-10 17:30:38 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-lynx"
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2013-02-10 17:30:38 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_lynx_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
2014-06-22 21:34:25 +00:00
build_libretro_beetle_gba()
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-gba"
2014-06-22 21:34:25 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-22 21:34:25 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_gba_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-22 21:34:25 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-22 21:34:25 +00:00
fi
}
build_libretro_beetle_ngp()
2014-06-21 16:34:11 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-ngp"
2014-06-21 16:34:11 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-21 16:34:11 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_ngp_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-21 16:34:11 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-21 16:34:11 +00:00
fi
}
build_libretro_beetle_wswan()
2014-06-18 18:30:58 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-wswan"
2014-06-18 18:30:58 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-18 18:30:58 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_wswan_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_beetle_psx()
2014-08-11 18:11:34 +00:00
{
CORENAME="beetle-psx"
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_psx_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-18 18:30:58 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-18 18:30:58 +00:00
fi
}
2014-06-22 01:14:12 +00:00
build_libretro_beetle_pcfx()
2014-08-11 18:11:34 +00:00
{
CORENAME="beetle-pcfx"
cd $BASE_DIR
2014-06-22 01:14:12 +00:00
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-22 01:14:12 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_pcfx_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-22 01:14:12 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-22 01:14:12 +00:00
fi
}
build_libretro_beetle_vb()
2014-06-21 16:22:10 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-vb"
2014-06-21 16:22:10 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-21 16:22:10 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_vb_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-21 16:22:10 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-21 16:22:10 +00:00
fi
}
build_libretro_beetle_pce_fast()
2014-06-18 23:38:24 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-pce-fast"
2014-06-18 23:38:24 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-18 23:38:24 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_pce_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-18 23:38:24 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-18 23:38:24 +00:00
fi
}
2014-06-22 03:13:43 +00:00
build_libretro_beetle_supergrafx()
{
2014-08-11 18:11:34 +00:00
CORENAME="beetle-supergrafx"
2014-06-22 03:13:43 +00:00
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
cd libretro-${CORENAME}
2014-06-22 03:13:43 +00:00
cd jni
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/mednafen_supergrafx_libretro${FORMAT}.${FORMAT_EXT}
done
2014-06-22 03:13:43 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-06-22 03:13:43 +00:00
fi
}
build_libretro_s9x()
{
2014-08-11 18:11:34 +00:00
CORENAME="s9x"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/snes9x_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
2013-02-10 17:30:38 +00:00
build_libretro_s9x_next()
{
2014-08-11 18:11:34 +00:00
CORENAME="s9x-next"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2013-02-10 17:30:38 +00:00
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/snes9x_next_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
2014-07-29 17:19:15 +00:00
build_libretro_2048()
{
2014-08-11 18:11:34 +00:00
CORENAME="2048"
2014-07-29 17:19:15 +00:00
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2014-07-29 17:19:15 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2014-07-29 17:19:15 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-07-29 17:19:15 +00:00
fi
}
2013-07-31 00:05:30 +00:00
build_libretro_stella()
{
2014-08-11 18:11:34 +00:00
CORENAME="stella"
2013-07-31 00:05:30 +00:00
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2013-07-31 00:05:30 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2013-07-31 00:05:30 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-07-31 00:05:30 +00:00
fi
}
2013-02-10 17:30:38 +00:00
build_libretro_genplus()
{
2014-08-11 18:11:34 +00:00
CORENAME="genplus"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2013-02-10 17:30:38 +00:00
cd libretro/jni
if [ -z "${NOCLEAN}" ]; then
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/genesis_plus_gx_libretro${FORMAT}.${FORMAT_EXT}
done
else
echo "${CORENAME} not fetched, skipping ..."
fi
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_fba_full()
2013-02-10 17:30:38 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="fba"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd svn-current/trunk
2013-02-10 17:30:38 +00:00
cd projectfiles/libretro-android/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/fb_alpha_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_vbam()
{
2014-08-11 18:11:34 +00:00
CORENAME="vbam"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-14 20:25:08 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd src/libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-14 20:25:08 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_vba_next()
2013-02-10 17:30:38 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="vba-next"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2013-02-10 17:30:38 +00:00
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/vba_next_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_fceumm()
2013-02-10 17:30:38 +00:00
{
2014-08-11 18:11:34 +00:00
CORENAME="fceumm"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd src/drivers/libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_gambatte()
{
2014-08-11 18:11:34 +00:00
CORENAME="gambatte"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd libgambatte/libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_nx()
{
2014-08-11 18:11:34 +00:00
CORENAME="nx"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
2013-02-10 17:30:38 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/nxengine_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_prboom()
{
2014-08-11 18:11:34 +00:00
CORENAME="prboom"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
2013-02-10 17:30:38 +00:00
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_dinothawr()
{
2014-08-11 18:11:34 +00:00
CORENAME="dinothawr"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd android/eclipse/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
2013-02-10 17:30:38 +00:00
build_libretro_nestopia()
{
2014-08-11 18:11:34 +00:00
CORENAME="nestopia"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_pcsx_rearmed()
{
2014-08-11 18:11:34 +00:00
CORENAME="pcsx-rearmed"
cd $BASE_DIR
pwd
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
2013-02-10 17:30:38 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/pcsx_rearmed_libretro_neon${FORMAT}.${FORMAT_EXT}
done
2013-02-10 17:30:38 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-02-10 17:30:38 +00:00
fi
}
build_libretro_tyrquake()
{
2014-08-11 18:11:34 +00:00
CORENAME="tyrquake"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_modelviewer()
{
2014-08-11 18:11:34 +00:00
CORENAME="gl-modelviewer"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/modelviewer_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
2013-12-20 15:20:05 +00:00
build_libretro_modelviewer_location()
{
2014-08-11 18:11:34 +00:00
CORENAME="gl-modelviewer-location"
2013-12-20 15:20:05 +00:00
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
2013-12-20 15:20:05 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/modelviewer_location_libretro${FORMAT}.${FORMAT_EXT}
done
2013-12-20 15:20:05 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-12-20 15:20:05 +00:00
fi
}
2013-08-04 20:59:05 +00:00
build_libretro_instancingviewer()
{
2014-08-11 18:11:34 +00:00
CORENAME="gl-instancingviewer"
2013-08-04 20:59:05 +00:00
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
2013-08-04 20:59:05 +00:00
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/instancingviewer_location_libretro${FORMAT}.${FORMAT_EXT}
done
2013-08-04 20:59:05 +00:00
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
2013-08-04 20:59:05 +00:00
fi
}
build_libretro_instancingviewer_camera()
{
2014-08-11 18:11:34 +00:00
CORENAME="gl-instancingviewer-camera"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/instancingviewer_camera_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
2014-01-20 10:01:06 +00:00
build_libretro_3dengine() {
2014-08-11 18:11:34 +00:00
CORENAME="3dengine"
2014-01-20 10:01:06 +00:00
cd "${BASE_DIR}"
2014-08-11 18:11:34 +00:00
if [ -d 'libretro-${CORENAME}' ]; then
2014-08-14 20:25:08 +00:00
echo "=== Building ${CORENAME} ==="
2014-01-20 10:01:06 +00:00
cd libretro-${CORENAME}
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2014-01-20 10:01:06 +00:00
else
2014-08-14 20:25:08 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-01-20 10:01:06 +00:00
fi
}
build_libretro_scenewalker()
{
2014-08-11 18:11:34 +00:00
CORENAME="gl-scenewalker"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/scenewalker_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_picodrive()
{
2014-08-11 18:11:34 +00:00
CORENAME="picodrive"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_handy()
{
2014-08-11 18:11:34 +00:00
CORENAME="handy"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_desmume()
{
2014-08-11 18:11:34 +00:00
CORENAME="desmume"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd desmume/src/libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_quicknes()
{
2014-08-11 18:11:34 +00:00
CORENAME="quicknes"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
create_dist_dir()
{
if [ -d $RARCH_DIR ]; then
echo "Directory $RARCH_DIR already exists, skipping creation..."
else
mkdir $RARCH_DIR
fi
if [ -d $RARCH_DIST_DIR ]; then
echo "Directory $RARCH_DIST_DIR already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR
fi
if [ -d $RARCH_DIST_DIR/armeabi-v7a ]; then
echo "Directory $RARCH_DIST_DIR/armeabi-v7a already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR/armeabi-v7a
fi
if [ -d $RARCH_DIST_DIR/mips ]; then
echo "Directory $RARCH_DIST_DIR/mips already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR/mips
fi
if [ -d $RARCH_DIST_DIR/x86 ]; then
echo "Directory $RARCH_DIST_DIR/x86 already exists, skipping creation..."
else
mkdir $RARCH_DIST_DIR/x86
fi
}
build_libretro_bsnes()
{
2014-08-11 18:11:34 +00:00
CORENAME="bsnes"
#TODO - maybe accuracy/balanced cores as well
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-11 18:25:14 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd perf/target-libretro/jni
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${TARGET_ABIS} || die "Failed to clean ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${TARGET_ABIS} || die "Failed to build ${CORENAME}"
for a in "${ABIS[@]}"; do
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/bsnes_performance_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-11 18:25:14 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
build_libretro_mupen64()
{
2014-08-11 18:11:34 +00:00
CORENAME="mupen64plus"
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-14 20:25:08 +00:00
echo "=== Building ${CORENAME} =="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
else
2014-08-14 20:25:08 +00:00
echo "${CORENAME} not fetched, skipping ..."
fi
}
2014-07-13 02:22:50 +00:00
build_libretro_yabause()
{
2014-08-11 18:11:34 +00:00
CORENAME="yabause"
2014-07-13 02:22:50 +00:00
cd $BASE_DIR
2014-08-11 18:11:34 +00:00
if [ -d "libretro-${CORENAME}" ]; then
2014-08-14 20:25:08 +00:00
echo "=== Building ${CORENAME} ==="
2014-08-11 18:11:34 +00:00
cd libretro-${CORENAME}/
2014-07-13 02:22:50 +00:00
cd libretro/jni
for a in "${ABIS[@]}"; do
if [ -z "${NOCLEAN}" ]; then
ndk-build clean APP_ABI=${a} || die "Failed to clean ${a} ${CORENAME}"
fi
ndk-build -j$JOBS APP_ABI=${a} || die "Failed to build ${a} ${CORENAME}"
cp ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}
done
2014-07-13 02:22:50 +00:00
else
2014-08-14 20:25:08 +00:00
echo "${CORENAME} not fetched, skipping ..."
2014-07-13 02:22:50 +00:00
fi
}
create_dist_dir
if [ $1 ]; then
$1
else
2014-07-29 17:19:15 +00:00
build_libretro_2048
#build_libretro_bsnes_cplusplus98
build_libretro_bsnes
2014-06-22 23:50:36 +00:00
build_libretro_beetle_lynx
2014-06-22 21:34:25 +00:00
build_libretro_beetle_gba
build_libretro_beetle_ngp
build_libretro_beetle_pce_fast
build_libretro_beetle_supergrafx
build_libretro_beetle_pcfx
build_libretro_beetle_vb
build_libretro_beetle_wswan
build_libretro_beetle_psx
2014-06-22 23:50:36 +00:00
build_libretro_beetle_bsnes
build_libretro_s9x
build_libretro_s9x_next
build_libretro_genplus
build_libretro_fba_full
build_libretro_vbam
build_libretro_vba_next
#build_libretro_bnes
build_libretro_fceumm
build_libretro_gambatte
build_libretro_meteor
build_libretro_nx
build_libretro_prboom
build_libretro_stella
build_libretro_quicknes
build_libretro_nestopia
build_libretro_tyrquake
#build_libretro_mame078
#build_libretro_mame
#build_libretro_dosbox
#build_libretro_scummvm
build_libretro_picodrive
build_libretro_handy
build_libretro_desmume
build_libretro_pcsx_rearmed
build_libretro_modelviewer
build_libretro_scenewalker
2013-08-04 20:59:05 +00:00
build_libretro_instancingviewer
build_libretro_instancingviewer_camera
build_libretro_mupen64
#build_libretro_ffmpeg
2014-07-13 02:22:50 +00:00
build_libretro_yabause
build_libretro_dinothawr
2014-03-09 20:11:12 +00:00
build_libretro_3dengine
fi