blob: 0f7aef269ff849130f0797e43962879a0e1824d2 [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
21#FLAG_DO_PROFILE := true
22
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 \
38 jni_common.cpp
39
40LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090041 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090042 basechars.cpp \
43 bigram_dictionary.cpp \
44 char_utils.cpp \
45 correction.cpp \
46 dictionary.cpp \
47 proximity_info.cpp \
Satoshi Kataoka3e8c58f2012-06-05 17:55:52 +090048 proximity_info_state.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090049 unigram_dictionary.cpp
50
51LOCAL_SRC_FILES := \
52 $(LATIN_IME_JNI_SRC_FILES) \
53 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
54
Ken Wakasad5e35ac2011-12-13 19:46:15 +090055ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070056 $(warning Making profiling version of native library)
57 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
58else # FLAG_DO_PROFILE
59ifeq ($(FLAG_DBG), true)
60 $(warning Making debug version of native library)
61 LOCAL_CFLAGS += -DFLAG_DBG
62endif # FLAG_DBG
63endif # FLAG_DO_PROFILE
64
65LOCAL_MODULE := libjni_latinime_static
66LOCAL_MODULE_TAGS := optional
67
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090068ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070069include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090070else # In the NDK build system
71LOCAL_C_INCLUDES += external/stlport/stlport bionic
72endif
73
Ying Wang32f0e242012-03-29 14:57:55 -070074include $(BUILD_STATIC_LIBRARY)
75
76######################################
77include $(CLEAR_VARS)
78
79# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
80LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090081
82ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070083LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090084else # In the NDK build system
85LOCAL_SHARED_LIBRARIES := libstlport_static
86endif
Ying Wang32f0e242012-03-29 14:57:55 -070087
88ifeq ($(FLAG_DO_PROFILE), true)
89 $(warning Making profiling version of native library)
90 LOCAL_SHARED_LIBRARIES += libcutils libutils
91else # FLAG_DO_PROFILE
92ifeq ($(FLAG_DBG), true)
93 $(warning Making debug version of native library)
94 LOCAL_SHARED_LIBRARIES += libcutils libutils
95endif # FLAG_DBG
96endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +090097
Ken Wakasad5e35ac2011-12-13 19:46:15 +090098LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -080099LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900100
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900101ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700102include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900103endif
104
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900105include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700106
107#################### Clean up the tmp vars
108LATIN_IME_CORE_SRC_FILES :=
109LATIN_IME_JNI_SRC_FILES :=
110LATIN_IME_SRC_DIR :=
111TARGETING_UNBUNDLED_FROYO :=