Ken Wakasa | d5e35ac | 2011-12-13 19:46:15 +0900 | [diff] [blame] | 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 | |
| 15 | LOCAL_PATH := $(call my-dir) |
| 16 | include $(CLEAR_VARS) |
| 17 | |
| 18 | LATIN_IME_SRC_DIR := ../src |
| 19 | |
| 20 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR) |
| 21 | |
| 22 | LOCAL_CFLAGS += -Werror -Wall |
| 23 | |
| 24 | # To suppress compiler warnings for unused variables/functions used for debug features etc. |
| 25 | LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function |
| 26 | |
| 27 | LATIN_IME_JNI_SRC_FILES := \ |
| 28 | com_android_inputmethod_keyboard_ProximityInfo.cpp \ |
| 29 | com_android_inputmethod_latin_BinaryDictionary.cpp \ |
| 30 | jni_common.cpp |
| 31 | |
| 32 | LATIN_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 | |
| 41 | LOCAL_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 | |
| 48 | TARGETING_UNBUNDLED_FROYO := true |
| 49 | |
| 50 | ifeq ($(TARGET_ARCH), x86) |
| 51 | TARGETING_UNBUNDLED_FROYO := false |
| 52 | endif |
| 53 | |
Jean-Baptiste Queru | 26e3157 | 2012-02-14 13:09:49 -0800 | [diff] [blame] | 54 | ifeq ($(TARGET_ARCH), mips) |
| 55 | TARGETING_UNBUNDLED_FROYO := false |
| 56 | endif |
| 57 | |
Ken Wakasa | d5e35ac | 2011-12-13 19:46:15 +0900 | [diff] [blame] | 58 | ifeq ($(FLAG_DBG), true) |
| 59 | TARGETING_UNBUNDLED_FROYO := false |
| 60 | endif |
| 61 | |
| 62 | ifeq ($(FLAG_DO_PROFILE), true) |
| 63 | TARGETING_UNBUNDLED_FROYO := false |
| 64 | endif |
| 65 | |
| 66 | ifeq ($(TARGETING_UNBUNDLED_FROYO), true) |
| 67 | LOCAL_NDK_VERSION := 4 |
| 68 | LOCAL_SDK_VERSION := 8 |
| 69 | endif |
| 70 | |
| 71 | LOCAL_MODULE := libjni_latinime |
| 72 | |
Jean-Baptiste Queru | 11c4121 | 2012-01-23 09:06:00 -0800 | [diff] [blame] | 73 | LOCAL_MODULE_TAGS := optional |
Ken Wakasa | d5e35ac | 2011-12-13 19:46:15 +0900 | [diff] [blame] | 74 | |
| 75 | # For STL |
| 76 | LOCAL_C_INCLUDES += external/stlport/stlport bionic |
| 77 | LOCAL_SHARED_LIBRARIES += libstlport |
| 78 | |
| 79 | ifeq ($(FLAG_DO_PROFILE), true) |
| 80 | $(warning Making profiling version of native library) |
| 81 | LOCAL_CFLAGS += -DFLAG_DO_PROFILE |
| 82 | LOCAL_SHARED_LIBRARIES += libcutils libutils |
| 83 | else # FLAG_DO_PROFILE |
| 84 | ifeq ($(FLAG_DBG), true) |
| 85 | $(warning Making debug version of native library) |
| 86 | LOCAL_CFLAGS += -DFLAG_DBG |
| 87 | LOCAL_SHARED_LIBRARIES += libcutils libutils |
| 88 | endif # FLAG_DBG |
| 89 | endif # FLAG_DO_PROFILE |
| 90 | |
| 91 | include $(BUILD_SHARED_LIBRARY) |