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
|
|
|
|
# If you change any of those flags, you need to rebuild both libjni_latinime_static
|
|
|
|
# and the shared library.
|
2012-07-04 06:38:14 +00:00
|
|
|
#FLAG_DBG := true
|
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
|
|
|
|
2012-07-04 06:38:14 +00:00
|
|
|
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
|
2011-12-13 10:46:15 +00:00
|
|
|
|
|
|
|
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_JNI_SRC_FILES := \
|
|
|
|
com_android_inputmethod_keyboard_ProximityInfo.cpp \
|
|
|
|
com_android_inputmethod_latin_BinaryDictionary.cpp \
|
2012-06-08 10:05:47 +00:00
|
|
|
com_android_inputmethod_latin_NativeUtils.cpp \
|
2011-12-13 10:46:15 +00:00
|
|
|
jni_common.cpp
|
|
|
|
|
|
|
|
LATIN_IME_CORE_SRC_FILES := \
|
2012-03-13 07:33:47 +00:00
|
|
|
additional_proximity_chars.cpp \
|
2011-12-13 10:46:15 +00:00
|
|
|
basechars.cpp \
|
|
|
|
bigram_dictionary.cpp \
|
|
|
|
char_utils.cpp \
|
|
|
|
correction.cpp \
|
|
|
|
dictionary.cpp \
|
|
|
|
proximity_info.cpp \
|
2012-06-05 08:55:52 +00:00
|
|
|
proximity_info_state.cpp \
|
2012-07-04 06:38:14 +00:00
|
|
|
unigram_dictionary.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-04 06:38:14 +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)
|
|
|
|
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
|
2011-12-13 10:46:15 +00:00
|
|
|
|
2012-07-05 07:35:42 +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-03-30 20:07:32 +00:00
|
|
|
ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
|
2012-03-29 21:57:55 +00:00
|
|
|
include external/stlport/libstlport.mk
|
2012-03-30 20:07:32 +00:00
|
|
|
else # In the NDK build system
|
|
|
|
LOCAL_C_INCLUDES += external/stlport/stlport bionic
|
|
|
|
endif
|
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|
2012-07-04 06:38:14 +00:00
|
|
|
|
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-04 06:38:14 +00:00
|
|
|
LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
|
2012-03-30 20:07:32 +00:00
|
|
|
|
|
|
|
ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
|
2012-03-29 21:57:55 +00:00
|
|
|
LOCAL_SHARED_LIBRARIES := libstlport
|
2012-03-30 20:07:32 +00:00
|
|
|
else # In the NDK build system
|
|
|
|
LOCAL_SHARED_LIBRARIES := libstlport_static
|
|
|
|
endif
|
2011-12-13 10:46:15 +00:00
|
|
|
|
|
|
|
ifeq ($(FLAG_DO_PROFILE), true)
|
|
|
|
$(warning Making profiling version of native library)
|
|
|
|
LOCAL_SHARED_LIBRARIES += libcutils libutils
|
|
|
|
else # FLAG_DO_PROFILE
|
|
|
|
ifeq ($(FLAG_DBG), true)
|
|
|
|
$(warning Making debug version of native library)
|
|
|
|
LOCAL_SHARED_LIBRARIES += libcutils libutils
|
|
|
|
endif # FLAG_DBG
|
|
|
|
endif # FLAG_DO_PROFILE
|
|
|
|
|
2012-03-29 21:57:55 +00:00
|
|
|
LOCAL_MODULE := libjni_latinime
|
|
|
|
LOCAL_MODULE_TAGS := optional
|
|
|
|
|
2012-03-30 20:07:32 +00:00
|
|
|
ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
|
2012-03-29 21:57:55 +00:00
|
|
|
include external/stlport/libstlport.mk
|
2012-03-30 20:07:32 +00:00
|
|
|
endif
|
|
|
|
|
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 :=
|
2012-07-04 06:38:14 +00:00
|
|
|
TARGETING_UNBUNDLED_FROYO :=
|