Merge pull request #176 from iKarith/master

Remove iKarith-libretro-fetch.sh + Mac i386 support in libretro-build.sh
This commit is contained in:
Twinaphex 2015-02-14 03:18:45 +01:00
commit 12f601d329
10 changed files with 319 additions and 740 deletions

View File

@ -1,4 +1,4 @@
# vi: ts=3 sw=3 et ft=sh # vim: set ts=3 sw=3 noet ft=sh : bash
die() { die() {
echo $1 echo $1

View File

@ -1,26 +1,15 @@
#! /bin/bash #! /usr/bin/env bash
# vi: sw=3 ts=3 et # vim: set ts=3 sw=3 noet ft=sh : bash
# BSDs don't have readlink -f SCRIPT="${0#./}"
read_link() BASE_DIR="${SCRIPT%/*}"
{ WORKDIR=$(pwd)
TARGET_FILE="${1}"
cd "`dirname "${TARGET_FILE}"`"
TARGET_FILE="`basename "${TARGET_FILE}"`"
while [ -L "${TARGET_FILE}" ]; do if [ "$BASE_DIR" = "$SCRIPT" ]; then
TARGET_FILE="`readlink "${TARGET_FILE}"`" BASE_DIR="$WORKDIR"
cd "`dirname "${TARGET_FILE}"`" else
TARGET_FILE="`basename "${TARGET_FILE}"`" BASE_DIR="$WORKDIR/$BASE_DIR"
done fi
PHYS_DIR="`pwd -P`"
RESULT="${PHYS_DIR}/${TARGET_FILE}"
echo ${RESULT}
}
SCRIPT="`read_link "$0"`"
BASE_DIR="`dirname "${SCRIPT}"`"
WORKDIR="`pwd`"
. ${BASE_DIR}/iKarith-libretro-config.sh . ${BASE_DIR}/iKarith-libretro-config.sh

View File

@ -1,5 +1,4 @@
#!/bin/bash # vim: set ts=3 sw=3 noet ft=sh : bash
# vi: ts=3 sw=3 et
# Architecture Assignment # Architecture Assignment
config_cpu() { config_cpu() {

View File

@ -1,399 +0,0 @@
#! /bin/bash
# vi: sw=3 ts=3 noet
# 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"`"
BASE_DIR="`dirname "$SCRIPT"`"
. $BASE_DIR/iKarith-libretro-config.sh
WORKDIR=$(pwd)
echo_cmd() {
echo "$@"
"$@"
}
# fetch_git <repository> <local directory>
# Clones or pulls updates from a git repository into a local directory
#
# $1 The URI to fetch
# $2 The local directory to fetch to (relative)
# $3 Set to clone --recursive
# $4 Set to pull --recursive
fetch_git() {
fetch_dir="$WORKDIR/$2"
echo "=== Fetching $2 ==="
if [ -d "$fetch_dir/.git" ]; then
echo_cmd git -C "$fetch_dir" pull
if [ -n "$4" ]; then
echo_cmd git -C "$fetch_dir" submodule foreach git pull origin master
fi
else
echo_cmd git clone "$1" "$fetch_dir"
if [ -n "$3" ]; then
echo_cmd git -C "$fetch_dir" submodule update --init
fi
fi
}
# Keep three copies so we don't have to rebuild stuff all the time.
# FIXME: If you need 3 copies of source to compile 3 sets of objects, you're
# doing it wrong. We should fix this.
fetch_project_bsnes()
{
fetch_git "${1}" "${2}"
fetch_git "${WORKDIR}/${2}" "${2}/perf"
fetch_git "${WORKDIR}/${2}" "${2}/balanced"
}
fetch_retroarch() {
fetch_git "https://github.com/libretro/RetroArch.git" "retroarch"
fetch_git "https://github.com/libretro/common-shaders.git" "retroarch/media/shaders_cg"
fetch_git "https://github.com/libretro/common-overlays.git" "retroarch/media/overlays"
fetch_git "https://github.com/libretro/retroarch-assets.git" "retroarch/media/assets"
fetch_git "https://github.com/libretro/retroarch-joypad-autoconfig.git" "retroarch/media/autoconfig"
fetch_git "https://github.com/libretro/libretro-database.git" "retroarch/media/libretrodb"
}
fetch_tools() {
fetch_git "https://github.com/libretro/libretro-manifest.git" "libretro-manifest"
fetch_git "https://github.com/libretro/libretrodb.git" "libretrodb"
fetch_git "https://github.com/libretro/libretro-dat-pull.git" "libretro-dat-pull"
}
fetch_libretro_bsnes() {
fetch_project_bsnes "https://github.com/libretro/bsnes-libretro.git" "libretro-bsnes"
}
fetch_libretro_snes9x() {
fetch_git "https://github.com/libretro/snes9x.git" "libretro-snes9x"
}
fetch_libretro_snes9x_next() {
fetch_git "https://github.com/libretro/snes9x-next.git" "libretro-snes9x_next"
}
fetch_libretro_genesis_plus_gx() {
fetch_git "https://github.com/libretro/Genesis-Plus-GX.git" "libretro-genesis_plus_gx"
}
fetch_libretro_fb_alpha() {
fetch_git "https://github.com/libretro/fba-libretro.git" "libretro-fb_alpha"
}
fetch_libretro_vba_next() {
fetch_git "https://github.com/libretro/vba-next.git" "libretro-vba_next"
}
fetch_libretro_vbam() {
fetch_git "https://github.com/libretro/vbam-libretro.git" "libretro-vbam"
}
fetch_libretro_handy() {
fetch_git "https://github.com/libretro/libretro-handy.git" "libretro-handy"
}
fetch_libretro_bnes() {
fetch_git "https://github.com/libretro/bnes-libretro.git" "libretro-bnes"
}
fetch_libretro_fceumm() {
fetch_git "https://github.com/libretro/libretro-fceumm.git" "libretro-fceumm"
}
fetch_libretro_gambatte() {
fetch_git "https://github.com/libretro/gambatte-libretro.git" "libretro-gambatte"
}
fetch_libretro_meteor() {
fetch_git "https://github.com/libretro/meteor-libretro.git" "libretro-meteor"
}
fetch_libretro_nxengine() {
fetch_git "https://github.com/libretro/nxengine-libretro.git" "libretro-nxengine"
}
fetch_libretro_prboom() {
fetch_git "https://github.com/libretro/libretro-prboom.git" "libretro-prboom"
}
fetch_libretro_stella() {
fetch_git "https://github.com/libretro/stella-libretro.git" "libretro-stella"
}
fetch_libretro_desmume() {
fetch_git "https://github.com/libretro/desmume.git" "libretro-desmume"
}
fetch_libretro_quicknes() {
fetch_git "https://github.com/libretro/QuickNES_Core.git" "libretro-quicknes"
}
fetch_libretro_nestopia() {
fetch_git "https://github.com/libretro/nestopia.git" "libretro-nestopia"
}
fetch_libretro_tyrquake() {
fetch_git "https://github.com/libretro/tyrquake.git" "libretro-tyrquake"
}
fetch_libretro_pcsx_rearmed() {
fetch_git "https://github.com/libretro/pcsx_rearmed.git" "libretro-pcsx_rearmed"
}
fetch_libretro_mednafen_gba() {
fetch_git "https://github.com/libretro/beetle-gba-libretro.git" "libretro-mednafen_gba"
}
fetch_libretro_mednafen_lynx() {
fetch_git "https://github.com/libretro/beetle-lynx-libretro.git" "libretro-mednafen_lynx"
}
fetch_libretro_mednafen_ngp() {
fetch_git "https://github.com/libretro/beetle-ngp-libretro.git" "libretro-mednafen_ngp"
}
fetch_libretro_mednafen_pce_fast() {
fetch_git "https://github.com/libretro/beetle-pce-fast-libretro.git" "libretro-mednafen_pce_fast"
}
fetch_libretro_mednafen_supergrafx() {
fetch_git "https://github.com/libretro/beetle-supergrafx-libretro.git" "libretro-mednafen_supergrafx"
}
fetch_libretro_mednafen_psx() {
fetch_git "https://github.com/libretro/mednafen-psx-libretro.git" "libretro-mednafen_psx"
}
fetch_libretro_mednafen_pcfx() {
fetch_git "https://github.com/libretro/beetle-pcfx-libretro.git" "libretro-mednafen_pcfx"
}
fetch_libretro_mednafen_snes() {
fetch_git "https://github.com/libretro/beetle-bsnes-libretro.git" "libretro-mednafen_snes"
}
fetch_libretro_mednafen_vb() {
fetch_git "https://github.com/libretro/beetle-vb-libretro.git" "libretro-mednafen_vb"
}
fetch_libretro_mednafen_wswan() {
fetch_git "https://github.com/libretro/beetle-wswan-libretro.git" "libretro-mednafen_wswan"
}
fetch_libretro_scummvm() {
fetch_git "https://github.com/libretro/scummvm.git" "libretro-scummvm"
}
fetch_libretro_yabause() {
fetch_git "https://github.com/libretro/yabause.git" "libretro-yabause"
}
fetch_libretro_dosbox() {
fetch_git "https://github.com/libretro/dosbox-libretro.git" "libretro-dosbox"
}
fetch_libretro_virtualjaguar() {
fetch_git "https://github.com/libretro/virtualjaguar-libretro.git" "libretro-virtualjaguar"
}
fetch_libretro_mame078() {
fetch_git "https://github.com/libretro/mame2003-libretro.git" "libretro-mame078"
}
fetch_libretro_mame139() {
fetch_git "https://github.com/libretro/mame2010-libretro.git" "libretro-mame139"
}
fetch_libretro_mame() {
fetch_git "https://github.com/libretro/mame.git" "libretro-mame"
}
fetch_libretro_ffmpeg() {
fetch_git "https://github.com/libretro/FFmpeg.git" "libretro-ffmpeg"
}
fetch_libretro_bsnes_cplusplus98() {
fetch_git "https://github.com/libretro/bsnes-libretro-cplusplus98.git" "libretro-bsnes_cplusplus98"
}
fetch_libretro_bsnes_mercury() {
fetch_git "https://github.com/libretro/bsnes-mercury.git" "libretro-bsnes_mercury"
}
fetch_libretro_picodrive() {
fetch_git "https://github.com/libretro/picodrive.git" "libretro-picodrive" "1" "1"
}
fetch_libretro_tgbdual() {
fetch_git "https://github.com/libretro/tgbdual-libretro.git" "libretro-tgbdual"
}
fetch_libretro_mupen64plus() {
fetch_git "https://github.com/libretro/mupen64plus-libretro.git" "libretro-mupen64plus"
}
fetch_libretro_dinothawr() {
fetch_git "https://github.com/libretro/Dinothawr.git" "libretro-dinothawr"
}
fetch_libretro_uae() {
fetch_git "https://github.com/libretro/libretro-uae.git" "libretro-uae"
}
fetch_libretro_3dengine() {
fetch_git "https://github.com/libretro/libretro-3dengine.git" "libretro-3dengine"
}
fetch_libretro_remotejoy() {
fetch_git "https://github.com/libretro/libretro-remotejoy.git" "libretro-remotejoy"
}
fetch_libretro_bluemsx() {
fetch_git "https://github.com/libretro/blueMSX-libretro.git" "libretro-bluemsx"
}
fetch_libretro_fmsx() {
fetch_git "https://github.com/libretro/fmsx-libretro.git" "libretro-fmsx"
}
fetch_libretro_2048() {
fetch_git "https://github.com/libretro/libretro-2048.git" "libretro-2048"
}
fetch_libretro_vecx() {
fetch_git "https://github.com/libretro/libretro-vecx.git" "libretro-vecx"
}
fetch_libretro_ppsspp() {
fetch_git "https://github.com/libretro/ppsspp.git" "libretro-ppsspp" "1" "1"
}
fetch_libretro_prosystem() {
fetch_git "https://github.com/libretro/prosystem-libretro.git" "libretro-prosystem"
}
fetch_libretro_o2em() {
fetch_git "https://github.com/libretro/libretro-o2em.git" "libretro-o2em"
}
fetch_libretro_4do() {
fetch_git "https://github.com/libretro/4do-libretro.git" "libretro-4do"
}
fetch_libretro_catsfc() {
fetch_git "https://github.com/libretro/CATSFC-libretro.git" "libretro-catsfc"
}
fetch_libretro_stonesoup() {
fetch_git "https://github.com/libretro/crawl-ref.git" "libretro-stonesoup" "1" ""
}
fetch_libretro_hatari() {
fetch_git "https://github.com/libretro/hatari.git" "libretro-hatari"
}
fetch_libretro_tempgba() {
fetch_git "https://github.com/libretro/TempGBA-libretro.git" "libretro-tempgba"
}
fetch_libretro_gpsp() {
fetch_git "https://github.com/libretro/gpsp.git" "libretro-gpsp"
}
fetch_libretro_emux() {
fetch_git "https://github.com/libretro/emux.git" "libretro-emux"
}
if [ -n "${1}" ]; then
while [ -n "${1}" ]; do
"${1}"
shift
done
else
fetch_retroarch
fetch_tools
fetch_libretro_bsnes
fetch_libretro_snes9x
fetch_libretro_snes9x_next
fetch_libretro_genesis_plus_gx
fetch_libretro_fb_alpha
fetch_libretro_vba_next
fetch_libretro_vbam
fetch_libretro_handy
fetch_libretro_bnes
fetch_libretro_fceumm
fetch_libretro_gambatte
fetch_libretro_meteor
fetch_libretro_nxengine
fetch_libretro_prboom
fetch_libretro_stella
fetch_libretro_desmume
fetch_libretro_quicknes
fetch_libretro_nestopia
fetch_libretro_tyrquake
fetch_libretro_pcsx_rearmed
fetch_libretro_mednafen_gba
fetch_libretro_mednafen_lynx
fetch_libretro_mednafen_ngp
fetch_libretro_mednafen_pce_fast
fetch_libretro_mednafen_supergrafx
fetch_libretro_mednafen_psx
fetch_libretro_mednafen_pcfx
fetch_libretro_mednafen_snes
fetch_libretro_mednafen_vb
fetch_libretro_mednafen_wswan
fetch_libretro_scummvm
fetch_libretro_yabause
fetch_libretro_dosbox
fetch_libretro_virtualjaguar
fetch_libretro_mame078
fetch_libretro_mame139
fetch_libretro_mame
fetch_libretro_ffmpeg
fetch_libretro_bsnes_cplusplus98
fetch_libretro_bsnes_mercury
fetch_libretro_picodrive
fetch_libretro_tgbdual
fetch_libretro_mupen64plus
fetch_libretro_dinothawr
fetch_libretro_uae
fetch_libretro_3dengine
fetch_libretro_remotejoy
fetch_libretro_bluemsx
fetch_libretro_fmsx
fetch_libretro_2048
fetch_libretro_vecx
fetch_libretro_ppsspp
fetch_libretro_prosystem
fetch_libretro_o2em
fetch_libretro_4do
fetch_libretro_catsfc
fetch_libretro_stonesoup
fetch_libretro_hatari
fetch_libretro_tempgba
fetch_libretro_gpsp
fetch_libretro_emux
fi

View File

@ -1,29 +1,18 @@
#!/bin/bash #! /usr/bin/env bash
# vim: set ts=3 sw=3 noet ft=sh : bash
. ./iKarith-libretro-config.sh SCRIPT="${0#./}"
BASE_DIR="${SCRIPT%/*}"
WORKDIR=$(pwd)
# BSDs don't have readlink -f if [ "$BASE_DIR" = "$SCRIPT" ]; then
read_link() BASE_DIR="$WORKDIR"
{ else
TARGET_FILE="$1" BASE_DIR="$WORKDIR/$BASE_DIR"
cd $(dirname "$TARGET_FILE") fi
TARGET_FILE=$(basename "$TARGET_FILE")
while [ -L "$TARGET_FILE" ] . $BASE_DIR/iKarith-libretro-config.sh
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")
if [ -z "$RARCH_DIST_DIR" ]; then if [ -z "$RARCH_DIST_DIR" ]; then
RARCH_DIR="$BASE_DIR/dist" RARCH_DIR="$BASE_DIR/dist"
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR" RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"

56
iKarith-super/cpu.sh Normal file
View File

@ -0,0 +1,56 @@
# vim: set ts=3 sw=3 noet ft=sh : bash
# CPU identification
#
# All of these functions can be overridden by $1 for use in buildbots, etc.
# The rest are meant to replace test or [ in if statements.
# Use with $() syntax
host_cpu() {
echo ${1:-`uname -m`}
}
cpu_isx86() {
case ${1:-`uname -m`} in
i386|i586|i686|x86_64) echo "true" ;;
*) [ "${PROCESSOR_ARCHITEW6432}" = "AMD64" ] && echo "true" ;;
esac
}
cpu_isx86_64() {
[ ${1:-`uname -m`} = "x86_64" ] && return 0
return 1
}
cpu_isarm() {
case ${1:-`uname -m`} in
armv*) return 0 ;;
esac
return 1
}
cpu_isarmv5() {
[ "${1:-`uname -m`}" = "armv5tel" ] && return 0
return 1
}
# Consider using armv6* here?
cpu_isarmv6() {
case ${1:-`uname -m`} in
armv6l|armv6) return 0 ;;
esac
return 1
}
# Consider using armv7* here?
# armv7s is Apple A6 chip
cpu_isarmv7() {
case ${1:-`uname -m`} in
armv7l|armv7|armv7s) return 0 ;;
esac
return 1
}

View File

@ -0,0 +1,28 @@
# vim: set ts=3 sw=3 noet ft=sh : bash
# FIXME: This doesn't belong here, move it
echo_cmd() {
echo "$@"
"$@"
}
# fetch_git <repository> <local directory>
# Clones or pulls updates from a git repository into a local directory
#
# $1 The URI to fetch
# $2 The local directory to fetch to (relative)
# $3 Set to clone --recursive
# $4 Set to pull --recursive
fetch_git() {
fetch_dir="$WORKDIR/$2"
echo "=== Fetching $2 ==="
if [ -d "$fetch_dir/.git" ]; then
echo_cmd git -C "$fetch_dir" pull
[ -n "$4" ]&& echo_cmd git -C "$fetch_dir" submodule foreach git pull origin master
else
echo_cmd git clone "$1" "$fetch_dir"
[ -n "$3" ]&& echo_cmd git -C "$fetch_dir" submodule update --init
fi
}

View File

@ -5,13 +5,22 @@ die() {
#exit 1 #exit 1
} }
#
# FIXME: Okay regarding COMPILER... It's no longer used to build any targets
# in this file because it doesn't let you specify arguments to the compiler
# such as CC="gcc -something". We need to be able to do that on the Mac in
# particular because we need to be able to specify -arch to build on a CPU
# other than the default.
#
# Basically, if you use this variable, you should stop. :)
#
if [ "${CC}" ] && [ "${CXX}" ]; then if [ "${CC}" ] && [ "${CXX}" ]; then
COMPILER="CC=\"${CC}\" CXX=\"${CXX}\"" COMPILER="CC=\"${CC}\" CXX=\"${CXX}\""
else else
COMPILER="" COMPILER=""
fi fi
echo "Compiler: ${COMPILER}" echo "Compiler: CC="$CC" CXX="$CXX""
[[ "${ARM_NEON}" ]] && echo '=== ARM NEON opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon" [[ "${ARM_NEON}" ]] && echo '=== ARM NEON opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-neon"
[[ "${CORTEX_A8}" ]] && echo '=== Cortex A8 opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8" [[ "${CORTEX_A8}" ]] && echo '=== Cortex A8 opts enabled... ===' && export FORMAT_COMPILER_TARGET="${FORMAT_COMPILER_TARGET}-cortexa8"
@ -65,9 +74,9 @@ build_libretro_pcsx_rearmed_interpreter() {
cd "${build_dir}" cd "${build_dir}"
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed' "${MAKE}" -f Makefile.libretro platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean PCSX ReARMed'
fi fi
"${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build PCSX ReARMed' "${MAKE}" -f Makefile.libretro USE_DYNAREC=0 platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build PCSX ReARMed'
cp "pcsx_rearmed_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/pcsx_rearmed_interpreter${FORMAT}.${FORMAT_EXT}" cp "pcsx_rearmed_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/pcsx_rearmed_interpreter${FORMAT}.${FORMAT_EXT}"
build_summary_log ${?} "pcsx_rearmed_interpreter" build_summary_log ${?} "pcsx_rearmed_interpreter"
else else
@ -124,10 +133,10 @@ build_libretro_generic() {
cd "${5}/${2}" cd "${5}/${2}"
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}" clean || die "Failed to build ${1}" "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die "Failed to build ${1}"
fi fi
echo "${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}" echo "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}"
"${MAKE}" -f ${3} platform="${4}" ${COMPILER} "-j${JOBS}" || die "Failed to build ${1}" "${MAKE}" -f ${3} platform="${4}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die "Failed to build ${1}"
if [ -z "${5}" ]; then if [ -z "${5}" ]; then
copy_core_to_dist $1 copy_core_to_dist $1
fi fi
@ -388,22 +397,22 @@ build_libretro_mame() {
if [ "$IOS" ]; then if [ "$IOS" ]; then
echo '=== Building MAME (iOS) ===' echo '=== Building MAME (iOS) ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools' "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "NATIVE=1" buildtools "-j${JOBS}" || die 'Failed to build MAME buildtools'
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} emulator "-j${JOBS}" || die 'Failed to build MAME (iOS)' "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" emulator "-j${JOBS}" || die 'Failed to build MAME (iOS)'
elif [ "$X86_64" = "true" ]; then elif [ "$X86_64" = "true" ]; then
echo '=== Building MAME64 ===' echo '=== Building MAME64 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
else else
echo '=== Building MAME32 ===' echo '=== Building MAME32 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" -f Makefile.libretro "TARGET=mame" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
fi fi
cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "mame_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
else else
@ -421,15 +430,15 @@ build_libretro_mess() {
if [ "$X86_64" = "true" ]; then if [ "$X86_64" = "true" ]; then
echo '=== Building MESS64 ===' echo '=== Building MESS64 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
else else
echo '=== Building MESS32 ===' echo '=== Building MESS32 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
fi fi
cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
build_summary_log ${?} "mess" build_summary_log ${?} "mess"
@ -448,15 +457,15 @@ rebuild_libretro_mess() {
if [ "$X86_64" = "true" ]; then if [ "$X86_64" = "true" ]; then
echo '=== Building MESS64 ===' echo '=== Building MESS64 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
else else
echo '=== Building MESS32 ===' echo '=== Building MESS32 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=mess" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" -f Makefile.libretro "TARGET=mess" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
fi fi
cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "mess_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
build_summary_log ${?} "mess" build_summary_log ${?} "mess"
@ -475,15 +484,15 @@ build_libretro_ume() {
if [ "$X86_64" = "true" ]; then if [ "$X86_64" = "true" ]; then
echo '=== Building UME64 ===' echo '=== Building UME64 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
else else
echo '=== Building UME32 ===' echo '=== Building UME32 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
fi fi
cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
build_summary_log ${?} "ume" build_summary_log ${?} "ume"
@ -502,15 +511,15 @@ rebuild_libretro_ume() {
if [ "$X86_64" = "true" ]; then if [ "$X86_64" = "true" ]; then
echo '=== Building UME64 ===' echo '=== Building UME64 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" PTR64=1 -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
else else
echo '=== Building UME32 ===' echo '=== Building UME32 ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" clean || die 'Failed to clean MAME' "${MAKE}" -f Makefile.libretro "TARGET=ume" "PARTIAL=1" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" clean || die 'Failed to clean MAME'
fi fi
"${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" || die 'Failed to build MAME' "${MAKE}" -f Makefile.libretro "TARGET=ume" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build MAME'
fi fi
cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "ume_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
build_summary_log ${?} "ume" build_summary_log ${?} "ume"
@ -522,7 +531,6 @@ rebuild_libretro_ume() {
# $1 is corename # $1 is corename
# $2 is profile shortname. # $2 is profile shortname.
# $3 is profile name # $3 is profile name
# $4 is compiler
build_libretro_bsnes_modern() { build_libretro_bsnes_modern() {
build_dir="${WORKDIR}/libretro-${1}" build_dir="${WORKDIR}/libretro-${1}"
if [ -d "${build_dir}" ]; then if [ -d "${build_dir}" ]; then
@ -533,7 +541,7 @@ build_libretro_bsnes_modern() {
rm -f obj/*.{o,"${FORMAT_EXT}"} rm -f obj/*.{o,"${FORMAT_EXT}"}
rm -f out/*.{o,"${FORMAT_EXT}"} rm -f out/*.{o,"${FORMAT_EXT}"}
fi fi
"${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="${4}" ui='target-libretro' profile="${3}" "-j${JOBS}" || die "Failed to build ${1} ${3} core" "${MAKE}" -f Makefile platform="${FORMAT_COMPILER_TARGET}" compiler="$CXX11" ui='target-libretro' profile="${3}" "-j${JOBS}" || die "Failed to build ${1} ${3} core"
cp -f "out/${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${1}_${3}_libretro${FORMAT}.${FORMAT_EXT}" cp -f "out/${1}_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${1}_${3}_libretro${FORMAT}.${FORMAT_EXT}"
build_summary_log ${?} "${1}_${3}" build_summary_log ${?} "${1}_${3}"
else else
@ -542,15 +550,15 @@ build_libretro_bsnes_modern() {
} }
build_libretro_bsnes() { build_libretro_bsnes() {
build_libretro_bsnes_modern "bsnes" "perf" "performance" ${CXX11} build_libretro_bsnes_modern "bsnes" "perf" "performance"
build_libretro_bsnes_modern "bsnes" "balanced" "balanced" ${CXX11} build_libretro_bsnes_modern "bsnes" "balanced" "balanced"
build_libretro_bsnes_modern "bsnes" "." "accuracy" ${CXX11} build_libretro_bsnes_modern "bsnes" "." "accuracy"
} }
build_libretro_bsnes_mercury() { build_libretro_bsnes_mercury() {
build_libretro_bsnes_modern "bsnes_mercury" "perf" "performance" ${CXX11} build_libretro_bsnes_modern "bsnes_mercury" "perf" "performance"
build_libretro_bsnes_modern "bsnes_mercury" "balanced" "balanced" ${CXX11} build_libretro_bsnes_modern "bsnes_mercury" "balanced" "balanced"
build_libretro_bsnes_modern "bsnes_mercury" "." "accuracy" ${CXX11} build_libretro_bsnes_modern "bsnes_mercury" "." "accuracy"
} }
build_libretro_bsnes_cplusplus98() { build_libretro_bsnes_cplusplus98() {
@ -563,7 +571,7 @@ build_libretro_bsnes_cplusplus98() {
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" clean || die "Failed to clean ${CORENAME}" "${MAKE}" clean || die "Failed to clean ${CORENAME}"
fi fi
"${MAKE}" platform="${FORMAT_COMPILER_TARGET}" ${COMPILER} "-j${JOBS}" "${MAKE}" platform="${FORMAT_COMPILER_TARGET}" CC="$CC" CXX="$CXX" "-j${JOBS}"
cp "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}" cp "out/libretro.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${CORENAME}_libretro${FORMAT}.${FORMAT_EXT}"
build_summary_log ${?} ${CORENAME} build_summary_log ${?} ${CORENAME}
else else
@ -581,7 +589,7 @@ build_libretro_bnes() {
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" -f Makefile "-j${JOBS}" clean || die 'Failed to clean bNES' "${MAKE}" -f Makefile "-j${JOBS}" clean || die 'Failed to clean bNES'
fi fi
"${MAKE}" -f Makefile ${COMPILER} "-j${JOBS}" compiler="${CXX11}" || die 'Failed to build bNES' "${MAKE}" -f Makefile CC="$CC" CXX="$CXX" "-j${JOBS}" compiler="${CXX11}" || die 'Failed to build bNES'
cp "libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bnes_libretro${FORMAT}.${FORMAT_EXT}" cp "libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/bnes_libretro${FORMAT}.${FORMAT_EXT}"
build_summary_log ${?} "bnes" build_summary_log ${?} "bnes"
else else
@ -601,25 +609,25 @@ build_libretro_mupen64() {
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86_64 dynarec)' "${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86_64 dynarec)'
fi fi
"${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (x86_64 dynarec)' "${MAKE}" WITH_DYNAREC='x86_64' platform="${FORMAT_COMPILER_TARGET_ALT}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build Mupen 64 (x86_64 dynarec)'
elif [ "${X86}" ]; then elif [ "${X86}" ]; then
echo '=== Building Mupen 64 Plus (x86 32bit dynarec) ===' echo '=== Building Mupen 64 Plus (x86 32bit dynarec) ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86 dynarec)' "${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (x86 dynarec)'
fi fi
"${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (x86 dynarec)' "${MAKE}" WITH_DYNAREC='x86' platform="${FORMAT_COMPILER_TARGET_ALT}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build Mupen 64 (x86 dynarec)'
elif [ "${CORTEX_A8}" ] || [ "${CORTEX_A9}" ] || [ "${IOS}" ]; then elif [ "${CORTEX_A8}" ] || [ "${CORTEX_A9}" ] || [ "${IOS}" ]; then
echo '=== Building Mupen 64 Plus (ARM dynarec) ===' echo '=== Building Mupen 64 Plus (ARM dynarec) ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (ARM dynarec)' "${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64 (ARM dynarec)'
fi fi
"${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64 (ARM dynarec)' "${MAKE}" WITH_DYNAREC='arm' platform="${FORMAT_COMPILER_TARGET_ALT}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build Mupen 64 (ARM dynarec)'
else else
echo '=== Building Mupen 64 Plus ===' echo '=== Building Mupen 64 Plus ==='
if [ -z "${NOCLEAN}" ]; then if [ -z "${NOCLEAN}" ]; then
"${MAKE}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64' "${MAKE}" "-j${JOBS}" clean || die 'Failed to clean Mupen 64'
fi fi
"${MAKE}" platform="${FORMAT_COMPILER_TARGET_ALT}" ${COMPILER} "-j${JOBS}" || die 'Failed to build Mupen 64' "${MAKE}" platform="${FORMAT_COMPILER_TARGET_ALT}" CC="$CC" CXX="$CXX" "-j${JOBS}" || die 'Failed to build Mupen 64'
fi fi
cp "mupen64plus_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}" cp "mupen64plus_libretro${FORMAT}.${FORMAT_EXT}" "${RARCH_DIST_DIR}"
build_summary_log ${?} "mupen64plus" build_summary_log ${?} "mupen64plus"

View File

@ -73,6 +73,12 @@ if [ -z "$CXX" ]; then
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
CXX=c++ CXX=c++
CXX11="clang++ -std=c++11 -stdlib=libc++" CXX11="clang++ -std=c++11 -stdlib=libc++"
# FIXME: Do this right later.
if [ "$ARCH" = "i386" ]; then
CC="cc -arch i386"
CXX="c++ -arch i386"
CXX11="clang++ -arch i386 -std=c++11 -stdlib=libc++"
fi
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
CXX=mingw32-g++ CXX=mingw32-g++
CXX11=mingw32-g++ CXX11=mingw32-g++
@ -85,6 +91,7 @@ fi
FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET
echo "CC = $CC" echo "CC = $CC"
echo "CXX = $CXX" echo "CXX = $CXX"
echo "CXX11 = $CXX11"
echo "STRIP = $STRIP" echo "STRIP = $STRIP"
. ${BASE_DIR}/libretro-build-common.sh . ${BASE_DIR}/libretro-build-common.sh

View File

@ -1,463 +1,365 @@
#! /bin/bash #! /usr/bin/env bash
# vi: sw=3 ts=3 et # vim: set ts=3 sw=3 noet ft=sh : bash
# 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"`"
BASE_DIR="`dirname "${SCRIPT}"`"
. ${BASE_DIR}/libretro-config.sh
SCRIPT="${0#./}"
BASE_DIR="${SCRIPT%/*}"
WORKDIR=$(pwd) WORKDIR=$(pwd)
DATESTAMP_FMT="%Y-%m-%d_%H:%M:%S" if [ "$BASE_DIR" = "$SCRIPT" ]; then
BASE_DIR="$WORKDIR"
if [ -z $WRITERIGHTS ]; then
REPO_BASE="https://github.com"
else else
REPO_BASE="git://github.com" BASE_DIR="$WORKDIR/$BASE_DIR"
fi fi
. $BASE_DIR/libretro-config.sh
. $BASE_DIR/iKarith-super/fetch-rules.sh # will rename this dir later
log_verbose() {
if [ -n "${VERBOSE}" ]; then
echo "$(date -u +${DATESTAMP_FMT}):${@}"
fi
}
# fetch_git <repository> <local directory>
# Clones or pulls updates from a git repository into a local directory
fetch_git() {
fetch_dir="${WORKDIR}/${2}"
if [ -n "${3}" ]; then
echo "=== Fetching ${3} ==="
fi
if [ -d "${fetch_dir}/.git" ]; then
log_verbose "${fetch_dir}:git pull"
cd "${fetch_dir}"
git pull
else
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
git clone "${1}" "${fetch_dir}"
fi
if [ -n "${3}" ]; then
echo "=== Fetched ==="
fi
}
# fetch_git_submodules <repository> <local directory>
# Clones or pulls updates from a git repository (and its submodules, if any)
# into a local directory
fetch_git_submodules() {
fetch_dir="${WORKDIR}/${2}"
if [ -n "${3}" ]; then
echo "=== Fetching ${3} ==="
fi
if [ -d "${fetch_dir}/.git" ]; then
cd "${fetch_dir}"
log_verbose "${fetch_dir}:git pull"
git pull
log_verbose "${fetch_dir}:git submodule foreach git pull origin master"
git submodule foreach git pull origin master
else
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
git clone "${1}" "${fetch_dir}"
cd "${fetch_dir}"
log_verbose "${fetch_dir}:git submodule update --init"
git submodule update --init
fi
if [ -n "${3}" ]; then
echo "=== Fetched ==="
fi
}
# fetch_git_submodules_no_update <repository> <local directory>
# Clones a repository (and its submodules, if any) into a local directory,
# updates only the main repo on update.
#
# Basically if the core has a ton of external dependencies, you may not want
# them updated automatically
fetch_git_submodules_no_update() {
fetch_dir="${WORKDIR}/${2}"
if [ -n "${3}" ]; then
echo "=== Fetching ${3} ==="
fi
if [ -d "${fetch_dir}/.git" ]; then
cd "${fetch_dir}"
log_verbose "${fetch_dir}:git pull"
git pull
else
log_verbose "git clone \"${1}\" \"${fetch_dir}\""
git clone "${1}" "${fetch_dir}"
cd "${fetch_dir}"
log_verbose "${fetch_dir}:git submodule update --init"
git submodule update --init
fi
if [ -n "${3}" ]; then
echo "=== Fetched ==="
fi
}
# Keep three copies so we don't have to rebuild stuff all the time. # Keep three copies so we don't have to rebuild stuff all the time.
# FIXME: If you need 3 copies of source to compile 3 sets of objects, you're
# doing it wrong. We should fix this.
fetch_project_bsnes() fetch_project_bsnes()
{ {
echo "=== Fetching ${3} ===" fetch_git "${1}" "${2}"
fetch_git "${1}" "${2}" fetch_git "${WORKDIR}/${2}" "${2}/perf"
fetch_git "${WORKDIR}/${2}" "${2}/perf" fetch_git "${WORKDIR}/${2}" "${2}/balanced"
fetch_git "${WORKDIR}/${2}" "${2}/balanced"
echo "=== Fetched ==="
} }
fetch_retroarch() { fetch_retroarch() {
fetch_git "$REPO_BASE/libretro/RetroArch.git" "retroarch" "libretro/RetroArch" fetch_git "https://github.com/libretro/RetroArch.git" "retroarch"
fetch_git "$REPO_BASE/libretro/common-shaders.git" "retroarch/media/shaders_cg" "libretro/common-shaders" fetch_git "https://github.com/libretro/common-shaders.git" "retroarch/media/shaders_cg"
fetch_git "$REPO_BASE/libretro/common-overlays.git" "retroarch/media/overlays" "libretro/common-overlays" fetch_git "https://github.com/libretro/common-overlays.git" "retroarch/media/overlays"
fetch_git "$REPO_BASE/libretro/retroarch-assets.git" "retroarch/media/assets" "libretro/retroarch-assets" fetch_git "https://github.com/libretro/retroarch-assets.git" "retroarch/media/assets"
fetch_git "$REPO_BASE/libretro/retroarch-joypad-autoconfig.git" "retroarch/media/autoconfig" "libretro/joypad-autoconfig" fetch_git "https://github.com/libretro/retroarch-joypad-autoconfig.git" "retroarch/media/autoconfig"
fetch_git "$REPO_BASE/libretro/libretro-database.git" "retroarch/media/libretrodb" "libretro/libretro-database" fetch_git "https://github.com/libretro/libretro-database.git" "retroarch/media/libretrodb"
} }
fetch_tools() { fetch_tools() {
fetch_git "$REPO_BASE/libretro/libretro-manifest.git" "libretro-manifest" "libretro/libretro-manifest" fetch_git "https://github.com/libretro/libretro-manifest.git" "libretro-manifest"
fetch_git "$REPO_BASE/libretro/libretrodb.git" "libretrodb" "libretro/libretrodb" fetch_git "https://github.com/libretro/libretrodb.git" "libretrodb"
fetch_git "$REPO_BASE/libretro/libretro-dat-pull.git" "libretro-dat-pull" "libretro/libretro-dat-pull" fetch_git "https://github.com/libretro/libretro-dat-pull.git" "libretro-dat-pull"
} }
fetch_libretro_bsnes() { fetch_libretro_bsnes() {
fetch_project_bsnes "$REPO_BASE/libretro/bsnes-libretro.git" "libretro-bsnes" "libretro/bSNES" fetch_project_bsnes "https://github.com/libretro/bsnes-libretro.git" "libretro-bsnes"
} }
fetch_libretro_snes9x() { fetch_libretro_snes9x() {
fetch_git "$REPO_BASE/libretro/snes9x.git" "libretro-snes9x" "libretro/SNES9x" fetch_git "https://github.com/libretro/snes9x.git" "libretro-snes9x"
} }
fetch_libretro_snes9x_next() { fetch_libretro_snes9x_next() {
fetch_git "$REPO_BASE/libretro/snes9x-next.git" "libretro-snes9x_next" "libretro/SNES9x-Next" fetch_git "https://github.com/libretro/snes9x-next.git" "libretro-snes9x_next"
} }
fetch_libretro_genesis_plus_gx() { fetch_libretro_genesis_plus_gx() {
fetch_git "$REPO_BASE/libretro/Genesis-Plus-GX.git" "libretro-genesis_plus_gx" "libretro/Genplus GX" fetch_git "https://github.com/libretro/Genesis-Plus-GX.git" "libretro-genesis_plus_gx"
} }
fetch_libretro_fb_alpha() { fetch_libretro_fb_alpha() {
fetch_git "$REPO_BASE/libretro/fba-libretro.git" "libretro-fb_alpha" "libretro/FBA" fetch_git "https://github.com/libretro/fba-libretro.git" "libretro-fb_alpha"
} }
fetch_libretro_vba_next() { fetch_libretro_vba_next() {
fetch_git "$REPO_BASE/libretro/vba-next.git" "libretro-vba_next" "libretro/VBA Next" fetch_git "https://github.com/libretro/vba-next.git" "libretro-vba_next"
} }
fetch_libretro_vbam() { fetch_libretro_vbam() {
fetch_git "$REPO_BASE/libretro/vbam-libretro.git" "libretro-vbam" "libretro/VBA-M" fetch_git "https://github.com/libretro/vbam-libretro.git" "libretro-vbam"
} }
fetch_libretro_handy() { fetch_libretro_handy() {
fetch_git "$REPO_BASE/libretro/libretro-handy.git" "libretro-handy" "libretro/Handy" fetch_git "https://github.com/libretro/libretro-handy.git" "libretro-handy"
} }
fetch_libretro_bnes() { fetch_libretro_bnes() {
fetch_git "$REPO_BASE/libretro/bnes-libretro.git" "libretro-bnes" "libretro/bNES" fetch_git "https://github.com/libretro/bnes-libretro.git" "libretro-bnes"
} }
fetch_libretro_fceumm() { fetch_libretro_fceumm() {
fetch_git "$REPO_BASE/libretro/libretro-fceumm.git" "libretro-fceumm" "libretro/FCEUmm" fetch_git "https://github.com/libretro/libretro-fceumm.git" "libretro-fceumm"
} }
fetch_libretro_gambatte() { fetch_libretro_gambatte() {
fetch_git "$REPO_BASE/libretro/gambatte-libretro.git" "libretro-gambatte" "libretro/Gambatte" fetch_git "https://github.com/libretro/gambatte-libretro.git" "libretro-gambatte"
} }
fetch_libretro_meteor() { fetch_libretro_meteor() {
fetch_git "$REPO_BASE/libretro/meteor-libretro.git" "libretro-meteor" "libretro/Meteor" fetch_git "https://github.com/libretro/meteor-libretro.git" "libretro-meteor"
} }
fetch_libretro_nxengine() { fetch_libretro_nxengine() {
fetch_git "$REPO_BASE/libretro/nxengine-libretro.git" "libretro-nxengine" "libretro/NX" fetch_git "https://github.com/libretro/nxengine-libretro.git" "libretro-nxengine"
} }
fetch_libretro_prboom() { fetch_libretro_prboom() {
fetch_git "$REPO_BASE/libretro/libretro-prboom.git" "libretro-prboom" "libretro/PRBoom" fetch_git "https://github.com/libretro/libretro-prboom.git" "libretro-prboom"
} }
fetch_libretro_stella() { fetch_libretro_stella() {
fetch_git "$REPO_BASE/libretro/stella-libretro.git" "libretro-stella" "libretro/Stella" fetch_git "https://github.com/libretro/stella-libretro.git" "libretro-stella"
} }
fetch_libretro_desmume() { fetch_libretro_desmume() {
fetch_git "$REPO_BASE/libretro/desmume.git" "libretro-desmume" "libretro/Desmume" fetch_git "https://github.com/libretro/desmume.git" "libretro-desmume"
} }
fetch_libretro_quicknes() { fetch_libretro_quicknes() {
fetch_git "$REPO_BASE/libretro/QuickNES_Core.git" "libretro-quicknes" "libretro/QuickNES" fetch_git "https://github.com/libretro/QuickNES_Core.git" "libretro-quicknes"
} }
fetch_libretro_nestopia() { fetch_libretro_nestopia() {
fetch_git "$REPO_BASE/libretro/nestopia.git" "libretro-nestopia" "libretro/Nestopia" fetch_git "https://github.com/libretro/nestopia.git" "libretro-nestopia"
} }
fetch_libretro_tyrquake() { fetch_libretro_tyrquake() {
fetch_git "$REPO_BASE/libretro/tyrquake.git" "libretro-tyrquake" "libretro/tyrquake" fetch_git "https://github.com/libretro/tyrquake.git" "libretro-tyrquake"
} }
fetch_libretro_pcsx_rearmed() { fetch_libretro_pcsx_rearmed() {
fetch_git "$REPO_BASE/libretro/pcsx_rearmed.git" "libretro-pcsx_rearmed" "libretro/pcsx_rearmed" fetch_git "https://github.com/libretro/pcsx_rearmed.git" "libretro-pcsx_rearmed"
} }
fetch_libretro_mednafen_gba() { fetch_libretro_mednafen_gba() {
fetch_git "$REPO_BASE/libretro/beetle-gba-libretro.git" "libretro-mednafen_gba" "libretro/Beetle GBA" fetch_git "https://github.com/libretro/beetle-gba-libretro.git" "libretro-mednafen_gba"
} }
fetch_libretro_mednafen_lynx() { fetch_libretro_mednafen_lynx() {
fetch_git "$REPO_BASE/libretro/beetle-lynx-libretro.git" "libretro-mednafen_lynx" "libretro/Beetle Lynx" fetch_git "https://github.com/libretro/beetle-lynx-libretro.git" "libretro-mednafen_lynx"
} }
fetch_libretro_mednafen_ngp() { fetch_libretro_mednafen_ngp() {
fetch_git "$REPO_BASE/libretro/beetle-ngp-libretro.git" "libretro-mednafen_ngp" "libretro/Beetle NGP" fetch_git "https://github.com/libretro/beetle-ngp-libretro.git" "libretro-mednafen_ngp"
} }
fetch_libretro_mednafen_pce_fast() { fetch_libretro_mednafen_pce_fast() {
fetch_git "$REPO_BASE/libretro/beetle-pce-fast-libretro.git" "libretro-mednafen_pce_fast" "libretro/Beetle PCE Fast" fetch_git "https://github.com/libretro/beetle-pce-fast-libretro.git" "libretro-mednafen_pce_fast"
} }
fetch_libretro_mednafen_supergrafx() { fetch_libretro_mednafen_supergrafx() {
fetch_git "$REPO_BASE/libretro/beetle-supergrafx-libretro.git" "libretro-mednafen_supergrafx" "libretro/Beetle SuperGrafx" fetch_git "https://github.com/libretro/beetle-supergrafx-libretro.git" "libretro-mednafen_supergrafx"
} }
fetch_libretro_mednafen_psx() { fetch_libretro_mednafen_psx() {
fetch_git "$REPO_BASE/libretro/mednafen-psx-libretro.git" "libretro-mednafen_psx" "libretro/Mednafen PSX" fetch_git "https://github.com/libretro/mednafen-psx-libretro.git" "libretro-mednafen_psx"
} }
fetch_libretro_mednafen_pcfx() { fetch_libretro_mednafen_pcfx() {
fetch_git "$REPO_BASE/libretro/beetle-pcfx-libretro.git" "libretro-mednafen_pcfx" "libretro/Beetle PCFX" fetch_git "https://github.com/libretro/beetle-pcfx-libretro.git" "libretro-mednafen_pcfx"
} }
fetch_libretro_mednafen_snes() { fetch_libretro_mednafen_snes() {
fetch_git "$REPO_BASE/libretro/beetle-bsnes-libretro.git" "libretro-mednafen_snes" "libretro/Beetle bSNES" fetch_git "https://github.com/libretro/beetle-bsnes-libretro.git" "libretro-mednafen_snes"
} }
fetch_libretro_mednafen_vb() { fetch_libretro_mednafen_vb() {
fetch_git "$REPO_BASE/libretro/beetle-vb-libretro.git" "libretro-mednafen_vb" "libretro/Beetle VB" fetch_git "https://github.com/libretro/beetle-vb-libretro.git" "libretro-mednafen_vb"
} }
fetch_libretro_mednafen_wswan() { fetch_libretro_mednafen_wswan() {
fetch_git "$REPO_BASE/libretro/beetle-wswan-libretro.git" "libretro-mednafen_wswan" "libretro/Beetle WSwan" fetch_git "https://github.com/libretro/beetle-wswan-libretro.git" "libretro-mednafen_wswan"
} }
fetch_libretro_scummvm() { fetch_libretro_scummvm() {
fetch_git "$REPO_BASE/libretro/scummvm.git" "libretro-scummvm" "libretro/scummvm" fetch_git "https://github.com/libretro/scummvm.git" "libretro-scummvm"
} }
fetch_libretro_yabause() { fetch_libretro_yabause() {
fetch_git "$REPO_BASE/libretro/yabause.git" "libretro-yabause" "libretro/yabause" fetch_git "https://github.com/libretro/yabause.git" "libretro-yabause"
} }
fetch_libretro_dosbox() { fetch_libretro_dosbox() {
fetch_git "$REPO_BASE/libretro/dosbox-libretro.git" "libretro-dosbox" "libretro/dosbox" fetch_git "https://github.com/libretro/dosbox-libretro.git" "libretro-dosbox"
} }
fetch_libretro_virtualjaguar() { fetch_libretro_virtualjaguar() {
fetch_git "$REPO_BASE/libretro/virtualjaguar-libretro.git" "libretro-virtualjaguar" "libretro/virtualjaguar" fetch_git "https://github.com/libretro/virtualjaguar-libretro.git" "libretro-virtualjaguar"
} }
fetch_libretro_mame078() { fetch_libretro_mame078() {
fetch_git "$REPO_BASE/libretro/mame2003-libretro.git" "libretro-mame078" "libretro/mame078" fetch_git "https://github.com/libretro/mame2003-libretro.git" "libretro-mame078"
} }
fetch_libretro_mame139() { fetch_libretro_mame139() {
fetch_git "$REPO_BASE/libretro/mame2010-libretro.git" "libretro-mame139" "libretro/mame139" fetch_git "https://github.com/libretro/mame2010-libretro.git" "libretro-mame139"
} }
fetch_libretro_mame() { fetch_libretro_mame() {
fetch_git "$REPO_BASE/libretro/mame.git" "libretro-mame" "libretro/mame" fetch_git "https://github.com/libretro/mame.git" "libretro-mame"
} }
fetch_libretro_ffmpeg() { fetch_libretro_ffmpeg() {
fetch_git "$REPO_BASE/libretro/FFmpeg.git" "libretro-ffmpeg" "libretro/FFmpeg" fetch_git "https://github.com/libretro/FFmpeg.git" "libretro-ffmpeg"
} }
fetch_libretro_bsnes_cplusplus98() { fetch_libretro_bsnes_cplusplus98() {
fetch_git "$REPO_BASE/libretro/bsnes-libretro-cplusplus98.git" "libretro-bsnes_cplusplus98" "libretro/bsnes-cplusplus98" fetch_git "https://github.com/libretro/bsnes-libretro-cplusplus98.git" "libretro-bsnes_cplusplus98"
} }
fetch_libretro_bsnes_mercury() { fetch_libretro_bsnes_mercury() {
fetch_git "$REPO_BASE/libretro/bsnes-mercury.git" "libretro-bsnes_mercury" "libretro/bsnes-mercury" fetch_git "https://github.com/libretro/bsnes-mercury.git" "libretro-bsnes_mercury"
} }
fetch_libretro_picodrive() { fetch_libretro_picodrive() {
fetch_git_submodules "$REPO_BASE/libretro/picodrive.git" "libretro-picodrive" "libretro/picodrive" fetch_git "https://github.com/libretro/picodrive.git" "libretro-picodrive" "1" "1"
} }
fetch_libretro_tgbdual() { fetch_libretro_tgbdual() {
fetch_git "$REPO_BASE/libretro/tgbdual-libretro.git" "libretro-tgbdual" "libretro/tgbdual" fetch_git "https://github.com/libretro/tgbdual-libretro.git" "libretro-tgbdual"
} }
fetch_libretro_mupen64plus() { fetch_libretro_mupen64plus() {
fetch_git "$REPO_BASE/libretro/mupen64plus-libretro.git" "libretro-mupen64plus" "libretro/mupen64plus" fetch_git "https://github.com/libretro/mupen64plus-libretro.git" "libretro-mupen64plus"
} }
fetch_libretro_dinothawr() { fetch_libretro_dinothawr() {
fetch_git "$REPO_BASE/libretro/Dinothawr.git" "libretro-dinothawr" "libretro/Dinothawr" fetch_git "https://github.com/libretro/Dinothawr.git" "libretro-dinothawr"
} }
fetch_libretro_uae() { fetch_libretro_uae() {
fetch_git "$REPO_BASE/libretro/libretro-uae.git" "libretro-uae" "libretro/UAE" fetch_git "https://github.com/libretro/libretro-uae.git" "libretro-uae"
} }
fetch_libretro_3dengine() { fetch_libretro_3dengine() {
fetch_git "$REPO_BASE/libretro/libretro-3dengine.git" "libretro-3dengine" "libretro/3DEngine" fetch_git "https://github.com/libretro/libretro-3dengine.git" "libretro-3dengine"
} }
fetch_libretro_remotejoy() { fetch_libretro_remotejoy() {
fetch_git "$REPO_BASE/libretro/libretro-remotejoy.git" "libretro-remotejoy" "libretro/RemoteJoy" fetch_git "https://github.com/libretro/libretro-remotejoy.git" "libretro-remotejoy"
} }
fetch_libretro_bluemsx() { fetch_libretro_bluemsx() {
fetch_git "$REPO_BASE/libretro/blueMSX-libretro.git" "libretro-bluemsx" "libretro/blueMSX" fetch_git "https://github.com/libretro/blueMSX-libretro.git" "libretro-bluemsx"
} }
fetch_libretro_fmsx() { fetch_libretro_fmsx() {
fetch_git "$REPO_BASE/libretro/fmsx-libretro.git" "libretro-fmsx" "libretro/fmsx" fetch_git "https://github.com/libretro/fmsx-libretro.git" "libretro-fmsx"
} }
fetch_libretro_2048() { fetch_libretro_2048() {
fetch_git "$REPO_BASE/libretro/libretro-2048.git" "libretro-2048" "libretro/2048" fetch_git "https://github.com/libretro/libretro-2048.git" "libretro-2048"
} }
fetch_libretro_vecx() { fetch_libretro_vecx() {
fetch_git "$REPO_BASE/libretro/libretro-vecx.git" "libretro-vecx" "libretro/vecx" fetch_git "https://github.com/libretro/libretro-vecx.git" "libretro-vecx"
} }
fetch_libretro_ppsspp() { fetch_libretro_ppsspp() {
fetch_git_submodules "$REPO_BASE/libretro/ppsspp.git" "libretro-ppsspp" "libretro/ppsspp" fetch_git "https://github.com/libretro/ppsspp.git" "libretro-ppsspp" "1" "1"
} }
fetch_libretro_prosystem() { fetch_libretro_prosystem() {
fetch_git "$REPO_BASE/libretro/prosystem-libretro.git" "libretro-prosystem" "libretro/prosystem" fetch_git "https://github.com/libretro/prosystem-libretro.git" "libretro-prosystem"
} }
fetch_libretro_o2em() { fetch_libretro_o2em() {
fetch_git "$REPO_BASE/libretro/libretro-o2em.git" "libretro-o2em" "libretro/o2em" fetch_git "https://github.com/libretro/libretro-o2em.git" "libretro-o2em"
} }
fetch_libretro_4do() { fetch_libretro_4do() {
fetch_git "$REPO_BASE/libretro/4do-libretro.git" "libretro-4do" "libretro/4do" fetch_git "https://github.com/libretro/4do-libretro.git" "libretro-4do"
} }
fetch_libretro_catsfc() { fetch_libretro_catsfc() {
fetch_git "$REPO_BASE/libretro/CATSFC-libretro.git" "libretro-catsfc" "libretro/CATSFC" fetch_git "https://github.com/libretro/CATSFC-libretro.git" "libretro-catsfc"
} }
fetch_libretro_stonesoup() { fetch_libretro_stonesoup() {
fetch_git_submodules_no_update "$REPO_BASE/libretro/crawl-ref.git" "libretro-stonesoup" "libretro/DungeonCrawler StoneSoup" fetch_git "https://github.com/libretro/crawl-ref.git" "libretro-stonesoup" "1" ""
} }
fetch_libretro_hatari() { fetch_libretro_hatari() {
fetch_git "$REPO_BASE/libretro/hatari.git" "libretro-hatari" "libretro/hatari" fetch_git "https://github.com/libretro/hatari.git" "libretro-hatari"
} }
fetch_libretro_tempgba() { fetch_libretro_tempgba() {
fetch_git "$REPO_BASE/libretro/TempGBA-libretro.git" "libretro-tempgba" "libretro/TempGBA" fetch_git "https://github.com/libretro/TempGBA-libretro.git" "libretro-tempgba"
} }
fetch_libretro_gpsp() { fetch_libretro_gpsp() {
fetch_git "$REPO_BASE/libretro/gpsp.git" "libretro-gpsp" "libretro/gpsp" fetch_git "https://github.com/libretro/gpsp.git" "libretro-gpsp"
} }
fetch_libretro_emux() { fetch_libretro_emux() {
fetch_git "$REPO_BASE/libretro/emux.git" "libretro-emux" "libretro/Emux" fetch_git "https://github.com/libretro/emux.git" "libretro-emux"
} }
fetch_libretro_sdk() { fetch_libretro_sdk() {
fetch_git "$REPO_BASE/libretro/libretro-sdk.git" "libretro-sdk" "libretro/SDK" fetch_git "https://github.com/libretro/libretro-sdk.git" "libretro-sdk"
} }
if [ -n "${1}" ]; then if [ -n "${1}" ]; then
while [ -n "${1}" ]; do while [ -n "${1}" ]; do
"${1}" "${1}"
shift shift
done done
else else
fetch_retroarch fetch_retroarch
fetch_tools fetch_tools
fetch_libretro_bsnes fetch_libretro_bsnes
fetch_libretro_snes9x fetch_libretro_snes9x
fetch_libretro_snes9x_next fetch_libretro_snes9x_next
fetch_libretro_genesis_plus_gx fetch_libretro_genesis_plus_gx
fetch_libretro_fb_alpha fetch_libretro_fb_alpha
fetch_libretro_vba_next fetch_libretro_vba_next
fetch_libretro_vbam fetch_libretro_vbam
fetch_libretro_handy fetch_libretro_handy
fetch_libretro_bnes fetch_libretro_bnes
fetch_libretro_fceumm fetch_libretro_fceumm
fetch_libretro_gambatte fetch_libretro_gambatte
fetch_libretro_meteor fetch_libretro_meteor
fetch_libretro_nxengine fetch_libretro_nxengine
fetch_libretro_prboom fetch_libretro_prboom
fetch_libretro_stella fetch_libretro_stella
fetch_libretro_desmume fetch_libretro_desmume
fetch_libretro_quicknes fetch_libretro_quicknes
fetch_libretro_nestopia fetch_libretro_nestopia
fetch_libretro_tyrquake fetch_libretro_tyrquake
fetch_libretro_pcsx_rearmed fetch_libretro_pcsx_rearmed
fetch_libretro_mednafen_gba fetch_libretro_mednafen_gba
fetch_libretro_mednafen_lynx fetch_libretro_mednafen_lynx
fetch_libretro_mednafen_ngp fetch_libretro_mednafen_ngp
fetch_libretro_mednafen_pce_fast fetch_libretro_mednafen_pce_fast
fetch_libretro_mednafen_supergrafx fetch_libretro_mednafen_supergrafx
fetch_libretro_mednafen_psx fetch_libretro_mednafen_psx
fetch_libretro_mednafen_pcfx fetch_libretro_mednafen_pcfx
fetch_libretro_mednafen_snes fetch_libretro_mednafen_snes
fetch_libretro_mednafen_vb fetch_libretro_mednafen_vb
fetch_libretro_mednafen_wswan fetch_libretro_mednafen_wswan
fetch_libretro_scummvm fetch_libretro_scummvm
fetch_libretro_yabause fetch_libretro_yabause
fetch_libretro_dosbox fetch_libretro_dosbox
fetch_libretro_virtualjaguar fetch_libretro_virtualjaguar
fetch_libretro_mame078 fetch_libretro_mame078
fetch_libretro_mame139 fetch_libretro_mame139
fetch_libretro_mame fetch_libretro_mame
fetch_libretro_ffmpeg fetch_libretro_ffmpeg
fetch_libretro_bsnes_cplusplus98 fetch_libretro_bsnes_cplusplus98
fetch_libretro_bsnes_mercury fetch_libretro_bsnes_mercury
fetch_libretro_picodrive fetch_libretro_picodrive
fetch_libretro_tgbdual fetch_libretro_tgbdual
fetch_libretro_mupen64plus fetch_libretro_mupen64plus
fetch_libretro_dinothawr fetch_libretro_dinothawr
fetch_libretro_uae fetch_libretro_uae
fetch_libretro_3dengine fetch_libretro_3dengine
fetch_libretro_remotejoy fetch_libretro_remotejoy
fetch_libretro_bluemsx fetch_libretro_bluemsx
fetch_libretro_fmsx fetch_libretro_fmsx
fetch_libretro_2048 fetch_libretro_2048
fetch_libretro_vecx fetch_libretro_vecx
fetch_libretro_ppsspp fetch_libretro_ppsspp
fetch_libretro_prosystem fetch_libretro_prosystem
fetch_libretro_o2em fetch_libretro_o2em
fetch_libretro_4do fetch_libretro_4do
fetch_libretro_catsfc fetch_libretro_catsfc
fetch_libretro_stonesoup fetch_libretro_stonesoup
fetch_libretro_hatari fetch_libretro_hatari
fetch_libretro_tempgba fetch_libretro_tempgba
fetch_libretro_gpsp fetch_libretro_gpsp
fetch_libretro_emux fetch_libretro_emux
fetch_libretro_sdk fetch_libretro_sdk
fi fi