Android.mk revision 3ef3e24a12ed72204f7a6f2e4b2df8ce7d243746
1# 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)
16include $(CLEAR_VARS)
17
18LATIN_IME_SRC_DIR := src
19
20LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
21
22LOCAL_CFLAGS += -Werror -Wall
23
24# To suppress compiler warnings for unused variables/functions used for debug features etc.
25LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
26
27LATIN_IME_JNI_SRC_FILES := \
28    com_android_inputmethod_keyboard_ProximityInfo.cpp \
29    com_android_inputmethod_latin_BinaryDictionary.cpp \
30    jni_common.cpp
31
32LATIN_IME_CORE_SRC_FILES := \
33    additional_proximity_chars.cpp \
34    basechars.cpp \
35    bigram_dictionary.cpp \
36    char_utils.cpp \
37    correction.cpp \
38    dictionary.cpp \
39    proximity_info.cpp \
40    unigram_dictionary.cpp
41
42LOCAL_SRC_FILES := \
43    $(LATIN_IME_JNI_SRC_FILES) \
44    $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
45
46#FLAG_DBG := true
47#FLAG_DO_PROFILE := true
48
49TARGETING_UNBUNDLED_FROYO := true
50
51ifeq ($(TARGET_ARCH), x86)
52    TARGETING_UNBUNDLED_FROYO := false
53endif
54
55ifeq ($(TARGET_ARCH), mips)
56    TARGETING_UNBUNDLED_FROYO := false
57endif
58
59ifeq ($(FLAG_DBG), true)
60    TARGETING_UNBUNDLED_FROYO := false
61endif
62
63ifeq ($(FLAG_DO_PROFILE), true)
64    TARGETING_UNBUNDLED_FROYO := false
65endif
66
67ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
68    LOCAL_NDK_VERSION := 4
69    LOCAL_SDK_VERSION := 8
70endif
71
72LOCAL_MODULE := libjni_latinime
73
74LOCAL_MODULE_TAGS := optional
75
76# For STL
77LOCAL_C_INCLUDES += external/stlport/stlport bionic
78LOCAL_SHARED_LIBRARIES += libstlport
79
80ifeq ($(FLAG_DO_PROFILE), true)
81    $(warning Making profiling version of native library)
82    LOCAL_CFLAGS += -DFLAG_DO_PROFILE
83    LOCAL_SHARED_LIBRARIES += libcutils libutils
84else # FLAG_DO_PROFILE
85ifeq ($(FLAG_DBG), true)
86    $(warning Making debug version of native library)
87    LOCAL_CFLAGS += -DFLAG_DBG
88    LOCAL_SHARED_LIBRARIES += libcutils libutils
89endif # FLAG_DBG
90endif # FLAG_DO_PROFILE
91
92include $(BUILD_SHARED_LIBRARY)
93