diff options
Diffstat (limited to 'native/jni/Android.mk')
-rw-r--r-- | native/jni/Android.mk | 56 |
1 files changed, 50 insertions, 6 deletions
diff --git a/native/jni/Android.mk b/native/jni/Android.mk index d53757fd4..df98680ca 100644 --- a/native/jni/Android.mk +++ b/native/jni/Android.mk @@ -17,15 +17,17 @@ 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 +FLAG_DBG ?= false +FLAG_DO_PROFILE ?= false ###################################### include $(CLEAR_VARS) LATIN_IME_SRC_DIR := src +LATIN_IME_SRC_FULLPATH_DIR := $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR) -LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR) +LOCAL_C_INCLUDES += $(LATIN_IME_SRC_FULLPATH_DIR) \ + $(addprefix $(LATIN_IME_SRC_FULLPATH_DIR)/, gesture gesture/impl) LOCAL_CFLAGS += -Werror -Wall @@ -35,6 +37,7 @@ LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function LATIN_IME_JNI_SRC_FILES := \ com_android_inputmethod_keyboard_ProximityInfo.cpp \ com_android_inputmethod_latin_BinaryDictionary.cpp \ + com_android_inputmethod_latin_NativeUtils.cpp \ jni_common.cpp LATIN_IME_CORE_SRC_FILES := \ @@ -45,7 +48,9 @@ LATIN_IME_CORE_SRC_FILES := \ correction.cpp \ dictionary.cpp \ proximity_info.cpp \ - unigram_dictionary.cpp + proximity_info_state.cpp \ + unigram_dictionary.cpp \ + gesture/build_check.cpp LOCAL_SRC_FILES := \ $(LATIN_IME_JNI_SRC_FILES) \ @@ -71,12 +76,50 @@ LOCAL_C_INCLUDES += external/stlport/stlport bionic endif include $(BUILD_STATIC_LIBRARY) +###################################### +include $(CLEAR_VARS) + +LOCAL_C_INCLUDES += $(LATIN_IME_SRC_FULLPATH_DIR) \ + $(addprefix $(LATIN_IME_SRC_FULLPATH_DIR)/, gesture gesture/impl gesture/impl/header) + +LOCAL_CFLAGS += -Werror -Wall + +# To suppress compiler warnings for unused variables/functions used for debug features etc. +LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function +LATIN_IME_GESTURE_IMPL_SRC_FILES := \ + gesture/impl/gesture_decoder_impl.cpp \ + gesture/impl/incremental_decoder_impl.cpp \ + gesture/impl/token_beam_impl.cpp \ + gesture/impl/token_impl.cpp + +LOCAL_SRC_FILES := $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_GESTURE_IMPL_SRC_FILES)) + +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_gesture_impl_static +LOCAL_MODULE_TAGS := optional + +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 +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 +LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static libjni_latinime_gesture_impl_static ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system LOCAL_SHARED_LIBRARIES := libstlport @@ -106,5 +149,6 @@ include $(BUILD_SHARED_LIBRARY) #################### Clean up the tmp vars LATIN_IME_CORE_SRC_FILES := LATIN_IME_JNI_SRC_FILES := +LATIN_IME_GESTURE_IMPL_SRC_FILES := LATIN_IME_SRC_DIR := -TARGETING_UNBUNDLED_FROYO := +LATIN_IME_SRC_FULLPATH_DIR := |