Android.mk revision 11c41216f137ad08e8f42daff7a5030f41be0c55
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    basechars.cpp \
34    bigram_dictionary.cpp \
35    char_utils.cpp \
36    correction.cpp \
37    dictionary.cpp \
38    proximity_info.cpp \
39    unigram_dictionary.cpp
40
41LOCAL_SRC_FILES := \
42    $(LATIN_IME_JNI_SRC_FILES) \
43    $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
44
45#FLAG_DBG := true
46#FLAG_DO_PROFILE := true
47
48TARGETING_UNBUNDLED_FROYO := true
49
50ifeq ($(TARGET_ARCH), x86)
51    TARGETING_UNBUNDLED_FROYO := false
52endif
53
54ifeq ($(FLAG_DBG), true)
55    TARGETING_UNBUNDLED_FROYO := false
56endif
57
58ifeq ($(FLAG_DO_PROFILE), true)
59    TARGETING_UNBUNDLED_FROYO := false
60endif
61
62ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
63    LOCAL_NDK_VERSION := 4
64    LOCAL_SDK_VERSION := 8
65endif
66
67LOCAL_MODULE := libjni_latinime
68
69LOCAL_MODULE_TAGS := optional
70
71# For STL
72LOCAL_C_INCLUDES += external/stlport/stlport bionic
73LOCAL_SHARED_LIBRARIES += libstlport
74
75ifeq ($(FLAG_DO_PROFILE), true)
76    $(warning Making profiling version of native library)
77    LOCAL_CFLAGS += -DFLAG_DO_PROFILE
78    LOCAL_SHARED_LIBRARIES += libcutils libutils
79else # FLAG_DO_PROFILE
80ifeq ($(FLAG_DBG), true)
81    $(warning Making debug version of native library)
82    LOCAL_CFLAGS += -DFLAG_DBG
83    LOCAL_SHARED_LIBRARIES += libcutils libutils
84endif # FLAG_DBG
85endif # FLAG_DO_PROFILE
86
87include $(BUILD_SHARED_LIBRARY)
88