2015-02-02 17:57:07 +00:00
|
|
|
#! /bin/bash
|
|
|
|
# vi: sw=3 ts=3 et
|
2013-05-18 00:53:55 +00:00
|
|
|
|
2013-05-08 11:00:38 +00:00
|
|
|
# BSDs don't have readlink -f
|
|
|
|
read_link()
|
|
|
|
{
|
2015-02-02 17:57:07 +00:00
|
|
|
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}"`"
|
2013-05-08 11:00:38 +00:00
|
|
|
done
|
|
|
|
|
2015-02-02 17:57:07 +00:00
|
|
|
PHYS_DIR="`pwd -P`"
|
|
|
|
RESULT="${PHYS_DIR}/${TARGET_FILE}"
|
|
|
|
echo ${RESULT}
|
2013-05-08 11:00:38 +00:00
|
|
|
}
|
2015-02-02 17:57:07 +00:00
|
|
|
SCRIPT="`read_link "$0"`"
|
|
|
|
BASE_DIR="`dirname "${SCRIPT}"`"
|
|
|
|
WORKDIR="`pwd`"
|
2015-02-06 12:00:22 +00:00
|
|
|
|
2015-02-02 17:57:07 +00:00
|
|
|
. ${BASE_DIR}/libretro-config.sh
|
2015-02-06 11:30:20 +00:00
|
|
|
|
|
|
|
if [ -z "$RARCH_DIST_DIR" ]; then
|
|
|
|
RARCH_DIR="${WORKDIR}/dist"
|
|
|
|
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$JOBS" ]; then
|
|
|
|
JOBS=7
|
|
|
|
fi
|
|
|
|
|
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo $1
|
|
|
|
#exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$HOST_CC" ]; then
|
|
|
|
CC="${HOST_CC}-gcc"
|
|
|
|
CXX="${HOST_CC}-g++"
|
|
|
|
CXX11="${HOST_CC}-g++"
|
|
|
|
STRIP="${HOST_CC}-strip"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$MAKE" ]; then
|
|
|
|
if uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
|
|
|
MAKE=mingw32-make
|
|
|
|
else
|
|
|
|
if type gmake > /dev/null 2>&1; then
|
|
|
|
MAKE=gmake
|
|
|
|
else
|
|
|
|
MAKE=make
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z "$CC" ]; then
|
|
|
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
|
|
|
CC=cc
|
|
|
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
|
|
|
CC=mingw32-gcc
|
|
|
|
else
|
|
|
|
CC=gcc
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$CXX" ]; then
|
|
|
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
|
|
|
CXX=c++
|
|
|
|
CXX11="clang++ -std=c++11 -stdlib=libc++"
|
2015-02-10 21:13:41 +00:00
|
|
|
# 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
|
2015-02-06 11:30:20 +00:00
|
|
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
|
|
|
CXX=mingw32-g++
|
|
|
|
CXX11=mingw32-g++
|
|
|
|
else
|
|
|
|
CXX=g++
|
|
|
|
CXX11=g++
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET
|
|
|
|
echo "CC = $CC"
|
|
|
|
echo "CXX = $CXX"
|
2015-02-10 21:13:41 +00:00
|
|
|
echo "CXX11 = $CXX11"
|
2015-02-06 11:30:20 +00:00
|
|
|
echo "STRIP = $STRIP"
|
|
|
|
|
2015-02-02 17:57:07 +00:00
|
|
|
. ${BASE_DIR}/libretro-build-common.sh
|
2013-05-19 10:03:25 +00:00
|
|
|
|
2013-05-03 09:32:01 +00:00
|
|
|
mkdir -p "$RARCH_DIST_DIR"
|
|
|
|
|
2015-02-02 09:29:51 +00:00
|
|
|
if [ -n "${1}" ]; then
|
2015-01-31 03:21:57 +00:00
|
|
|
NOBUILD_SUMMARY=1
|
2015-02-02 09:29:51 +00:00
|
|
|
while [ -n "${1}" ]; do
|
|
|
|
"${1}"
|
|
|
|
shift
|
|
|
|
done
|
2013-05-03 15:17:38 +00:00
|
|
|
else
|
2014-07-29 15:04:07 +00:00
|
|
|
build_libretro_2048
|
2014-10-29 04:04:14 +00:00
|
|
|
build_libretro_4do
|
2014-07-07 20:47:26 +00:00
|
|
|
build_libretro_bluemsx
|
|
|
|
build_libretro_fmsx
|
2013-12-15 19:38:44 +00:00
|
|
|
build_libretro_bsnes_cplusplus98
|
2013-05-19 08:55:09 +00:00
|
|
|
build_libretro_bsnes
|
2014-08-22 20:10:06 +00:00
|
|
|
build_libretro_bsnes_mercury
|
2014-06-22 22:41:47 +00:00
|
|
|
build_libretro_beetle_lynx
|
2014-06-22 21:34:25 +00:00
|
|
|
build_libretro_beetle_gba
|
2014-06-22 00:12:59 +00:00
|
|
|
build_libretro_beetle_ngp
|
|
|
|
build_libretro_beetle_pce_fast
|
2014-06-22 03:13:43 +00:00
|
|
|
build_libretro_beetle_supergrafx
|
2014-06-22 01:14:12 +00:00
|
|
|
build_libretro_beetle_pcfx
|
2014-06-22 00:12:59 +00:00
|
|
|
build_libretro_beetle_vb
|
|
|
|
build_libretro_beetle_wswan
|
2014-12-03 10:40:11 +00:00
|
|
|
build_libretro_mednafen_psx
|
2014-06-22 00:12:59 +00:00
|
|
|
build_libretro_beetle_snes
|
2014-10-31 18:59:18 +00:00
|
|
|
build_libretro_catsfc
|
2014-08-22 10:17:52 +00:00
|
|
|
build_libretro_snes9x
|
|
|
|
build_libretro_snes9x_next
|
2014-08-22 10:28:27 +00:00
|
|
|
build_libretro_genesis_plus_gx
|
2014-08-22 13:39:20 +00:00
|
|
|
build_libretro_fb_alpha
|
2013-09-22 12:59:56 +00:00
|
|
|
build_libretro_vbam
|
2013-08-15 12:50:25 +00:00
|
|
|
build_libretro_vba_next
|
2013-05-03 15:17:38 +00:00
|
|
|
build_libretro_bnes
|
2014-04-14 03:53:23 +00:00
|
|
|
build_libretro_fceumm
|
2013-05-03 15:17:38 +00:00
|
|
|
build_libretro_gambatte
|
|
|
|
build_libretro_meteor
|
|
|
|
build_libretro_nx
|
|
|
|
build_libretro_prboom
|
|
|
|
build_libretro_stella
|
|
|
|
build_libretro_quicknes
|
|
|
|
build_libretro_nestopia
|
|
|
|
build_libretro_tyrquake
|
2013-05-05 15:54:04 +00:00
|
|
|
build_libretro_mame078
|
2013-09-23 02:03:55 +00:00
|
|
|
build_libretro_mame
|
2013-05-05 16:09:42 +00:00
|
|
|
build_libretro_dosbox
|
2013-05-06 09:11:17 +00:00
|
|
|
build_libretro_scummvm
|
2013-06-30 15:33:15 +00:00
|
|
|
build_libretro_picodrive
|
2013-08-26 19:34:09 +00:00
|
|
|
build_libretro_handy
|
2014-03-23 15:42:24 +00:00
|
|
|
build_libretro_desmume
|
2013-12-25 22:22:31 +00:00
|
|
|
if [ $FORMAT_COMPILER_TARGET != "win" ]; then
|
|
|
|
build_libretro_pcsx_rearmed
|
|
|
|
fi
|
2014-08-09 19:39:34 +00:00
|
|
|
build_libretro_yabause
|
|
|
|
build_libretro_vecx
|
|
|
|
build_libretro_tgbdual
|
|
|
|
build_libretro_prosystem
|
2014-08-09 20:28:37 +00:00
|
|
|
build_libretro_dinothawr
|
|
|
|
build_libretro_virtualjaguar
|
2013-09-05 01:11:59 +00:00
|
|
|
build_libretro_mupen64
|
2013-09-23 02:03:55 +00:00
|
|
|
build_libretro_ffmpeg
|
2014-01-13 13:58:11 +00:00
|
|
|
build_libretro_3dengine
|
2014-08-07 02:43:23 +00:00
|
|
|
build_libretro_ppsspp
|
2014-08-14 19:50:16 +00:00
|
|
|
build_libretro_o2em
|
2014-11-27 22:27:00 +00:00
|
|
|
build_libretro_hatari
|
2014-12-12 22:40:31 +00:00
|
|
|
build_libretro_gpsp
|
2014-12-22 08:10:07 +00:00
|
|
|
build_libretro_emux
|
2015-01-31 03:01:14 +00:00
|
|
|
build_summary
|
2013-05-03 15:17:38 +00:00
|
|
|
fi
|
2015-01-30 10:38:10 +00:00
|
|
|
|