blob: 3bb7b58f1c6c111c8f0d03a33ebdfbc6cbe28952 [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)
29
30LOCAL_CFLAGS += -Werror -Wall
31
32# To suppress compiler warnings for unused variables/functions used for debug features etc.
33LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
34
35LATIN_IME_JNI_SRC_FILES := \
36 com_android_inputmethod_keyboard_ProximityInfo.cpp \
37 com_android_inputmethod_latin_BinaryDictionary.cpp \
Ken Wakasae7b34b92012-06-08 19:05:47 +090038 com_android_inputmethod_latin_NativeUtils.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090039 jni_common.cpp
40
41LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090042 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090043 basechars.cpp \
44 bigram_dictionary.cpp \
45 char_utils.cpp \
46 correction.cpp \
47 dictionary.cpp \
48 proximity_info.cpp \
Satoshi Kataoka3e8c58f2012-06-05 17:55:52 +090049 proximity_info_state.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090050 unigram_dictionary.cpp
51
52LOCAL_SRC_FILES := \
53 $(LATIN_IME_JNI_SRC_FILES) \
54 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
55
Ken Wakasad5e35ac2011-12-13 19:46:15 +090056ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070057 $(warning Making profiling version of native library)
58 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
59else # FLAG_DO_PROFILE
60ifeq ($(FLAG_DBG), true)
61 $(warning Making debug version of native library)
62 LOCAL_CFLAGS += -DFLAG_DBG
63endif # FLAG_DBG
64endif # FLAG_DO_PROFILE
65
66LOCAL_MODULE := libjni_latinime_static
67LOCAL_MODULE_TAGS := optional
68
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090069ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070070include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090071else # In the NDK build system
72LOCAL_C_INCLUDES += external/stlport/stlport bionic
73endif
74
Ying Wang32f0e242012-03-29 14:57:55 -070075include $(BUILD_STATIC_LIBRARY)
76
77######################################
78include $(CLEAR_VARS)
79
80# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
81LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090082
83ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070084LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090085else # In the NDK build system
86LOCAL_SHARED_LIBRARIES := libstlport_static
87endif
Ying Wang32f0e242012-03-29 14:57:55 -070088
89ifeq ($(FLAG_DO_PROFILE), true)
90 $(warning Making profiling version of native library)
91 LOCAL_SHARED_LIBRARIES += libcutils libutils
92else # FLAG_DO_PROFILE
93ifeq ($(FLAG_DBG), true)
94 $(warning Making debug version of native library)
95 LOCAL_SHARED_LIBRARIES += libcutils libutils
96endif # FLAG_DBG
97endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +090098
Ken Wakasad5e35ac2011-12-13 19:46:15 +090099LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -0800100LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900101
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900102ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700103include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900104endif
105
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900106include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700107
108#################### Clean up the tmp vars
109LATIN_IME_CORE_SRC_FILES :=
110LATIN_IME_JNI_SRC_FILES :=
111LATIN_IME_SRC_DIR :=
112TARGETING_UNBUNDLED_FROYO :=