diff options
| author | Po Lu | 2023-01-24 10:34:40 +0800 |
|---|---|---|
| committer | Po Lu | 2023-01-24 10:34:40 +0800 |
| commit | 4de6b187933479ce93b6079f42a485e5868f01a5 (patch) | |
| tree | db3e4cbeb5487a8397e686e9a242fdeb90fad43a /java/Makefile.in | |
| parent | 9d3aacedf0c217af207d39e390f376914160396b (diff) | |
| download | emacs-4de6b187933479ce93b6079f42a485e5868f01a5.tar.gz emacs-4de6b187933479ce93b6079f42a485e5868f01a5.zip | |
Update Android port
* .gitignore: Update with new files. Do not ignore std*.in.h.
* INSTALL.android: Explain how to build Emacs with external
dependencies.
* Makefile.in (xcompile, cross): Rename to `cross'.
(clean_dirs): Clean cross, not xcompile.
* README: Document new directories.
* build-aux/ndk-build-helper-1.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-2.mk (build_kind, NDK_SO_NAMES):
* build-aux/ndk-build-helper-3.mk (build_kind):
* build-aux/ndk-build-helper-4.mk:
* build-aux/ndk-build-helper.mk (NDK_BUILD_DIR, my-dir):
* build-aux/ndk-module-extract.awk: New files.
* configure.ac: Set up libgif, libwebp, and libpng for
ndk-build.
* cross/ndk-build/Makefile.in (srcdir, NDK_BUILD_ANDROID_MK):
* cross/ndk-build/ndk-build-executable.mk:
* cross/ndk-build/ndk-build-shared-library.mk (eq, objname):
* cross/ndk-build/ndk-build-static-library.mk (eq, objname):
* cross/ndk-build/ndk-build.in (NDK_BUILD_MODULES):
* cross/ndk-build/ndk-build.mk.in (NDK_BUILD_MODULES)
(NDK_BUILD_SHARED):
* cross/ndk-build/ndk-clear-vars.mk:
* cross/ndk-build/ndk-prebuilt-shared-library.mk:
* cross/ndk-build/ndk-prebuilt-static-library.mk: New files.
* doc/emacs/android.texi (Android, Android Environment):
Document clipboard support on Android.
* doc/emacs/emacs.texi (Top): Update menus.
* etc/MACHINES: Document Android.
* java/AndroidManifest.xml.in: Respect new
`--with-android-debug' option.
* java/Makefile.in (CROSS_BINS, CROSS_LIBS): Adjust for rename.
Include ndk-build.mk.:(emacs.apk-in): Depend on shared
libraries. Then, package shared libraries.
* java/org/gnu/emacs/EmacsClipboard.java (EmacsClipboard): New
class.
* java/org/gnu/emacs/EmacsFontDriver.java: Update comment to say
this is unused.
* java/org/gnu/emacs/EmacsNative.java (EmacsNative): New
function `sendExpose'.
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard):
* java/org/gnu/emacs/EmacsSdk8Clipboard.java
(EmacsSdk8Clipboard): New classes.
* java/org/gnu/emacs/EmacsView.java (EmacsView, handleDirtyBitmap)
(onDetachedFromWindow): When window is reattached, expose the
frame.
* lib/Makefile.in (VPATH):
(ALL_CFLAGS): Adjust for rename.
* lisp/term/android-win.el (android-clipboard-exists-p)
(android-get-clipboard, android-set-clipboard)
(android-clipboard-owner-p, android-primary-selection)
(android-get-clipboard-1, android-get-primary)
(android-selection-bounds, android-encode-select-string)
(gui-backend-get-selection, gui-backend-selection-exists-p)
(gui-backend-selection-owner-p, gui-backend-set-selection): New
functions.
* m4/ndk-build.m4: New file.
* src/Makefile.in (GIF_CFLAGS, ANDROID_LDFLAGS): New variables.
(EMACS_CFLAGS): Add GIF_CFLAGS. Include
ndk-build.mk.
(libemacs.so): Depend on and link with required
libraries.
* src/android.c (android_check_compressed_file): New function.
(android_open): Work around Android platform bug.
(sendExpose): New function.
(android_readdir): Set d_type if this is a directory.
* src/androidgui.h (enum android_event_type)
(struct android_expose_event, union android_event): Add expose
events.
* src/androidselect.c (struct android_emacs_clipboard)
(android_init_emacs_clipboard, Fandroid_clipboard_owner_p)
(Fandroid_set_clipboard, Fandroid_get_clipboard)
(Fandroid_clipboard_exists_p, init_androidselect)
(syms_of_androidselect): New file.
* src/androidterm.c (handle_one_android_event): Handle
exposures.
* src/androidterm.h: Update prototypes.
* src/emacs.c (android_emacs_init): Initialize androidselect.
Diffstat (limited to 'java/Makefile.in')
| -rw-r--r-- | java/Makefile.in | 30 |
1 files changed, 18 insertions, 12 deletions
diff --git a/java/Makefile.in b/java/Makefile.in index 22c912fdce5..d27775ea3db 100644 --- a/java/Makefile.in +++ b/java/Makefile.in | |||
| @@ -81,21 +81,24 @@ APK_NAME = emacs-$(version)-$(ANDROID_MIN_SDK)-$(ANDROID_ABI).apk | |||
| 81 | all: $(APK_NAME) | 81 | all: $(APK_NAME) |
| 82 | 82 | ||
| 83 | # Binaries to cross-compile. | 83 | # Binaries to cross-compile. |
| 84 | CROSS_BINS = ../xcompile/src/android-emacs ../xcompile/lib-src/ctags \ | 84 | CROSS_BINS = ../cross/src/android-emacs ../cross/lib-src/ctags \ |
| 85 | ../xcompile/lib-src/hexl ../xcompile/lib-src/movemail \ | 85 | ../cross/lib-src/hexl ../cross/lib-src/movemail \ |
| 86 | ../xcompile/lib-src/ebrowse ../xcompile/lib-src/emacsclient | 86 | ../cross/lib-src/ebrowse ../cross/lib-src/emacsclient |
| 87 | 87 | ||
| 88 | # Libraries to cross-compile. | 88 | # Libraries to cross-compile. |
| 89 | CROSS_LIBS = ../xcompile/src/libemacs.so | 89 | CROSS_LIBS = ../cross/src/libemacs.so |
| 90 | |||
| 91 | # Third party libraries to compile. | ||
| 92 | include $(top_builddir)/cross/ndk-build/ndk-build.mk | ||
| 90 | 93 | ||
| 91 | .PHONY: $(CROSS_BINS) $(CROSS_LIBS) | 94 | .PHONY: $(CROSS_BINS) $(CROSS_LIBS) |
| 92 | 95 | ||
| 93 | ../xcompile/src/android-emacs ../xcompile/src/libemacs.so: | 96 | ../cross/src/android-emacs ../cross/src/libemacs.so: |
| 94 | make -C ../xcompile src/$(notdir $@) | 97 | make -C ../cross src/$(notdir $@) |
| 95 | 98 | ||
| 96 | ../xcompile/lib-src/hexl ../xcompile/lib-src/movemail \ | 99 | ../cross/lib-src/hexl ../cross/lib-src/movemail \ |
| 97 | ../xcompile/lib-src/ctags ../xcompile/lib-src/ebrowse &: | 100 | ../cross/lib-src/ctags ../cross/lib-src/ebrowse &: |
| 98 | make -C ../xcompile lib-src/$(notdir $@) | 101 | make -C ../cross lib-src/$(notdir $@) |
| 99 | 102 | ||
| 100 | # This is needed to generate the ``.directory-tree'' file used by the | 103 | # This is needed to generate the ``.directory-tree'' file used by the |
| 101 | # Android emulations of readdir and faccessat. | 104 | # Android emulations of readdir and faccessat. |
| @@ -104,7 +107,7 @@ $(libsrc)/asset-directory-tool: | |||
| 104 | $(MAKE) -C $(libsrc) $(notdir $@) | 107 | $(MAKE) -C $(libsrc) $(notdir $@) |
| 105 | 108 | ||
| 106 | emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \ | 109 | emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \ |
| 107 | AndroidManifest.xml | 110 | AndroidManifest.xml $(NDK_BUILD_SHARED) |
| 108 | # Make the working directory for this stuff | 111 | # Make the working directory for this stuff |
| 109 | rm -rf install_temp | 112 | rm -rf install_temp |
| 110 | mkdir -p install_temp/lib/$(ANDROID_ABI) | 113 | mkdir -p install_temp/lib/$(ANDROID_ABI) |
| @@ -145,11 +148,13 @@ emacs.apk-in: $(CROSS_BINS) $(CROSS_LIBS) $(libsrc)/asset-directory-tool \ | |||
| 145 | cp -f $$file install_temp/lib/$(ANDROID_ABI); \ | 148 | cp -f $$file install_temp/lib/$(ANDROID_ABI); \ |
| 146 | fi \ | 149 | fi \ |
| 147 | done | 150 | done |
| 151 | $(foreach module,$(NDK_BUILD_SHARED), \ | ||
| 152 | cp -f $(module) install_temp/lib/$(ANDROID_ABI)) | ||
| 148 | # Package everything. Specifying the assets on this command line is | 153 | # Package everything. Specifying the assets on this command line is |
| 149 | # necessary for AAssetManager_getNextFileName to work on old versions | 154 | # necessary for AAssetManager_getNextFileName to work on old versions |
| 150 | # of Android. | 155 | # of Android. |
| 151 | $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f -M AndroidManifest.xml \ | 156 | $(AAPT) package -I "$(ANDROID_JAR)" -F $@ -f \ |
| 152 | -A install_temp/assets | 157 | -M AndroidManifest.xml -A install_temp/assets |
| 153 | pushd install_temp; $(AAPT) add ../$@ `find lib -type f`; popd | 158 | pushd install_temp; $(AAPT) add ../$@ `find lib -type f`; popd |
| 154 | rm -rf install_temp | 159 | rm -rf install_temp |
| 155 | 160 | ||
| @@ -196,3 +201,4 @@ clean: | |||
| 196 | find . -name '*.class' -delete | 201 | find . -name '*.class' -delete |
| 197 | 202 | ||
| 198 | maintainer-clean distclean bootstrap-clean: clean | 203 | maintainer-clean distclean bootstrap-clean: clean |
| 204 | rm -f Makefile ndk-build.mk | ||