diff options
-rw-r--r-- | android/Bootstrap/Makefile.shared | 5 | ||||
-rw-r--r-- | config_host.mk.in | 2 | ||||
-rw-r--r-- | configure.ac | 24 | ||||
-rw-r--r-- | external/nss/ExternalProject_nss.mk | 2 |
4 files changed, 17 insertions, 16 deletions
diff --git a/android/Bootstrap/Makefile.shared b/android/Bootstrap/Makefile.shared index f40693615f0a..18082ea30ea3 100644 --- a/android/Bootstrap/Makefile.shared +++ b/android/Bootstrap/Makefile.shared @@ -23,7 +23,8 @@ OBJLOCAL=$(BUILDDIR)/android/obj/local/$(ANDROID_APP_ABI) # local.properties: $(BUILDDIR)/config_host.mk - echo sdk.dir=$(ANDROID_SDK_HOME) >local.properties + echo ndk.dir=$(ANDROID_NDK_DIR) >local.properties + echo sdk.dir=$(ANDROID_SDK_HOME) >>local.properties # # Build / link the single .so for this app @@ -71,7 +72,7 @@ $(SODEST)/nss-libraries : mkdir -p $(SODEST) $(foreach lib,$(NSSLIBS),$(STRIP) -o $(SODEST)/lib$(lib).so $(INSTDIR)/$(LIBO_LIB_FOLDER)/lib$(lib).so;) -$(SODEST)/libc++_shared.so : $(ANDROID_NDK_HOME)/sources/cxx-stl/llvm-libc++/libs/$(ANDROID_APP_ABI)/libc++_shared.so +$(SODEST)/libc++_shared.so : $(ANDROID_NDK_DIR)/sources/cxx-stl/llvm-libc++/libs/$(ANDROID_APP_ABI)/libc++_shared.so mkdir -p $(SODEST) cp $< $@ diff --git a/config_host.mk.in b/config_host.mk.in index cc05b3448d0b..7552991e366b 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -15,7 +15,7 @@ export BUILDDIR=@BUILDDIR@ @x_AFLAGS@ export AFLAGS=@AFLAGS@ export ABW_CFLAGS=$(gb_SPACE)@ABW_CFLAGS@ export ABW_LIBS=$(gb_SPACE)@ABW_LIBS@ -export ANDROID_NDK_HOME=@ANDROID_NDK_HOME@ +export ANDROID_NDK_DIR=@ANDROID_NDK_DIR@ export ANDROID_APP_ABI=@ANDROID_APP_ABI@ export ANDROID_SDK_HOME=@ANDROID_SDK_HOME@ export ANDROID_PACKAGE_NAME=@ANDROID_PACKAGE_NAME@ diff --git a/configure.ac b/configure.ac index e4fe7891ddf2..151a894537ee 100644 --- a/configure.ac +++ b/configure.ac @@ -650,22 +650,22 @@ AC_ARG_WITH(android-api-level, [Specify the API level when building for Android. Defaults to 16 for ARM and x86 and to 21 for ARM64 and x86-64]), ,) -ANDROID_NDK_HOME= +ANDROID_NDK_DIR= if test -z "$with_android_ndk" -a -e "$SRC_ROOT/external/android-ndk" -a "$build" != "$host"; then with_android_ndk="$SRC_ROOT/external/android-ndk" fi if test -n "$with_android_ndk"; then - eval ANDROID_NDK_HOME=$with_android_ndk + eval ANDROID_NDK_DIR=$with_android_ndk # Set up a lot of pre-canned defaults - if test ! -f $ANDROID_NDK_HOME/RELEASE.TXT; then - if test ! -f $ANDROID_NDK_HOME/source.properties; then - AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_HOME.]) + if test ! -f $ANDROID_NDK_DIR/RELEASE.TXT; then + if test ! -f $ANDROID_NDK_DIR/source.properties; then + AC_MSG_ERROR([Unrecognized Android NDK. Missing RELEASE.TXT or source.properties file in $ANDROID_NDK_DIR.]) fi - ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_HOME/source.properties` + ANDROID_NDK_VERSION=`sed -n -e 's/Pkg.Revision = //p' $ANDROID_NDK_DIR/source.properties` else - ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_HOME/RELEASE.TXT` + ANDROID_NDK_VERSION=`cut -f1 -d' ' <$ANDROID_NDK_DIR/RELEASE.TXT` fi if test -z "$ANDROID_NDK_VERSION"; then AC_MSG_ERROR([Failed to determine Android NDK version. Please check your installation.]) @@ -751,10 +751,10 @@ if test -n "$with_android_ndk"; then # ndk would also support windows and windows-x86_64 ;; esac - android_TOOLCHAIN=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/$android_HOST_TAG + android_TOOLCHAIN=$ANDROID_NDK_DIR/toolchains/llvm/prebuilt/$android_HOST_TAG ANDROID_COMPILER_BIN=$android_TOOLCHAIN/bin dnl TODO: NSS build uses it... - ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_NDK_HOME/toolchains/$android_platform_prefix-$ANDROID_GCC_TOOLCHAIN_VERSION/prebuilt/$android_HOST_TAG + ANDROID_BINUTILS_PREBUILT_ROOT=$ANDROID_NDK_DIR/toolchains/$android_platform_prefix-$ANDROID_GCC_TOOLCHAIN_VERSION/prebuilt/$android_HOST_TAG AC_SUBST(ANDROID_BINUTILS_PREBUILT_ROOT) test -z "$AR" && AR=$ANDROID_COMPILER_BIN/$android_gnu_prefix-ar @@ -782,7 +782,7 @@ if test -n "$with_android_ndk"; then CXX_BASE="clang++" fi fi -AC_SUBST(ANDROID_NDK_HOME) +AC_SUBST(ANDROID_NDK_DIR) AC_SUBST(ANDROID_APP_ABI) AC_SUBST(ANDROID_GCC_TOOLCHAIN_VERSION) @@ -807,7 +807,7 @@ AC_ARG_ENABLE([android-lok], actually the Online-based, non-modified LOK.]) ) ENABLE_ANDROID_LOK= -if test -n "$ANDROID_NDK_HOME" ; then +if test -n "$ANDROID_NDK_DIR" ; then if test "$enable_android_lok" = yes; then ENABLE_ANDROID_LOK=TRUE AC_DEFINE(HAVE_FEATURE_ANDROID_LOK) @@ -1234,7 +1234,7 @@ if test "$_os" = "Android" ; then # Verify that the NDK and SDK options are proper if test -z "$with_android_ndk"; then AC_MSG_ERROR([the --with-android-ndk option is mandatory, unless it is available at external/android-ndk/.]) - elif test ! -f "$ANDROID_NDK_HOME/meta/abis.json"; then + elif test ! -f "$ANDROID_NDK_DIR/meta/abis.json"; then AC_MSG_ERROR([the --with-android-ndk option does not point to an Android NDK]) fi diff --git a/external/nss/ExternalProject_nss.mk b/external/nss/ExternalProject_nss.mk index 4297be931e69..ee3c7839fcb6 100644 --- a/external/nss/ExternalProject_nss.mk +++ b/external/nss/ExternalProject_nss.mk @@ -76,7 +76,7 @@ $(call gb_ExternalProject_get_state_target,nss,build): \ COMMA=$(COMMA) \ CC="$(CC)$(if $(filter iOS,$(OS)), -DNSS_STATIC_SOFTOKEN=1 -DNSS_STATIC_FREEBL=1 -DNSS_STATIC_PKCS11=1)$(if $(filter ANDROID,$(OS)), -D_PR_NO_LARGE_FILES=1 -DSQLITE_DISABLE_LFS=1)" CCC="$(CXX)" \ $(if $(CROSS_COMPILING),NSINSTALL="$(if $(filter MACOSX,$(OS_FOR_BUILD)),xcrun python3,$(call gb_ExternalExecutable_get_command,python)) $(SRCDIR)/external/nss/nsinstall.py") \ - $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=16 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_HOME) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(ANDROID_NDK_HOME)/sysroot ANDROID_TOOLCHAIN=$(ANDROID_BINUTILS_PREBUILT_ROOT)) \ + $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=16 ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_DIR) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(ANDROID_NDK_DIR)/sysroot ANDROID_TOOLCHAIN=$(ANDROID_BINUTILS_PREBUILT_ROOT)) \ NSS_DISABLE_GTESTS=1 \ nss_build_all \ && rm -f $(call gb_UnpackedTarball_get_dir,nss)/dist/out/lib/*.a \ |