diff options
author | 2013-08-12 12:44:04 +0900 | |
---|---|---|
committer | 2013-08-15 17:58:55 +0900 | |
commit | e7870a2c0d817e6548eb00c80278b9f7b86c1a5b (patch) | |
tree | 1693f0e026d75b93df480f1100e423641a3374d5 /tools/dicttool/NativeLib.mk | |
parent | dc83fe37baafe1afe5410499d58d80a29b7cb1da (diff) | |
download | latinime-e7870a2c0d817e6548eb00c80278b9f7b86c1a5b.tar.gz latinime-e7870a2c0d817e6548eb00c80278b9f7b86c1a5b.tar.xz latinime-e7870a2c0d817e6548eb00c80278b9f7b86c1a5b.zip |
Add an initial JNI interface to dicttool.
Bug: 10100269
Change-Id: I883992c2033e7d9e7c754c0bf653767728b221b6
Diffstat (limited to 'tools/dicttool/NativeLib.mk')
-rw-r--r-- | tools/dicttool/NativeLib.mk | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk new file mode 100644 index 000000000..eeae003fb --- /dev/null +++ b/tools/dicttool/NativeLib.mk @@ -0,0 +1,51 @@ +# +# Copyright (C) 2013 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +LOCAL_PATH := $(call my-dir) +include $(CLEAR_VARS) + +# Need to define the name of the library in the caller in LATINIME_HOST_NATIVE_LIBNAME + +LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. + +ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),) +LOCAL_CFLAGS += -m64 +LOCAL_LDFLAGS += -m64 +endif #HOST_JDK_IS_64BIT_VERSION + +LOCAL_CFLAGS += -DHOST_TOOL -fPIC +LOCAL_NO_DEFAULT_COMPILER_FLAGS := true + +LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni +LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src +LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR) +# Used in jni_common.cpp to avoid registering useless methods. + +LATIN_IME_JNI_SRC_FILES := \ + com_android_inputmethod_latin_makedict_BinaryDictInputOutput.cpp \ + jni_common.cpp + +LATIN_IME_CORE_SRC_FILES := + +LOCAL_SRC_FILES := \ + $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \ + $(addprefix $(LATINIME_NATIVE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES)) + +LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME) + +include $(BUILD_HOST_SHARED_LIBRARY) + +# Clear our private variables +LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. |