2013-12-09 01:10:42 +00:00
|
|
|
#!/bin/bash
|
2013-05-01 02:11:22 +00:00
|
|
|
|
2013-07-21 16:55:37 +00:00
|
|
|
# Architecture Assignment
|
2013-10-13 14:29:27 +00:00
|
|
|
[[ -z "$ARCH" ]] && ARCH="$(uname -m)"
|
2013-07-21 16:55:37 +00:00
|
|
|
case "$ARCH" in
|
2013-08-04 20:59:05 +00:00
|
|
|
x86_64)
|
|
|
|
X86=true && X86_64=true
|
|
|
|
;;
|
2013-07-21 16:55:37 +00:00
|
|
|
i686) X86=true;;
|
|
|
|
armv*)
|
|
|
|
ARM=true && export FORMAT_COMPILER_TARGET=armv
|
|
|
|
export RARCHCFLAGS="${RARCHCFLAGS} -marm"
|
|
|
|
case "$ARCH" in
|
|
|
|
armv5tel) ARMV5=true;;
|
|
|
|
armv6l) ARMV6=true;;
|
|
|
|
armv7l) ARMV7=true;;
|
|
|
|
esac;;
|
|
|
|
esac
|
2014-03-21 22:44:24 +00:00
|
|
|
|
2014-05-16 17:54:50 +00:00
|
|
|
if [[ -n "$PROCESSOR_ARCHITEW6432" && $PROCESSOR_ARCHITEW6432 -eq "AMD64" ]]; then
|
2014-03-21 22:44:24 +00:00
|
|
|
ARCH=x86_64
|
|
|
|
X86=true && X86_64=true
|
|
|
|
fi
|
|
|
|
|
2013-07-21 16:55:37 +00:00
|
|
|
echo "$ARCH CPU detected"
|
|
|
|
|
2014-07-27 02:03:21 +00:00
|
|
|
if command -v nproc >/dev/null; then
|
|
|
|
JOBS=$(nproc)
|
|
|
|
else
|
2014-07-27 02:03:50 +00:00
|
|
|
JOBS=1
|
2014-07-27 02:03:21 +00:00
|
|
|
fi
|
|
|
|
|
2013-07-21 16:55:37 +00:00
|
|
|
# Platform Assignment
|
2013-07-21 19:54:23 +00:00
|
|
|
[ -z "$platform" ] && platform="$(uname)"
|
|
|
|
case "$platform" in
|
|
|
|
*BSD*)
|
|
|
|
FORMAT_EXT='so'
|
|
|
|
FORMAT_COMPILER_TARGET=unix
|
|
|
|
DIST_DIR=bsd;;
|
|
|
|
osx|*Darwin*)
|
|
|
|
FORMAT_EXT='dylib'
|
|
|
|
FORMAT_COMPILER_TARGET=osx
|
|
|
|
DIST_DIR=osx;;
|
|
|
|
win|*mingw*|*MINGW*)
|
|
|
|
FORMAT_EXT='dll'
|
|
|
|
FORMAT_COMPILER_TARGET=win
|
|
|
|
DIST_DIR=win;;
|
|
|
|
*)
|
|
|
|
FORMAT_EXT='so'
|
|
|
|
FORMAT_COMPILER_TARGET=unix
|
|
|
|
DIST_DIR=unix;;
|
|
|
|
esac
|
2013-07-21 16:55:37 +00:00
|
|
|
|
|
|
|
export FORMAT_COMPILER_TARGET_ALT="$FORMAT_COMPILER_TARGET"
|
|
|
|
|
2013-05-01 02:11:22 +00:00
|
|
|
#if uncommented, will fetch repos with read+write access. Useful for committers
|
2013-07-13 16:31:10 +00:00
|
|
|
#export WRITERIGHTS=1
|
2013-05-18 00:53:55 +00:00
|
|
|
|
2013-06-30 16:23:26 +00:00
|
|
|
|
|
|
|
#if uncommented, will build experimental cores as well which are not yet fit for release.
|
2013-07-13 16:31:10 +00:00
|
|
|
#export BUILD_EXPERIMENTAL=1
|
2013-07-13 15:32:29 +00:00
|
|
|
|
|
|
|
#ARM DEFINES
|
2013-08-04 20:59:05 +00:00
|
|
|
#===========
|
|
|
|
|
2013-07-13 15:32:29 +00:00
|
|
|
#if uncommented, will build cores with Cortex A8 compiler optimizations
|
2013-07-13 16:31:10 +00:00
|
|
|
#export CORTEX_A8=1
|
2013-07-13 15:32:29 +00:00
|
|
|
|
|
|
|
#if uncommented, will build cores with Cortex A9 compiler optimizations
|
2013-07-13 16:31:10 +00:00
|
|
|
#export CORTEX_A9=1
|
2013-07-13 15:32:29 +00:00
|
|
|
|
|
|
|
#if uncommented, will build cores with ARM hardfloat ABI
|
2013-07-13 16:31:10 +00:00
|
|
|
#export ARM_HARDFLOAT=1
|
2013-07-13 15:32:29 +00:00
|
|
|
|
|
|
|
#if uncommented, will build cores with ARM softfloat ABI
|
2013-07-13 16:31:10 +00:00
|
|
|
#export ARM_SOFTFLOAT=1
|
2013-07-13 15:32:29 +00:00
|
|
|
|
|
|
|
#if uncommented, will build cores with ARM NEON support (ARMv7+ only)
|
2013-07-13 16:31:10 +00:00
|
|
|
#export ARM_NEON=1
|
2013-07-13 20:09:41 +00:00
|
|
|
|
|
|
|
#OPENGL DEFINES
|
2013-08-04 20:59:05 +00:00
|
|
|
#==============
|
2013-07-13 20:09:41 +00:00
|
|
|
|
2013-07-13 20:21:55 +00:00
|
|
|
#if uncommented, will build libretro GL cores. Ignored for mobile platforms - GL cores will always be built there.
|
2014-08-22 06:01:46 +00:00
|
|
|
export BUILD_LIBRETRO_GL=1
|
2013-07-13 20:09:41 +00:00
|
|
|
|
|
|
|
#if uncommented, will build cores with OpenGL ES 2 support. Not needed
|
2013-07-13 20:21:55 +00:00
|
|
|
#for platform-specific cores - only for generic core builds (ie. libretro-build.sh)
|
2013-07-13 20:09:41 +00:00
|
|
|
#export ENABLE_GLES=1
|
2013-08-04 20:59:05 +00:00
|
|
|
|
|
|
|
#ANDROID DEFINES
|
|
|
|
#================
|
|
|
|
|
2014-08-22 06:01:46 +00:00
|
|
|
export TARGET_ABIS="armeabi armeabi-v7a mips x86"
|
2014-08-18 04:19:31 +00:00
|
|
|
|
2013-08-04 20:59:05 +00:00
|
|
|
#uncomment to define NDK standalone toolchain for ARM
|
|
|
|
#export NDK_ROOT_DIR_ARM =
|
|
|
|
|
|
|
|
#uncomment to define NDK standalone toolchain for MIPS
|
|
|
|
#export NDK_ROOT_DIR_MIPS =
|
|
|
|
|
|
|
|
#uncomment to define NDK standalone toolchain for x86
|
|
|
|
#export NDK_ROOT_DIR_X86 =
|
2014-08-18 04:24:40 +00:00
|
|
|
|
|
|
|
# android version target if GLES is in use
|
2014-08-19 09:55:24 +00:00
|
|
|
export NDK_GL_HEADER_VER=android-18
|
2014-08-18 04:24:40 +00:00
|
|
|
|
|
|
|
# android version target if GLES is not in use
|
2014-08-19 09:55:24 +00:00
|
|
|
export NDK_NO_GL_HEADER_VER=android-9
|
2014-08-20 18:03:40 +00:00
|
|
|
|
|
|
|
# Retroarch target android API level
|
|
|
|
export RA_ANDROID_API=android-18
|
|
|
|
|
|
|
|
# Retroarch minimum API level (defines low end android version compatability)
|
|
|
|
export RA_ANDROID_MIN_API=android-9
|
2014-08-20 18:14:33 +00:00
|
|
|
|
|
|
|
#USER DEFINES
|
|
|
|
#------------
|
|
|
|
#These options should be defined inside your own
|
|
|
|
#local libretro-config-user.sh file rather than here.
|
|
|
|
#The following below is just a sample.
|
|
|
|
|
|
|
|
if [ -f "libretro-config-user.sh" ]; then
|
|
|
|
. ./libretro-config-user.sh
|
|
|
|
fi
|