2011-12-13 10:46:15 +00:00
|
|
|
# Copyright (C) 2011 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)
|
2012-03-29 21:57:55 +00:00
|
|
|
|
|
|
|
############ some local flags
|
2012-07-27 09:06:06 +00:00
|
|
|
# If you change any of those flags, you need to rebuild both libjni_latinime_common_static
|
|
|
|
# and the shared library that uses libjni_latinime_common_static.
|
2012-06-29 03:53:34 +00:00
|
|
|
FLAG_DBG ?= false
|
2012-06-13 23:07:54 +00:00
|
|
|
FLAG_DO_PROFILE ?= false
|
2012-03-29 21:57:55 +00:00
|
|
|
|
|
|
|
######################################
|
2011-12-13 10:46:15 +00:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2012-03-30 00:53:51 +00:00
|
|
|
LATIN_IME_SRC_DIR := src
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2013-04-08 11:22:37 +00:00
|
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2012-11-02 17:50:47 +00:00
|
|
|
LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
|
2012-11-06 22:52:34 +00:00
|
|
|
-Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls -Wno-system-headers
|
|
|
|
|
|
|
|
ifeq ($(TARGET_ARCH), arm)
|
2013-04-03 23:59:29 +00:00
|
|
|
ifeq ($(TARGET_GCC_VERSION), 4.6)
|
2012-11-06 22:52:34 +00:00
|
|
|
LOCAL_CFLAGS += -Winline
|
2012-11-20 01:24:32 +00:00
|
|
|
endif # TARGET_GCC_VERSION
|
|
|
|
endif # TARGET_ARCH
|
2011-12-13 10:46:15 +00:00
|
|
|
|
|
|
|
# To suppress compiler warnings for unused variables/functions used for debug features etc.
|
|
|
|
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 \
|
2012-08-08 10:40:44 +00:00
|
|
|
com_android_inputmethod_latin_DicTraverseSession.cpp \
|
2011-12-13 10:46:15 +00:00
|
|
|
jni_common.cpp
|
|
|
|
|
|
|
|
LATIN_IME_CORE_SRC_FILES := \
|
2013-04-08 11:22:37 +00:00
|
|
|
suggest/core/suggest.cpp \
|
2013-04-08 08:08:19 +00:00
|
|
|
$(addprefix suggest/core/dicnode/, \
|
|
|
|
dic_node.cpp \
|
|
|
|
dic_node_utils.cpp \
|
|
|
|
dic_nodes_cache.cpp) \
|
2013-05-30 15:02:57 +00:00
|
|
|
$(addprefix suggest/core/dictionary/, \
|
2013-06-03 04:06:32 +00:00
|
|
|
bigram_dictionary.cpp \
|
2013-06-11 03:01:49 +00:00
|
|
|
binary_dictionary_format_utils.cpp \
|
|
|
|
binary_dictionary_header.cpp \
|
|
|
|
binary_dictionary_header_reading_utils.cpp \
|
2013-06-24 00:42:37 +00:00
|
|
|
binary_dictionary_terminal_attributes_reading_utils.cpp \
|
2013-06-14 11:35:41 +00:00
|
|
|
bloom_filter.cpp \
|
2013-06-02 23:34:42 +00:00
|
|
|
byte_array_utils.cpp \
|
2013-05-30 15:02:57 +00:00
|
|
|
dictionary.cpp \
|
2013-06-14 11:35:41 +00:00
|
|
|
digraph_utils.cpp \
|
|
|
|
multi_bigram_map.cpp) \
|
2013-05-30 10:45:53 +00:00
|
|
|
$(addprefix suggest/core/layout/, \
|
2013-05-30 11:12:47 +00:00
|
|
|
additional_proximity_chars.cpp \
|
2013-05-30 10:45:53 +00:00
|
|
|
proximity_info.cpp \
|
|
|
|
proximity_info_params.cpp \
|
|
|
|
proximity_info_state.cpp \
|
|
|
|
proximity_info_state_utils.cpp) \
|
2013-04-01 08:57:31 +00:00
|
|
|
suggest/core/policy/weighting.cpp \
|
|
|
|
suggest/core/session/dic_traverse_session.cpp \
|
2013-06-28 10:47:00 +00:00
|
|
|
suggest/policyimpl/dictionary/patricia_trie_policy.cpp \
|
2013-04-04 08:58:10 +00:00
|
|
|
suggest/policyimpl/gesture/gesture_suggest_policy_factory.cpp \
|
2013-04-08 08:08:19 +00:00
|
|
|
$(addprefix suggest/policyimpl/typing/, \
|
|
|
|
scoring_params.cpp \
|
|
|
|
typing_scoring.cpp \
|
|
|
|
typing_suggest_policy.cpp \
|
|
|
|
typing_traversal.cpp \
|
2013-06-03 03:25:57 +00:00
|
|
|
typing_weighting.cpp) \
|
2013-06-11 08:04:40 +00:00
|
|
|
$(addprefix utils/, \
|
|
|
|
char_utils.cpp \
|
2013-06-11 09:05:04 +00:00
|
|
|
autocorrection_threshold_utils.cpp)
|
2012-06-29 23:53:33 +00:00
|
|
|
|
2011-12-13 10:46:15 +00:00
|
|
|
LOCAL_SRC_FILES := \
|
|
|
|
$(LATIN_IME_JNI_SRC_FILES) \
|
2012-07-02 14:52:35 +00:00
|
|
|
$(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
ifeq ($(FLAG_DO_PROFILE), true)
|
|
|
|
$(warning Making profiling version of native library)
|
2013-01-15 07:15:48 +00:00
|
|
|
LOCAL_CFLAGS += -DFLAG_DO_PROFILE -funwind-tables -fno-inline
|
2012-03-29 21:57:55 +00:00
|
|
|
else # FLAG_DO_PROFILE
|
|
|
|
ifeq ($(FLAG_DBG), true)
|
|
|
|
$(warning Making debug version of native library)
|
2013-01-15 07:15:48 +00:00
|
|
|
LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline
|
2013-01-09 06:21:44 +00:00
|
|
|
ifeq ($(FLAG_FULL_DBG), true)
|
|
|
|
$(warning Making full debug version of native library)
|
|
|
|
LOCAL_CFLAGS += -DFLAG_FULL_DBG
|
|
|
|
endif # FLAG_FULL_DBG
|
2012-03-29 21:57:55 +00:00
|
|
|
endif # FLAG_DBG
|
|
|
|
endif # FLAG_DO_PROFILE
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2012-07-02 14:52:35 +00:00
|
|
|
LOCAL_MODULE := libjni_latinime_common_static
|
2012-01-23 17:06:00 +00:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2012-07-06 06:53:51 +00:00
|
|
|
LOCAL_SDK_VERSION := 14
|
|
|
|
LOCAL_NDK_STL_VARIANT := stlport_static
|
2012-03-30 20:07:32 +00:00
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
2012-06-28 12:47:11 +00:00
|
|
|
######################################
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
|
2012-07-03 08:45:50 +00:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
|
2012-03-30 20:07:32 +00:00
|
|
|
|
2011-12-13 10:46:15 +00:00
|
|
|
ifeq ($(FLAG_DO_PROFILE), true)
|
|
|
|
$(warning Making profiling version of native library)
|
2012-11-27 03:17:42 +00:00
|
|
|
LOCAL_LDFLAGS += -llog
|
2011-12-13 10:46:15 +00:00
|
|
|
else # FLAG_DO_PROFILE
|
|
|
|
ifeq ($(FLAG_DBG), true)
|
|
|
|
$(warning Making debug version of native library)
|
2012-11-27 03:17:42 +00:00
|
|
|
LOCAL_LDFLAGS += -llog
|
2011-12-13 10:46:15 +00:00
|
|
|
endif # FLAG_DBG
|
|
|
|
endif # FLAG_DO_PROFILE
|
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
LOCAL_MODULE := libjni_latinime
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
|
2012-07-06 06:53:51 +00:00
|
|
|
LOCAL_SDK_VERSION := 14
|
|
|
|
LOCAL_NDK_STL_VARIANT := stlport_static
|
2012-12-21 01:25:56 +00:00
|
|
|
LOCAL_LDFLAGS += -ldl
|
2012-03-30 20:07:32 +00:00
|
|
|
|
2011-12-13 10:46:15 +00:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2012-03-29 21:57:55 +00:00
|
|
|
|
|
|
|
#################### Clean up the tmp vars
|
|
|
|
LATIN_IME_CORE_SRC_FILES :=
|
|
|
|
LATIN_IME_JNI_SRC_FILES :=
|
|
|
|
LATIN_IME_SRC_DIR :=
|