From 5fee9e553c25be41a72687f57625850a414d56cc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 4 Aug 2015 01:31:14 +0200 Subject: [PATCH 1/2] Add android armeabi v7a script --- libretro-build-android-armeabi_v7a.sh | 17 +++++++++++++ libretro-config.sh | 35 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100755 libretro-build-android-armeabi_v7a.sh diff --git a/libretro-build-android-armeabi_v7a.sh b/libretro-build-android-armeabi_v7a.sh new file mode 100755 index 00000000..8553b963 --- /dev/null +++ b/libretro-build-android-armeabi_v7a.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-armeabi_v7a ${BASE_DIR}/libretro-build.sh $@ diff --git a/libretro-config.sh b/libretro-config.sh index 4dea3fa1..79911b30 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -35,6 +35,35 @@ case "$platform" in CXX11="clang++ -std=c++11 -stdlib=libc++ -arch armv7 -marm -miphoneos-version-min=5.0 -isysroot $IOSSDK" ;; + android-armeabi_v7a) + DIST_DIR="android/armeabi-v7a" + FORMAT_EXT=so + FORMAT=_android + FORMAT_COMPILER_TARGET=android-armeabi_v7a + FORMAT_COMPILER_TARGET_ALT=android-armeabi_v7a + UNAME_PLATFORM="$(uname)" + HOST_PLATFORM="linux" + + echo $UNAME_PLATFORM + + 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 + echo ${NDK_ROOT_DIR} + CC="$NDK_ROOT_DIR/toolchains/arm-linux-androideabi-4.8/prebuilt/${HOST_PLATFORM}-x86_64/bin/arm-linux-androideabi-gcc" + CXX="$NDK_ROOT_DIR/toolchains/arm-linux-androideabi-4.8/prebuilt/${HOST_PLATFORM}-x86_64/bin/arm-linux-androideabi-g++" + CXX11="$NDK_ROOT_DIR/toolchains/arm-linux-androideabi-4.8/prebuilt/${HOST_PLATFORM}-x86_64/bin/arm-linux-androideabi-g++" + ;; + qnx) DIST_DIR="qnx" FORMAT_EXT=so @@ -215,6 +244,12 @@ case "$platform" in FORMAT_COMPILER_TARGET="ngc" DIST_DIR="ngc" ;; + android-armeabi_v7a) + platform=android-armeabi_v7a + FORMAT_EXT="so" + FORMAT_COMPILER_TARGET="android-armeabi_v7a" + DIST_DIR="android/armeabi-v7a" + ;; theos_ios*) platform=theos_ios FORMAT_EXT="dylib" From 51bd89ce1c580ee87729b7a32b2cf9554f1b768f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 4 Aug 2015 02:43:18 +0200 Subject: [PATCH 2/2] Now copies the files over --- libretro-config.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-config.sh b/libretro-config.sh index 79911b30..7854e1b5 100755 --- a/libretro-config.sh +++ b/libretro-config.sh @@ -38,7 +38,7 @@ case "$platform" in android-armeabi_v7a) DIST_DIR="android/armeabi-v7a" FORMAT_EXT=so - FORMAT=_android + FORMAT=.armeabi-v7a FORMAT_COMPILER_TARGET=android-armeabi_v7a FORMAT_COMPILER_TARGET_ALT=android-armeabi_v7a UNAME_PLATFORM="$(uname)"