diff options
author | Chris Koying Browet <cbro@semperpax.com> | 2016-07-08 10:17:34 +0200 |
---|---|---|
committer | Chris "Koying" Browet <cbro@semperpax.com> | 2017-08-13 11:42:17 +0200 |
commit | e6c79d3beeb4eedf638a475af023839a332b399f (patch) | |
tree | 2cb0cf4098291332fe0cef9964964930c2b5e23e /tools/depends/configure.ac | |
parent | a9ea915e652eab1852e6f7e66f8ec73be0c01112 (diff) |
CHG: [droid] split SDK and NDK api level. They are unrelated
Use the NDK level for everything native paths related. SDK level is irrelevant.
Diffstat (limited to 'tools/depends/configure.ac')
-rw-r--r-- | tools/depends/configure.ac | 43 |
1 files changed, 26 insertions, 17 deletions
diff --git a/tools/depends/configure.ac b/tools/depends/configure.ac index 21b8edb088..317c7f754a 100644 --- a/tools/depends/configure.ac +++ b/tools/depends/configure.ac @@ -68,10 +68,10 @@ AC_ARG_WITH([cpu], [optional. specify target cpu. guessed if not specified])], [use_cpu=$withval],use_cpu=auto) -AC_ARG_WITH([ndk], - [AS_HELP_STRING([--with-ndk], +AC_ARG_WITH([ndk-path], + [AS_HELP_STRING([--with-ndk-path], [specify path to ndk (required for android only)])], - [use_ndk=$withval]) + [use_ndk_path=$withval]) AC_ARG_WITH([sdk-path], [AS_HELP_STRING([--with-sdk-path], @@ -83,6 +83,11 @@ AC_ARG_WITH([sdk], [specify sdk platform version (optional for android). default is android-21])], [use_sdk=$withval]) +AC_ARG_WITH([ndk-api], + [AS_HELP_STRING([--with-ndk-api], + [spcify ndk level (optional for android). default is 21])], + [use_ndk_api=$withval]) + AC_ARG_ENABLE([gplv3], [AS_HELP_STRING([--enable-gplv3], [enable gplv3 components. default is yes])], @@ -161,15 +166,16 @@ case $host in use_cpu="armeabi-v7a" fi use_sdk="${use_sdk:-android-21}" - deps_dir="$use_host-$use_sdk-$build_type" + use_ndk_api="${use_ndk_api:-21}" + deps_dir="$use_host-$use_ndk_api-$build_type" platform_cflags="-DANDROID -fexceptions -fPIC -DPIC -D_GLIBCXX_USE_C99_MATH_TR1" optimize_flags="-Os" if test "x$use_cpu" = "xarmeabi-v7a"; then platform_cflags+=" -march=armv7-a -mtune=cortex-a9 -mfloat-abi=softfp -mfpu=neon" fi - platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk" + platform_ldflags="-L$prefix/$deps_dir/lib/android-$use_ndk_api" platform_cxxflags="$platform_cflags -frtti" - platform_includes="-I$prefix/$deps_dir/include/$use_sdk" + platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross cross_compiling="yes" @@ -179,15 +185,16 @@ case $host in use_cpu="arm64-v8a" fi use_sdk="${use_sdk:-android-21}" - deps_dir="$use_host-$use_sdk-$build_type" + use_ndk_api="${use_ndk_api:-21}" + deps_dir="$use_host-$use_ndk_api-$build_type" platform_cflags="-DANDROID -fexceptions -fPIC -DPIC -D_GLIBCXX_USE_C99_MATH_TR1" optimize_flags="-Os" if test "x$use_cpu" = "xarm64-v8a"; then platform_cflags+=" -march=armv8-a -mtune=cortex-a53" fi - platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk" + platform_ldflags="-L$prefix/$deps_dir/lib/android-$use_ndk_api" platform_cxxflags="$platform_cflags -frtti" - platform_includes="-I$prefix/$deps_dir/include/$use_sdk" + platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross cross_compiling="yes" @@ -197,12 +204,13 @@ case $host in use_cpu=$host_cpu fi use_sdk="${use_sdk:-android-21}" - deps_dir="$use_host-$use_sdk-$build_type" + use_ndk_api="${use_ndk_api:-21}" + deps_dir="$use_host-$use_ndk_api-$build_type" platform_cflags="-DANDROID -fexceptions -fPIC -DPIC -D_GLIBCXX_USE_C99_MATH_TR1" optimize_flags="-Os" - platform_ldflags="-L$prefix/$deps_dir/lib/$use_sdk" + platform_ldflags="-L$prefix/$deps_dir/lib/android-$use_ndk_api" platform_cxxflags="$platform_cflags -frtti" - platform_includes="-I$prefix/$deps_dir/include/$use_sdk" + platform_includes="-I$prefix/$deps_dir/include/android-$use_ndk_api" platform_os="android" #android builds are always cross cross_compiling="yes" @@ -524,12 +532,12 @@ if test -z $use_tarballs; then fi if test "$platform_os" == "android"; then - if test -z $use_ndk; then + if test -z $use_ndk_path; then AC_MSG_ERROR("NDK path is required for android") fi - if ([! test -f "$use_ndk/source.properties"] && [! test -f "$use_ndk/RELEASE.TXT"]) ; then - AC_MSG_ERROR("$use_ndk is not an NDK directory") + if ([! test -f "$use_ndk_path/source.properties"] && [! test -f "$use_ndk_path/RELEASE.TXT"]) ; then + AC_MSG_ERROR("$use_ndk_path is not an NDK directory") fi if test -z $use_sdk_path; then @@ -540,7 +548,7 @@ if test "$platform_os" == "android"; then AC_MSG_ERROR(verify sdk path) fi - if [ ! test -f $use_ndk/sources/android/native_app_glue/android_native_app_glue.h ]; then + if [ ! test -f $use_ndk_path/sources/android/native_app_glue/android_native_app_glue.h ]; then AC_MSG_ERROR(verify ndk path) fi @@ -639,8 +647,9 @@ fi if test "$platform_os" == "android"; then echo -e AC_SUBST(use_sdk_path) - AC_SUBST(use_ndk) + AC_SUBST(use_ndk_path) AC_SUBST(use_sdk) + AC_SUBST(use_ndk_api) AC_SUBST(build_tools_path) fi |