* INSTALL.android (module_target): Clarify documentation.
* cross/ndk-build/ndk-build-shared-library.mk:
* cross/ndk-build/ndk-build-static-library.mk: Fix building Neon objects.
* java/AndroidManifest.xml.in: Add a version code.
Replacing the paths in the command line above with:
- the path to the `android.jar' headers which come with the Android
- SDK. They must correspond to Android version 13 or later.
+ SDK. They must correspond to Android version 13 (API level 33) or
+ later.
- the path to the C compiler in the Android NDK, for the machine you
are building Emacs to run on.
libpng - https://android.googlesource.com/platform/external/libpng
libwebp - https://android.googlesource.com/platform/external/webp
+ (You must apply the patch at the end of this file for the resulting
+ binary to work on armv7 devices.)
giflib - https://android.googlesource.com/platform/external/giflib
(You must add LOCAL_EXPORT_CFLAGS := -I$(LOCAL_PATH) before
its Android.mk includes $(BUILD_STATIC_LIBRARY))
LOCAL_MODULE:= libsqlite_static_minimal
LOCAL_SDK_VERSION := 23
include $(BUILD_STATIC_LIBRARY)
+
+PATCH FOR WEBP
+
+diff --git a/Android.mk b/Android.mk
+index c7bcb0f5..d4da1704 100644
+--- a/Android.mk
++++ b/Android.mk
+@@ -28,9 +28,10 @@ ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),)
+ # Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal
+ # instructions to be generated for armv7a code. Instead target the neon code
+ # specifically.
+- NEON := c.neon
+- USE_CPUFEATURES := yes
+- WEBP_CFLAGS += -DHAVE_CPU_FEATURES_H
++ # NEON := c.neon
++ # USE_CPUFEATURES := yes
++ # WEBP_CFLAGS += -DHAVE_CPU_FEATURES_H
++ NEON := c
+ else
+ NEON := c
+ endif
$(NDK_BUILD_CC) -c $$< -o $$@ $(NDK_ASFLAGS_$(LOCAL_MODULE))
else
-ifneq (x$(suffix $(1)),x.asm)
+ifneq (x.$(suffix $(1)),x.asm)
$$(error Unsupported suffix: $(suffix $(1)))
else
ifneq (x$(LOCAL_ASM_RULE_DEFINED),x)
include ndk-resolve.mk
# Then define rules to build all objects.
-ALL_SOURCE_FILES = $(LOCAL_SRC_FILES) $(LOCAL_SRC_FILES_$(NDK_BUILD_ARCH))
+ALL_SOURCE_FILES := $(LOCAL_SRC_FILES) $(LOCAL_SRC_FILES_$(NDK_BUILD_ARCH))
# This defines all dependencies.
-ALL_OBJECT_FILES$(LOCAL_MODULE) =
+ALL_OBJECT_FILES$(LOCAL_MODULE) :=
+
+# Now filter out code that is only built on systems with neon.
+ifeq ($(NDK_BUILD_ABI),armeabi-v7a)
+ALL_SOURCE_FILES := $(filter-out %.neon,$(ALL_SOURCE_FILES))
+endif
$(foreach source,$(ALL_SOURCE_FILES),$(eval $(call single-object-target,$(source))))
$(NDK_BUILD_CC) -c $$< -o $$@ $(NDK_ASFLAGS_$(LOCAL_MODULE))
else
-ifneq (x$(suffix $(1)),x.asm)
+ifneq (x.$(suffix $(1)),x.asm)
$$(error Unsupported suffix: $(suffix $(1)))
else
ifneq (x$(LOCAL_ASM_RULE_DEFINED),x)
include ndk-resolve.mk
# Then define rules to build all objects.
-ALL_SOURCE_FILES = $(LOCAL_SRC_FILES) $(LOCAL_SRC_FILES_$(NDK_BUILD_ARCH))
+ALL_SOURCE_FILES := $(LOCAL_SRC_FILES) $(LOCAL_SRC_FILES_$(NDK_BUILD_ARCH))
+
+# Now filter out code that is only built on systems with neon.
+ifeq ($(NDK_BUILD_ABI),armeabi-v7a)
+ALL_SOURCE_FILES := $(filter-out %.neon,$(ALL_SOURCE_FILES))
+endif
# This defines all dependencies.
ALL_OBJECT_FILES$(LOCAL_MODULE) =
package="org.gnu.emacs"
android:targetSandboxVersion="1"
android:installLocation="auto"
+ android:versionCode="@emacs_major_version@"
android:versionName="@version@">
<!-- Paste in every permission in existence so Emacs can do