blob: 0b73fc976bcb08131f5f720ee75a800622babb96 [file] [log] [blame]
Ken Wakasad5e35ac2011-12-13 19:46:15 +09001# Copyright (C) 2011 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15LOCAL_PATH := $(call my-dir)
Ying Wang32f0e242012-03-29 14:57:55 -070016
17############ some local flags
18# If you change any of those flags, you need to rebuild both libjni_latinime_static
19# and the shared library.
20#FLAG_DBG := true
satok1035bc92012-06-13 16:07:54 -070021FLAG_DO_PROFILE ?= false
Ying Wang32f0e242012-03-29 14:57:55 -070022
Ying Wang32f0e242012-03-29 14:57:55 -070023######################################
Ken Wakasad5e35ac2011-12-13 19:46:15 +090024include $(CLEAR_VARS)
25
Ken Wakasa3ef3e242012-03-30 09:53:51 +090026LATIN_IME_SRC_DIR := src
Ken Wakasad5e35ac2011-12-13 19:46:15 +090027
28LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
Satoshi Kataokaefb63242012-06-27 14:52:40 +090029LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)/gesture
30LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)/gesture/impl
Satoshi Kataoka2f6817e2012-06-27 17:13:45 +090031LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)/gesture/impl/header
Ken Wakasad5e35ac2011-12-13 19:46:15 +090032
33LOCAL_CFLAGS += -Werror -Wall
34
35# To suppress compiler warnings for unused variables/functions used for debug features etc.
36LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
37
38LATIN_IME_JNI_SRC_FILES := \
39 com_android_inputmethod_keyboard_ProximityInfo.cpp \
40 com_android_inputmethod_latin_BinaryDictionary.cpp \
Ken Wakasae7b34b92012-06-08 19:05:47 +090041 com_android_inputmethod_latin_NativeUtils.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090042 jni_common.cpp
43
44LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090045 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090046 basechars.cpp \
47 bigram_dictionary.cpp \
48 char_utils.cpp \
49 correction.cpp \
50 dictionary.cpp \
51 proximity_info.cpp \
Satoshi Kataoka3e8c58f2012-06-05 17:55:52 +090052 proximity_info_state.cpp \
Satoshi Kataoka91eb4d82012-06-26 16:39:07 +090053 unigram_dictionary.cpp \
Satoshi Kataoka2f6817e2012-06-27 17:13:45 +090054 gesture/build_check.cpp \
55 gesture/impl/gesture_decoder_impl.cpp \
56 gesture/impl/incremental_decoder_impl.cpp \
57 gesture/impl/token_beam_impl.cpp \
58 gesture/impl/token_impl.cpp
Ken Wakasad5e35ac2011-12-13 19:46:15 +090059
60LOCAL_SRC_FILES := \
61 $(LATIN_IME_JNI_SRC_FILES) \
62 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
63
Ken Wakasad5e35ac2011-12-13 19:46:15 +090064ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070065 $(warning Making profiling version of native library)
66 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
67else # FLAG_DO_PROFILE
68ifeq ($(FLAG_DBG), true)
69 $(warning Making debug version of native library)
70 LOCAL_CFLAGS += -DFLAG_DBG
71endif # FLAG_DBG
72endif # FLAG_DO_PROFILE
73
74LOCAL_MODULE := libjni_latinime_static
75LOCAL_MODULE_TAGS := optional
76
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090077ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070078include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090079else # In the NDK build system
80LOCAL_C_INCLUDES += external/stlport/stlport bionic
81endif
82
Ying Wang32f0e242012-03-29 14:57:55 -070083include $(BUILD_STATIC_LIBRARY)
84
85######################################
86include $(CLEAR_VARS)
87
88# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
89LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090090
91ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070092LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090093else # In the NDK build system
94LOCAL_SHARED_LIBRARIES := libstlport_static
95endif
Ying Wang32f0e242012-03-29 14:57:55 -070096
97ifeq ($(FLAG_DO_PROFILE), true)
98 $(warning Making profiling version of native library)
99 LOCAL_SHARED_LIBRARIES += libcutils libutils
100else # FLAG_DO_PROFILE
101ifeq ($(FLAG_DBG), true)
102 $(warning Making debug version of native library)
103 LOCAL_SHARED_LIBRARIES += libcutils libutils
104endif # FLAG_DBG
105endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900106
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900107LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -0800108LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900109
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900110ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700111include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900112endif
113
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900114include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700115
116#################### Clean up the tmp vars
117LATIN_IME_CORE_SRC_FILES :=
118LATIN_IME_JNI_SRC_FILES :=
119LATIN_IME_SRC_DIR :=
120TARGETING_UNBUNDLED_FROYO :=