blob: f41d6916ee6677bd2b62a8e44389df6afdde10ab [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
23TARGETING_UNBUNDLED_FROYO := true
24
25ifeq ($(TARGET_ARCH), x86)
26 TARGETING_UNBUNDLED_FROYO := false
27endif
28
29ifeq ($(TARGET_ARCH), mips)
30 TARGETING_UNBUNDLED_FROYO := false
31endif
32
33ifeq ($(FLAG_DBG), true)
34 TARGETING_UNBUNDLED_FROYO := false
35endif
36
37ifeq ($(FLAG_DO_PROFILE), true)
38 TARGETING_UNBUNDLED_FROYO := false
39endif
40
41######################################
Ken Wakasad5e35ac2011-12-13 19:46:15 +090042include $(CLEAR_VARS)
43
Ken Wakasa3ef3e242012-03-30 09:53:51 +090044LATIN_IME_SRC_DIR := src
Ken Wakasad5e35ac2011-12-13 19:46:15 +090045
46LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
47
48LOCAL_CFLAGS += -Werror -Wall
49
50# To suppress compiler warnings for unused variables/functions used for debug features etc.
51LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
52
53LATIN_IME_JNI_SRC_FILES := \
54 com_android_inputmethod_keyboard_ProximityInfo.cpp \
55 com_android_inputmethod_latin_BinaryDictionary.cpp \
56 jni_common.cpp
57
58LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090059 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090060 basechars.cpp \
61 bigram_dictionary.cpp \
62 char_utils.cpp \
63 correction.cpp \
64 dictionary.cpp \
65 proximity_info.cpp \
66 unigram_dictionary.cpp
67
68LOCAL_SRC_FILES := \
69 $(LATIN_IME_JNI_SRC_FILES) \
70 $(addprefix $(LATIN_IME_SRC_DIR)/,$(LATIN_IME_CORE_SRC_FILES))
71
Ying Wang32f0e242012-03-29 14:57:55 -070072ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
73 LOCAL_NDK_VERSION := 4
74 LOCAL_SDK_VERSION := 8
Ken Wakasad5e35ac2011-12-13 19:46:15 +090075endif
76
77ifeq ($(FLAG_DO_PROFILE), true)
Ying Wang32f0e242012-03-29 14:57:55 -070078 $(warning Making profiling version of native library)
79 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
80else # FLAG_DO_PROFILE
81ifeq ($(FLAG_DBG), true)
82 $(warning Making debug version of native library)
83 LOCAL_CFLAGS += -DFLAG_DBG
84endif # FLAG_DBG
85endif # FLAG_DO_PROFILE
86
87LOCAL_MODULE := libjni_latinime_static
88LOCAL_MODULE_TAGS := optional
89
90include external/stlport/libstlport.mk
91include $(BUILD_STATIC_LIBRARY)
92
93######################################
94include $(CLEAR_VARS)
95
96# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
97LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_static
98LOCAL_SHARED_LIBRARIES := libstlport
99
100ifeq ($(FLAG_DO_PROFILE), true)
101 $(warning Making profiling version of native library)
102 LOCAL_SHARED_LIBRARIES += libcutils libutils
103else # FLAG_DO_PROFILE
104ifeq ($(FLAG_DBG), true)
105 $(warning Making debug version of native library)
106 LOCAL_SHARED_LIBRARIES += libcutils libutils
107endif # FLAG_DBG
108endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900109
110ifeq ($(TARGETING_UNBUNDLED_FROYO), true)
111 LOCAL_NDK_VERSION := 4
112 LOCAL_SDK_VERSION := 8
113endif
114
115LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -0800116LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900117
Ying Wang32f0e242012-03-29 14:57:55 -0700118include external/stlport/libstlport.mk
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900119include $(BUILD_SHARED_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -0700120
121#################### Clean up the tmp vars
122LATIN_IME_CORE_SRC_FILES :=
123LATIN_IME_JNI_SRC_FILES :=
124LATIN_IME_SRC_DIR :=
125TARGETING_UNBUNDLED_FROYO :=