2013-12-09 01:10:42 +00:00
|
|
|
#!/bin/bash
|
2011-11-02 15:27:23 +00:00
|
|
|
|
2013-05-18 00:53:55 +00:00
|
|
|
. ./libretro-config.sh
|
|
|
|
|
2013-05-08 11:00:38 +00:00
|
|
|
# BSDs don't have readlink -f
|
|
|
|
read_link()
|
|
|
|
{
|
|
|
|
TARGET_FILE="$1"
|
|
|
|
cd $(dirname "$TARGET_FILE")
|
|
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
|
|
|
|
|
|
while [ -L "$TARGET_FILE" ]
|
|
|
|
do
|
|
|
|
TARGET_FILE=$(readlink "$TARGET_FILE")
|
|
|
|
cd $(dirname "$TARGET_FILE")
|
|
|
|
TARGET_FILE=$(basename "$TARGET_FILE")
|
|
|
|
done
|
|
|
|
|
|
|
|
PHYS_DIR=$(pwd -P)
|
|
|
|
RESULT="$PHYS_DIR/$TARGET_FILE"
|
|
|
|
echo $RESULT
|
|
|
|
}
|
|
|
|
|
|
|
|
SCRIPT=$(read_link "$0")
|
|
|
|
echo "Script: $SCRIPT"
|
2013-05-08 10:39:37 +00:00
|
|
|
BASE_DIR=$(dirname "$SCRIPT")
|
2013-05-20 07:18:17 +00:00
|
|
|
if [ -z "$RARCH_DIST_DIR" ]; then
|
|
|
|
RARCH_DIR="$BASE_DIR/dist"
|
|
|
|
RARCH_DIST_DIR="$RARCH_DIR/$DIST_DIR"
|
|
|
|
fi
|
2013-05-08 10:39:37 +00:00
|
|
|
|
|
|
|
if [ -z "$JOBS" ]; then
|
2013-10-05 03:57:10 +00:00
|
|
|
JOBS=7
|
2013-05-08 10:39:37 +00:00
|
|
|
fi
|
2013-04-29 20:12:35 +00:00
|
|
|
|
2011-11-02 15:27:23 +00:00
|
|
|
die()
|
|
|
|
{
|
|
|
|
echo $1
|
2012-04-16 17:33:18 +00:00
|
|
|
#exit 1
|
2011-11-02 15:27:23 +00:00
|
|
|
}
|
|
|
|
|
2013-05-18 22:12:36 +00:00
|
|
|
if [ "$HOST_CC" ]; then
|
|
|
|
CC="${HOST_CC}-gcc"
|
|
|
|
CXX="${HOST_CC}-g++"
|
2013-11-25 03:02:44 +00:00
|
|
|
CXX11="${HOST_CC}-g++"
|
2013-05-18 22:12:36 +00:00
|
|
|
STRIP="${HOST_CC}-strip"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$MAKE" ]; then
|
2013-12-25 15:08:15 +00:00
|
|
|
if uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
2013-05-18 22:12:36 +00:00
|
|
|
MAKE=mingw32-make
|
|
|
|
else
|
2013-12-25 22:22:31 +00:00
|
|
|
if type gmake > /dev/null 2>&1; then
|
|
|
|
MAKE=gmake
|
|
|
|
else
|
|
|
|
MAKE=make
|
|
|
|
fi
|
2013-05-18 22:12:36 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2013-12-25 15:08:15 +00:00
|
|
|
|
2013-05-08 11:00:38 +00:00
|
|
|
if [ -z "$CC" ]; then
|
2013-12-25 22:22:31 +00:00
|
|
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
2014-04-14 04:11:43 +00:00
|
|
|
CC=cc
|
2013-12-25 15:08:15 +00:00
|
|
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
2013-05-18 22:12:36 +00:00
|
|
|
CC=mingw32-gcc
|
|
|
|
else
|
|
|
|
CC=gcc
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -z "$CXX" ]; then
|
2013-12-25 22:22:31 +00:00
|
|
|
if [ $FORMAT_COMPILER_TARGET = "osx" ]; then
|
|
|
|
CXX=c++
|
|
|
|
CXX11="clang++ -std=c++11 -stdlib=libc++"
|
|
|
|
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
|
|
|
|
CXX=mingw32-g++
|
|
|
|
CXX11=mingw32-g++
|
|
|
|
else
|
|
|
|
CXX=g++
|
|
|
|
CXX11=g++
|
|
|
|
fi
|
2013-05-08 11:00:38 +00:00
|
|
|
fi
|
|
|
|
|
2013-11-08 06:39:55 +00:00
|
|
|
FORMAT_COMPILER_TARGET_ALT=$FORMAT_COMPILER_TARGET
|
2013-05-19 10:03:25 +00:00
|
|
|
echo "CC = $CC"
|
|
|
|
echo "CXX = $CXX"
|
|
|
|
echo "STRIP = $STRIP"
|
|
|
|
|
|
|
|
. ./libretro-build-common.sh
|
|
|
|
|
2013-05-03 09:32:01 +00:00
|
|
|
mkdir -p "$RARCH_DIST_DIR"
|
|
|
|
|
2013-05-03 15:17:38 +00:00
|
|
|
if [ $1 ]; then
|
|
|
|
$1
|
|
|
|
else
|
2013-12-15 19:38:44 +00:00
|
|
|
build_libretro_bsnes_cplusplus98
|
2013-05-19 08:55:09 +00:00
|
|
|
build_libretro_bsnes
|
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
|
|
|
|
build_libretro_beetle_psx
|
|
|
|
build_libretro_beetle_snes
|
2013-05-03 15:17:38 +00:00
|
|
|
build_libretro_s9x
|
|
|
|
build_libretro_s9x_next
|
|
|
|
build_libretro_genplus
|
2013-05-18 17:04:19 +00:00
|
|
|
build_libretro_fba_full
|
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
|
2013-09-05 01:11:59 +00:00
|
|
|
check_opengl
|
|
|
|
build_libretro_modelviewer
|
2013-12-20 15:20:05 +00:00
|
|
|
build_libretro_modelviewer_location
|
2013-09-05 01:11:59 +00:00
|
|
|
build_libretro_scenewalker
|
|
|
|
build_libretro_instancingviewer
|
2013-11-25 02:54:24 +00:00
|
|
|
build_libretro_instancingviewer_camera
|
2013-09-05 01:11:59 +00:00
|
|
|
build_libretro_mupen64
|
2013-09-23 02:03:55 +00:00
|
|
|
build_libretro_ffmpeg
|
2013-09-23 02:16:28 +00:00
|
|
|
build_libretro_dinothawr
|
2014-01-13 13:58:11 +00:00
|
|
|
build_libretro_3dengine
|
2013-05-03 15:17:38 +00:00
|
|
|
fi
|