blob: a6bb48752fa006a3edb1f43a95b54a0dbc7f9ecb [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
Ken Wakasad5e35ac2011-12-13 19:46:15 +090031
32LOCAL_CFLAGS += -Werror -Wall
33
34# To suppress compiler warnings for unused variables/functions used for debug features etc.
35LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
36
37LATIN_IME_JNI_SRC_FILES := \
38 com_android_inputmethod_keyboard_ProximityInfo.cpp \
39 com_android_inputmethod_latin_BinaryDictionary.cpp \
Ken Wakasae7b34b92012-06-08 19:05:47 +090040 com_android_inputmethod_latin_NativeUtils.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090041 jni_common.cpp
42
43LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090044 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090045 basechars.cpp \
46 bigram_dictionary.cpp \
47 char_utils.cpp \
48 correction.cpp \
49 dictionary.cpp \
50 proximity_info.cpp \
Satoshi Kataoka3e8c58f2012-06-05 17:55:52 +090051 proximity_info_state.cpp \
Satoshi Kataoka91eb4d82012-06-26 16:39:07 +090052 unigram_dictionary.cpp \
53 gesture/build_check.cpp
Ken Wakasad5e35ac2011-12-13 19:46:15 +090054
55LOCAL_SRC_FILES := \
56 $(LATIN_IME_JNI_SRC_FILES) \
57 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
58
Ken Wakasad5e35ac2011-12-13 19:46:15 +090059ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070060 $(warning Making profiling version of native library)
61 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
62else # FLAG_DO_PROFILE
63ifeq ($(FLAG_DBG), true)
64 $(warning Making debug version of native library)
65 LOCAL_CFLAGS += -DFLAG_DBG
66endif # FLAG_DBG
67endif # FLAG_DO_PROFILE
68
69LOCAL_MODULE := libjni_latinime_static
70LOCAL_MODULE_TAGS := optional
71
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090072ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070073include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090074else # In the NDK build system
75LOCAL_C_INCLUDES += external/stlport/stlport bionic
76endif
77
Ying Wang32f0e242012-03-29 14:57:55 -070078include $(BUILD_STATIC_LIBRARY)
79
80######################################
81include $(CLEAR_VARS)
82
83# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
84LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090085
86ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070087LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090088else # In the NDK build system
89LOCAL_SHARED_LIBRARIES := libstlport_static
90endif
Ying Wang32f0e242012-03-29 14:57:55 -070091
92ifeq ($(FLAG_DO_PROFILE), true)
93 $(warning Making profiling version of native library)
94 LOCAL_SHARED_LIBRARIES += libcutils libutils
95else # FLAG_DO_PROFILE
96ifeq ($(FLAG_DBG), true)
97 $(warning Making debug version of native library)
98 LOCAL_SHARED_LIBRARIES += libcutils libutils
99endif # FLAG_DBG
100endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900101
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900102LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -0800103LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900104
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900105ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700106include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900107endif
108
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900109include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700110
111#################### Clean up the tmp vars
112LATIN_IME_CORE_SRC_FILES :=
113LATIN_IME_JNI_SRC_FILES :=
114LATIN_IME_SRC_DIR :=
115TARGETING_UNBUNDLED_FROYO :=