aboutsummaryrefslogtreecommitdiffstats
path: root/native
diff options
context:
space:
mode:
Diffstat (limited to 'native')
-rw-r--r--native/jni/Android.mk100
-rw-r--r--native/jni/src/additional_proximity_chars.cpp (renamed from native/src/additional_proximity_chars.cpp)0
-rw-r--r--native/jni/src/additional_proximity_chars.h (renamed from native/src/additional_proximity_chars.h)0
-rw-r--r--native/jni/src/basechars.cpp (renamed from native/src/basechars.cpp)0
-rw-r--r--native/jni/src/bigram_dictionary.cpp (renamed from native/src/bigram_dictionary.cpp)0
-rw-r--r--native/jni/src/bigram_dictionary.h (renamed from native/src/bigram_dictionary.h)0
-rw-r--r--native/jni/src/binary_format.h (renamed from native/src/binary_format.h)0
-rw-r--r--native/jni/src/char_utils.cpp (renamed from native/src/char_utils.cpp)0
-rw-r--r--native/jni/src/char_utils.h (renamed from native/src/char_utils.h)0
-rw-r--r--native/jni/src/correction.cpp (renamed from native/src/correction.cpp)0
-rw-r--r--native/jni/src/correction.h (renamed from native/src/correction.h)0
-rw-r--r--native/jni/src/correction_state.h (renamed from native/src/correction_state.h)0
-rw-r--r--native/jni/src/debug.h (renamed from native/src/debug.h)0
-rw-r--r--native/jni/src/defines.h (renamed from native/src/defines.h)0
-rw-r--r--native/jni/src/dictionary.cpp (renamed from native/src/dictionary.cpp)0
-rw-r--r--native/jni/src/dictionary.h (renamed from native/src/dictionary.h)0
-rw-r--r--native/jni/src/proximity_info.cpp (renamed from native/src/proximity_info.cpp)0
-rw-r--r--native/jni/src/proximity_info.h (renamed from native/src/proximity_info.h)0
-rw-r--r--native/jni/src/terminal_attributes.h (renamed from native/src/terminal_attributes.h)0
-rw-r--r--native/jni/src/unigram_dictionary.cpp (renamed from native/src/unigram_dictionary.cpp)0
-rw-r--r--native/jni/src/unigram_dictionary.h (renamed from native/src/unigram_dictionary.h)0
-rw-r--r--native/jni/src/words_priority_queue.h (renamed from native/src/words_priority_queue.h)0
-rw-r--r--native/jni/src/words_priority_queue_pool.h (renamed from native/src/words_priority_queue_pool.h)0
23 files changed, 73 insertions, 27 deletions
diff --git a/native/jni/Android.mk b/native/jni/Android.mk
index ffaede37d..5e0d3518d 100644
--- a/native/jni/Android.mk
+++ b/native/jni/Android.mk
@@ -13,9 +13,35 @@
# limitations under the License.
LOCAL_PATH := $(call my-dir)
+
+############ some local flags
+# If you change any of those flags, you need to rebuild both libjni_latinime_static
+# and the shared library.
+#FLAG_DBG := true
+#FLAG_DO_PROFILE := true
+
+TARGETING_UNBUNDLED_FROYO := true
+
+ifeq ($(TARGET_ARCH), x86)
+ TARGETING_UNBUNDLED_FROYO := false
+endif
+
+ifeq ($(TARGET_ARCH), mips)
+ TARGETING_UNBUNDLED_FROYO := false
+endif
+
+ifeq ($(FLAG_DBG), true)
+ TARGETING_UNBUNDLED_FROYO := false
+endif
+
+ifeq ($(FLAG_DO_PROFILE), true)
+ TARGETING_UNBUNDLED_FROYO := false
+endif
+
+######################################
include $(CLEAR_VARS)
-LATIN_IME_SRC_DIR := ../src
+LATIN_IME_SRC_DIR := src
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
@@ -43,50 +69,70 @@ LOCAL_SRC_FILES := \
$(LATIN_IME_JNI_SRC_FILES) \
$(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
-#FLAG_DBG := true
-#FLAG_DO_PROFILE := true
-
-TARGETING_UNBUNDLED_FROYO := true
-
-ifeq ($(TARGET_ARCH), x86)
- TARGETING_UNBUNDLED_FROYO := false
-endif
-
-ifeq ($(TARGET_ARCH), mips)
- TARGETING_UNBUNDLED_FROYO := false
-endif
-
-ifeq ($(FLAG_DBG), true)
- TARGETING_UNBUNDLED_FROYO := false
-endif
-
-ifeq ($(FLAG_DO_PROFILE), true)
- TARGETING_UNBUNDLED_FROYO := false
-endif
-
ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
LOCAL_NDK_VERSION := 4
LOCAL_SDK_VERSION := 8
endif
-LOCAL_MODULE := libjni_latinime
+ifeq ($(FLAG_DO_PROFILE), true)
+ $(warning Making profiling version of native library)
+ LOCAL_CFLAGS += -DFLAG_DO_PROFILE
+else # FLAG_DO_PROFILE
+ifeq ($(FLAG_DBG), true)
+ $(warning Making debug version of native library)
+ LOCAL_CFLAGS += -DFLAG_DBG
+endif # FLAG_DBG
+endif # FLAG_DO_PROFILE
+LOCAL_MODULE := libjni_latinime_static
LOCAL_MODULE_TAGS := optional
-# For STL
+ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
+include external/stlport/libstlport.mk
+else # In the NDK build system
LOCAL_C_INCLUDES += external/stlport/stlport bionic
-LOCAL_SHARED_LIBRARIES += libstlport
+endif
+
+include $(BUILD_STATIC_LIBRARY)
+
+######################################
+include $(CLEAR_VARS)
+
+# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
+LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
+
+ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
+LOCAL_SHARED_LIBRARIES := libstlport
+else # In the NDK build system
+LOCAL_SHARED_LIBRARIES := libstlport_static
+endif
ifeq ($(FLAG_DO_PROFILE), true)
$(warning Making profiling version of native library)
- LOCAL_CFLAGS += -DFLAG_DO_PROFILE
LOCAL_SHARED_LIBRARIES += libcutils libutils
else # FLAG_DO_PROFILE
ifeq ($(FLAG_DBG), true)
$(warning Making debug version of native library)
- LOCAL_CFLAGS += -DFLAG_DBG
LOCAL_SHARED_LIBRARIES += libcutils libutils
endif # FLAG_DBG
endif # FLAG_DO_PROFILE
+ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
+ LOCAL_NDK_VERSION := 4
+ LOCAL_SDK_VERSION := 8
+endif
+
+LOCAL_MODULE := libjni_latinime
+LOCAL_MODULE_TAGS := optional
+
+ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
+include external/stlport/libstlport.mk
+endif
+
include $(BUILD_SHARED_LIBRARY)
+
+#################### Clean up the tmp vars
+LATIN_IME_CORE_SRC_FILES :=
+LATIN_IME_JNI_SRC_FILES :=
+LATIN_IME_SRC_DIR :=
+TARGETING_UNBUNDLED_FROYO :=
diff --git a/native/src/additional_proximity_chars.cpp b/native/jni/src/additional_proximity_chars.cpp
index 224f020f2..224f020f2 100644
--- a/native/src/additional_proximity_chars.cpp
+++ b/native/jni/src/additional_proximity_chars.cpp
diff --git a/native/src/additional_proximity_chars.h b/native/jni/src/additional_proximity_chars.h
index e0ecc0e1d..e0ecc0e1d 100644
--- a/native/src/additional_proximity_chars.h
+++ b/native/jni/src/additional_proximity_chars.h
diff --git a/native/src/basechars.cpp b/native/jni/src/basechars.cpp
index 31f1e18a8..31f1e18a8 100644
--- a/native/src/basechars.cpp
+++ b/native/jni/src/basechars.cpp
diff --git a/native/src/bigram_dictionary.cpp b/native/jni/src/bigram_dictionary.cpp
index f7a3d3e60..f7a3d3e60 100644
--- a/native/src/bigram_dictionary.cpp
+++ b/native/jni/src/bigram_dictionary.cpp
diff --git a/native/src/bigram_dictionary.h b/native/jni/src/bigram_dictionary.h
index 8132fbc59..8132fbc59 100644
--- a/native/src/bigram_dictionary.h
+++ b/native/jni/src/bigram_dictionary.h
diff --git a/native/src/binary_format.h b/native/jni/src/binary_format.h
index ab033ad90..ab033ad90 100644
--- a/native/src/binary_format.h
+++ b/native/jni/src/binary_format.h
diff --git a/native/src/char_utils.cpp b/native/jni/src/char_utils.cpp
index a31a0632c..a31a0632c 100644
--- a/native/src/char_utils.cpp
+++ b/native/jni/src/char_utils.cpp
diff --git a/native/src/char_utils.h b/native/jni/src/char_utils.h
index 607dc5195..607dc5195 100644
--- a/native/src/char_utils.h
+++ b/native/jni/src/char_utils.h
diff --git a/native/src/correction.cpp b/native/jni/src/correction.cpp
index 087219ed4..087219ed4 100644
--- a/native/src/correction.cpp
+++ b/native/jni/src/correction.cpp
diff --git a/native/src/correction.h b/native/jni/src/correction.h
index ee55c9604..ee55c9604 100644
--- a/native/src/correction.h
+++ b/native/jni/src/correction.h
diff --git a/native/src/correction_state.h b/native/jni/src/correction_state.h
index 5b2cbd3a2..5b2cbd3a2 100644
--- a/native/src/correction_state.h
+++ b/native/jni/src/correction_state.h
diff --git a/native/src/debug.h b/native/jni/src/debug.h
index b13052c95..b13052c95 100644
--- a/native/src/debug.h
+++ b/native/jni/src/debug.h
diff --git a/native/src/defines.h b/native/jni/src/defines.h
index e882c3714..e882c3714 100644
--- a/native/src/defines.h
+++ b/native/jni/src/defines.h
diff --git a/native/src/dictionary.cpp b/native/jni/src/dictionary.cpp
index 981a983ee..981a983ee 100644
--- a/native/src/dictionary.cpp
+++ b/native/jni/src/dictionary.cpp
diff --git a/native/src/dictionary.h b/native/jni/src/dictionary.h
index 139d3f0d7..139d3f0d7 100644
--- a/native/src/dictionary.h
+++ b/native/jni/src/dictionary.h
diff --git a/native/src/proximity_info.cpp b/native/jni/src/proximity_info.cpp
index c00c4c20f..c00c4c20f 100644
--- a/native/src/proximity_info.cpp
+++ b/native/jni/src/proximity_info.cpp
diff --git a/native/src/proximity_info.h b/native/jni/src/proximity_info.h
index c1eefeacc..c1eefeacc 100644
--- a/native/src/proximity_info.h
+++ b/native/jni/src/proximity_info.h
diff --git a/native/src/terminal_attributes.h b/native/jni/src/terminal_attributes.h
index 1f9815936..1f9815936 100644
--- a/native/src/terminal_attributes.h
+++ b/native/jni/src/terminal_attributes.h
diff --git a/native/src/unigram_dictionary.cpp b/native/jni/src/unigram_dictionary.cpp
index ed4c066f3..ed4c066f3 100644
--- a/native/src/unigram_dictionary.cpp
+++ b/native/jni/src/unigram_dictionary.cpp
diff --git a/native/src/unigram_dictionary.h b/native/jni/src/unigram_dictionary.h
index c8f15566c..c8f15566c 100644
--- a/native/src/unigram_dictionary.h
+++ b/native/jni/src/unigram_dictionary.h
diff --git a/native/src/words_priority_queue.h b/native/jni/src/words_priority_queue.h
index 249962eec..249962eec 100644
--- a/native/src/words_priority_queue.h
+++ b/native/jni/src/words_priority_queue.h
diff --git a/native/src/words_priority_queue_pool.h b/native/jni/src/words_priority_queue_pool.h
index 5b50e8f4f..5b50e8f4f 100644
--- a/native/src/words_priority_queue_pool.h
+++ b/native/jni/src/words_priority_queue_pool.h