From cbf9c6f19caabbdd9ce3ad488367555d283ecf60 Mon Sep 17 00:00:00 2001 From: Javernaut Date: Tue, 28 May 2019 21:32:56 +0200 Subject: [PATCH] Adding support of Linux host machine for assembling --- ffmpeg-android-maker.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ffmpeg-android-maker.sh b/ffmpeg-android-maker.sh index c58794b..7cc8a0e 100755 --- a/ffmpeg-android-maker.sh +++ b/ffmpeg-android-maker.sh @@ -2,6 +2,12 @@ FFMPEG_VERSION=4.1.3 +# Assuming the script is used on macOS of Linux machine +case "$OSTYPE" in + darwin*) HOST_TAG="darwin-x86_64" ;; + linux*) HOST_TAG="linux-x86_64" ;; +esac + # Directories used by the script BASE_DIR="$( cd "$( dirname "$0" )" && pwd )" SOURCES_DIR=${BASE_DIR}/sources @@ -35,7 +41,7 @@ function assemble() { ARCH=$1 API_LEVEL=$2 - TOOLCHAIN_PATH=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/darwin-x86_64 + TOOLCHAIN_PATH=${ANDROID_NDK_HOME}/toolchains/llvm/prebuilt/${HOST_TAG} SYSROOT=${TOOLCHAIN_PATH}/sysroot CC_ANDROID_POSTFIX=