blob: 5d705b1ffbc3e4f435ad2ac9e5efb1426459e92d [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 \
Satoshi Kataoka91eb4d82012-06-26 16:39:07 +090050 unigram_dictionary.cpp \
51 gesture/build_check.cpp
Ken Wakasad5e35ac2011-12-13 19:46:15 +090052
53LOCAL_SRC_FILES := \
54 $(LATIN_IME_JNI_SRC_FILES) \
55 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
56
Ken Wakasad5e35ac2011-12-13 19:46:15 +090057ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070058 $(warning Making profiling version of native library)
59 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
60else # FLAG_DO_PROFILE
61ifeq ($(FLAG_DBG), true)
62 $(warning Making debug version of native library)
63 LOCAL_CFLAGS += -DFLAG_DBG
64endif # FLAG_DBG
65endif # FLAG_DO_PROFILE
66
67LOCAL_MODULE := libjni_latinime_static
68LOCAL_MODULE_TAGS := optional
69
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090070ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070071include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090072else # In the NDK build system
73LOCAL_C_INCLUDES += external/stlport/stlport bionic
74endif
75
Ying Wang32f0e242012-03-29 14:57:55 -070076include $(BUILD_STATIC_LIBRARY)
77
78######################################
79include $(CLEAR_VARS)
80
81# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
82LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090083
84ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070085LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090086else # In the NDK build system
87LOCAL_SHARED_LIBRARIES := libstlport_static
88endif
Ying Wang32f0e242012-03-29 14:57:55 -070089
90ifeq ($(FLAG_DO_PROFILE), true)
91 $(warning Making profiling version of native library)
92 LOCAL_SHARED_LIBRARIES += libcutils libutils
93else # FLAG_DO_PROFILE
94ifeq ($(FLAG_DBG), true)
95 $(warning Making debug version of native library)
96 LOCAL_SHARED_LIBRARIES += libcutils libutils
97endif # FLAG_DBG
98endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +090099
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900100LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -0800101LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900102
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900103ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700104include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900105endif
106
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900107include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700108
109#################### Clean up the tmp vars
110LATIN_IME_CORE_SRC_FILES :=
111LATIN_IME_JNI_SRC_FILES :=
112LATIN_IME_SRC_DIR :=
113TARGETING_UNBUNDLED_FROYO :=