* INSTALL.android: Document how to install sqlite3. * build-aux/ndk-build-helper-1.mk (SYSTEM_LIBRARIES): * build-aux/ndk-build-helper-2.mk (SYSTEM_LIBRARIES): Add liblog and libandroid. * configure.ac (SQLITE3_LIBS, HAVE_SQLITE3) (HAVE_SQLITE3_LOAD_EXTENSION): Support on Android. (APKSIGNER): Look for this new required binary. * cross/ndk-build/ndk-build-shared-library.mk (objname): * cross/ndk-build/ndk-build-static-library.mk (objname): Avoid duplicate rules by prefixing objects with module type. * cross/ndk-build/ndk-build.mk.in (NDK_BUILD_SHARED): Fix definition. * cross/ndk-build/ndk-resolve.mk: (NDK_SO_EXTRA_FLAGS_$(LOCAL_MODULE)): Handle new system libraries. * doc/emacs/android.texi (Android File System): Document Android 10 system restriction. * java/AndroidManifest.xml.in: Target Android 33, not 28. * java/Makefile.in (SIGN_EMACS_V2, APKSIGNER): New variables. ($(APK_NAME)): Make sure to apply a ``version 2 signature'' to the package as well. * java/org/gnu/emacs/EmacsNative.java (EmacsNative): New argument apiLevel. * java/org/gnu/emacs/EmacsNoninteractive.java (main): * java/org/gnu/emacs/EmacsThread.java (run): Pass API level. * m4/ndk-build.m4 (ndk_package_mape): Add package mapping for sqlite3. * src/Makefile.in (SQLITE3_CFLAGS): New substition. (EMACS_CFLAGS): Add that variable. * src/android.c (android_api_level): New variable. (initEmacs): Set it. (android_file_access_p): Make static. (android_hack_asset_fd): Adjust for restrictions in Android 29 and later. (android_close_on_exec): New function. (android_open): Adjust to not duplicate file descriptor even if CLOEXEC. (android_faccessat): Use fstatat at-func emulation. * src/android.h: Update prototypes. * src/dired.c (file_name_completion_dirp): * src/fileio.c (file_access_p, Faccess_file): Now that sys_faccessat takes care of everything, stop calling android_file_access_p.
61 lines
1.9 KiB
Makefile
61 lines
1.9 KiB
Makefile
### @configure_input@
|
|
|
|
# Copyright (C) 2023 Free Software Foundation, Inc.
|
|
|
|
# This file is part of GNU Emacs.
|
|
|
|
# GNU Emacs is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# GNU Emacs is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
# This file is included all over the place to build prerequisites.
|
|
|
|
NDK_BUILD_MODULES = @NDK_BUILD_MODULES@
|
|
NDK_BUILD_CXX_SHARED = @NDK_BUILD_CXX_SHARED@
|
|
NDK_BUILD_ANY_CXX_MODULE = @NDK_BUILD_ANY_CXX_MODULE@
|
|
NDK_BUILD_SHARED =
|
|
NDK_BUILD_STATIC =
|
|
|
|
define uniqify
|
|
$(if $1,$(firstword $1) $(call uniqify,$(filter-out $(firstword $1),$1)))
|
|
endef
|
|
|
|
# Remove duplicate modules. These can occur when a single module
|
|
# imports a module and also declares it in LOCAL_SHARED_LIBRARIES.
|
|
NDK_BUILD_MODULES := $(call uniqify,$(NDK_BUILD_MODULES))
|
|
|
|
# The C++ standard library must be extracted from the Android NDK
|
|
# directories and included in the application package, if any module
|
|
# requires the C++ standard library.
|
|
|
|
ifneq ($(NDK_BUILD_ANY_CXX_MODULE),)
|
|
NDK_BUILD_SHARED += $(NDK_BUILD_CXX_SHARED)
|
|
endif
|
|
|
|
define subr-1
|
|
|
|
$(top_builddir)/cross/ndk-build/$(1):
|
|
$(MAKE) -C $(top_builddir)/cross/ndk-build $(1)
|
|
|
|
ifeq ($(suffix $(1)),.so)
|
|
NDK_BUILD_SHARED += $(top_builddir)/cross/ndk-build/$(1)
|
|
else
|
|
ifeq ($(suffix $(1)),.a)
|
|
NDK_BUILD_STATIC += $(top_builddir)/cross/ndk-build/$(1)
|
|
endif
|
|
endif
|
|
|
|
endef
|
|
|
|
# Generate rules for each module.
|
|
|
|
$(foreach module,$(NDK_BUILD_MODULES),$(eval $(call subr-1,$(module))))
|