From ff7388bd1997099440f2630bb120d7abf61789c5 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 4 Aug 2015 05:04:33 +0200 Subject: [PATCH] Add Android x86_64 script --- libretro-build-android-x86_64.sh | 17 ++++++++++++++++ libretro-config.sh | 34 ++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100755 libretro-build-android-x86_64.sh diff --git a/libretro-build-android-x86_64.sh b/libretro-build-android-x86_64.sh new file mode 100755 index 00000000..3f406290 --- /dev/null +++ b/libretro-build-android-x86_64.sh @@ -0,0 +1,17 @@ +#! /usr/bin/env bash +# vim: set ts=3 sw=3 noet ft=sh : bash + +SCRIPT="${0#./}" +BASE_DIR="${SCRIPT%/*}" +WORKDIR="$PWD" + +if [ "$BASE_DIR" = "$SCRIPT" ]; then + BASE_DIR="$WORKDIR" +else + if [[ "$0" != /* ]]; then + # Make the path absolute + BASE_DIR="$WORKDIR/$BASE_DIR" + fi +fi + +platform=android-x86_64 ${BASE_DIR}/libretro-build.sh $@ diff --git a/libretro-config.sh b/libretro-config.sh index dfccfdd6..64a67bfe 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -35,6 +35,34 @@ case "$platform" in CXX11="clang++ -std=c++11 -stdlib=libc++ -arch armv7 -marm -miphoneos-version-min=5.0 -isysroot $IOSSDK" ;; + android-x86_64) + FORMAT_ABI="x86_64" + DIST_DIR="android/${FORMAT_ABI}" + FORMAT_EXT=so + FORMAT=.android-${FORMAT_ABI} + FORMAT_COMPILER_TARGET=android-${FORMAT_ABI} + FORMAT_COMPILER_TARGET_ALT=android-${FORMAT_ABI} + FORMAT_ABI_ANDROID=yes + UNAME_PLATFORM="$(uname)" + HOST_PLATFORM="linux" + + case "$UNAME_PLATFORM" in + osx|*Darwin*) + HOST_PLATFORM="darwin" + ;; + win|*mingw32*|*MINGW32*|*MSYS_NT*) + HOST_PLATFORM="windows" + ;; + win64|*mingw64*|*MINGW64*) + HOST_PLATFORM="windows" + ;; + esac + export NDK_ROOT_DIR + CC="$NDK_ROOT_DIR/toolchains/x86_64-4.9/prebuilt/${HOST_PLATFORM}-x86_64/bin/x86_64-linux-android-gcc" + CXX="$NDK_ROOT_DIR/toolchains/x86_64-4.9/prebuilt/${HOST_PLATFORM}-x86_64/bin/x86_64-linux-android-g++" + CXX11="$NDK_ROOT_DIR/toolchains/x86_64-4.9/prebuilt/${HOST_PLATFORM}-x86_64/bin/x86_64-linux-android-g++" + ;; + android-x86) FORMAT_ABI="x86" DIST_DIR="android/${FORMAT_ABI}" @@ -383,6 +411,12 @@ case "$platform" in FORMAT_COMPILER_TARGET="ngc" DIST_DIR="ngc" ;; + android-x86_64) + platform=android-x86_64 + FORMAT_EXT="so" + FORMAT_COMPILER_TARGET="${platform}" + DIST_DIR="android/x86_64" + ;; android-x86) platform=android-x86 FORMAT_EXT="so"