blob: d53757fd4220c5032166230e8da7a1544a4b73c5 [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 \
48 unigram_dictionary.cpp
49
50LOCAL_SRC_FILES := \
51 $(LATIN_IME_JNI_SRC_FILES) \
52 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
53
Ken Wakasad5e35ac2011-12-13 19:46:15 +090054ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070055 $(warning Making profiling version of native library)
56 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
57else # FLAG_DO_PROFILE
58ifeq ($(FLAG_DBG), true)
59 $(warning Making debug version of native library)
60 LOCAL_CFLAGS += -DFLAG_DBG
61endif # FLAG_DBG
62endif # FLAG_DO_PROFILE
63
64LOCAL_MODULE := libjni_latinime_static
65LOCAL_MODULE_TAGS := optional
66
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090067ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070068include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090069else # In the NDK build system
70LOCAL_C_INCLUDES += external/stlport/stlport bionic
71endif
72
Ying Wang32f0e242012-03-29 14:57:55 -070073include $(BUILD_STATIC_LIBRARY)
74
75######################################
76include $(CLEAR_VARS)
77
78# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
79LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090080
81ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -070082LOCAL_SHARED_LIBRARIES := libstlport
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090083else # In the NDK build system
84LOCAL_SHARED_LIBRARIES := libstlport_static
85endif
Ying Wang32f0e242012-03-29 14:57:55 -070086
87ifeq ($(FLAG_DO_PROFILE), true)
88 $(warning Making profiling version of native library)
89 LOCAL_SHARED_LIBRARIES += libcutils libutils
90else # FLAG_DO_PROFILE
91ifeq ($(FLAG_DBG), true)
92 $(warning Making debug version of native library)
93 LOCAL_SHARED_LIBRARIES += libcutils libutils
94endif # FLAG_DBG
95endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +090096
Ken Wakasad5e35ac2011-12-13 19:46:15 +090097LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -080098LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +090099
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900100ifdef HISTORICAL_NDK_VERSIONS_ROOT # In the platform build system
Ying Wang32f0e242012-03-29 14:57:55 -0700101include external/stlport/libstlport.mk
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900102endif
103
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900104include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700105
106#################### Clean up the tmp vars
107LATIN_IME_CORE_SRC_FILES :=
108LATIN_IME_JNI_SRC_FILES :=
109LATIN_IME_SRC_DIR :=
110TARGETING_UNBUNDLED_FROYO :=