# create seperate configurations for each NDK API level
# and architecture you want to support.
WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
-NDK_TARGET=14
+NDK_TARGET=21
JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0 # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
# create seperate configurations for each NDK API level
# and architecture you want to support.
WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
NDK_TARGET=21
JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0 # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
WITH_OPENH264=1
shift
;;
+ --openh264-ndk)
+ shift
+ ANDROID_NDK_OPENH264=$1
+ shift
+ ;;
--openssl)
WITH_OPENSSL=1
shift
fi
if [ $WITH_OPENH264 -ne 0 ];
then
+ if [ -z "$ANDROID_NDK_OPENH264" ]
+ then
+ echo
+ echo "Warning: Missing openh264-ndk, using $ANDROID_NDK" >&2
+ echo
+ ANDROID_NDK_OPENH264=$ANDROID_NDK
+ fi
if [ $BUILD_DEPS -ne 0 ];
then
common_run bash $SCRIPT_PATH/android-build-openh264.sh \
--src $BUILD_SRC/openh264 --dst $BUILD_DST \
- --ndk $ANDROID_NDK \
+ --sdk "$ANDROID_SDK" \
+ --ndk "$ANDROID_NDK_OPENH264" \
--arch $ARCH \
--target $NDK_TARGET \
--tag $OPENH264_TAG
then
common_run bash $SCRIPT_PATH/android-build-openssl.sh \
--src $BUILD_SRC/openssl --dst $BUILD_DST \
+ --sdk "$ANDROID_SDK" \
--ndk $ANDROID_NDK \
--arch $ARCH \
--target $NDK_TARGET \
--- /dev/null
+#!/bin/bash
+#
+# Android build confguration
+#
+# Note: This is a simple configuration to build all
+# architectures in one rush.
+# Since android 64 bit support was introduced with NDK API 21
+# this is the minimal common denominator.
+# If you require support for older NDK API levels,
+# create seperate configurations for each NDK API level
+# and architecture you want to support.
+WITH_JPEG=0
+WITH_OPENH264=1
+WITH_OPENSSL=1
+BUILD_DEPS=1
+DEPS_ONLY=0
+NDK_TARGET=26
+
+JPEG_TAG=master
+OPENH264_TAG=v1.8.0 # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
+
+SRC_DIR=$SCRIPT_PATH/..
+BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs
+BUILD_SRC=$SRC_DIR/build
+
+CMAKE_BUILD_TYPE=Release
+
+BUILD_ARCH="armeabi-v7a x86 arm64-v8a x86_64"
# create seperate configurations for each NDK API level
# and architecture you want to support.
WITH_JPEG=0
-WITH_OPENH264=0
+WITH_OPENH264=1
WITH_OPENSSL=1
BUILD_DEPS=1
DEPS_ONLY=0
NDK_TARGET=26
JPEG_TAG=master
-OPENH264_TAG=v1.8.0
-OPENSSL_TAG=OpenSSL_1_1_1f
+OPENH264_TAG=v1.8.0 # NOTE: NDK r15c or earlier needed in --openh624-ndk for v1.8.0
+OPENSSL_TAG=OpenSSL_1_1_1h
SRC_DIR=$SCRIPT_PATH/..
BUILD_DST=$SCRIPT_PATH/../client/Android/Studio/freeRDPCore/src/main/jniLibs