blob: 51aa4eabe10717eda98e1f3eb6ec66495a529f67 [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
Ken Wakasae3f26dd2012-07-27 18:06:06 +090018# If you change any of those flags, you need to rebuild both libjni_latinime_common_static
19# and the shared library that uses libjni_latinime_common_static.
Satoshi Kataoka3ffaf392012-06-29 12:53:34 +090020FLAG_DBG ?= false
satok1035bc92012-06-13 16:07:54 -070021FLAG_DO_PROFILE ?= false
Ying Wang32f0e242012-03-29 14:57:55 -070022
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 Wakasa8fcd7692012-06-28 21:47:11 +090027LATIN_IME_SRC_FULLPATH_DIR := $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
Ken Wakasad5e35ac2011-12-13 19:46:15 +090028
Ken Wakasa0336ec42012-07-02 23:52:35 +090029LOCAL_C_INCLUDES += $(LATIN_IME_SRC_FULLPATH_DIR) $(LATIN_IME_SRC_FULLPATH_DIR)/gesture
Ken Wakasad5e35ac2011-12-13 19:46:15 +090030
Ken Wakasa6e663492012-11-03 02:50:47 +090031LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
Ken Wakasaf775bf32012-11-07 07:52:34 +090032 -Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls -Wno-system-headers
33
34ifeq ($(TARGET_ARCH), arm)
35LOCAL_CFLAGS += -Winline
36endif
Ken Wakasad5e35ac2011-12-13 19:46:15 +090037
38# To suppress compiler warnings for unused variables/functions used for debug features etc.
39LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
40
41LATIN_IME_JNI_SRC_FILES := \
42 com_android_inputmethod_keyboard_ProximityInfo.cpp \
43 com_android_inputmethod_latin_BinaryDictionary.cpp \
Satoshi Kataokac4e4dfe2012-08-08 19:40:44 +090044 com_android_inputmethod_latin_DicTraverseSession.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090045 jni_common.cpp
46
47LATIN_IME_CORE_SRC_FILES := \
satok552c3c22012-03-13 16:33:47 +090048 additional_proximity_chars.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090049 bigram_dictionary.cpp \
50 char_utils.cpp \
51 correction.cpp \
52 dictionary.cpp \
Satoshi Kataokae9f3e182012-08-09 23:23:08 +090053 dic_traverse_wrapper.cpp \
Ken Wakasad5e35ac2011-12-13 19:46:15 +090054 proximity_info.cpp \
Satoshi Kataoka3e8c58f2012-06-05 17:55:52 +090055 proximity_info_state.cpp \
Satoshi Kataoka91eb4d82012-06-26 16:39:07 +090056 unigram_dictionary.cpp \
Ken Wakasa2c2f3a92012-11-02 18:29:03 +090057 words_priority_queue.cpp \
Tom Ouyangeb2fe2a2012-07-18 17:08:20 +090058 gesture/gesture_decoder_wrapper.cpp \
59 gesture/incremental_decoder_wrapper.cpp
Ken Wakasa8658e552012-06-30 08:53:33 +090060
Ken Wakasad5e35ac2011-12-13 19:46:15 +090061LOCAL_SRC_FILES := \
62 $(LATIN_IME_JNI_SRC_FILES) \
Ken Wakasa0336ec42012-07-02 23:52:35 +090063 $(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
Ken Wakasa8fcd7692012-06-28 21:47:11 +090064
65ifeq ($(FLAG_DO_PROFILE), true)
66 $(warning Making profiling version of native library)
67 LOCAL_CFLAGS += -DFLAG_DO_PROFILE
68else # FLAG_DO_PROFILE
69ifeq ($(FLAG_DBG), true)
70 $(warning Making debug version of native library)
71 LOCAL_CFLAGS += -DFLAG_DBG
72endif # FLAG_DBG
73endif # FLAG_DO_PROFILE
74
Ken Wakasa8658e552012-06-30 08:53:33 +090075LOCAL_MODULE := libjni_latinime_common_static
Ken Wakasa8fcd7692012-06-28 21:47:11 +090076LOCAL_MODULE_TAGS := optional
77
Ken Wakasaf52c1c52012-07-06 15:53:51 +090078LOCAL_SDK_VERSION := 14
79LOCAL_NDK_STL_VARIANT := stlport_static
Ken Wakasa8fcd7692012-06-28 21:47:11 +090080
81include $(BUILD_STATIC_LIBRARY)
Ying Wang32f0e242012-03-29 14:57:55 -070082######################################
83include $(CLEAR_VARS)
84
85# All code in LOCAL_WHOLE_STATIC_LIBRARIES will be built into this shared library.
Satoshi Kataokadeb09872012-07-03 17:45:50 +090086LOCAL_WHOLE_STATIC_LIBRARIES := libjni_latinime_common_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +090087
Ying Wang32f0e242012-03-29 14:57:55 -070088ifeq ($(FLAG_DO_PROFILE), true)
89 $(warning Making profiling version of native library)
Ken Wakasae3f26dd2012-07-27 18:06:06 +090090 LOCAL_SHARED_LIBRARIES += liblog
Ying Wang32f0e242012-03-29 14:57:55 -070091else # FLAG_DO_PROFILE
92ifeq ($(FLAG_DBG), true)
93 $(warning Making debug version of native library)
Ken Wakasae3f26dd2012-07-27 18:06:06 +090094 LOCAL_SHARED_LIBRARIES += liblog
Ying Wang32f0e242012-03-29 14:57:55 -070095endif # FLAG_DBG
96endif # FLAG_DO_PROFILE
Ken Wakasad5e35ac2011-12-13 19:46:15 +090097
Ken Wakasad5e35ac2011-12-13 19:46:15 +090098LOCAL_MODULE := libjni_latinime
Jean-Baptiste Queru11c41212012-01-23 09:06:00 -080099LOCAL_MODULE_TAGS := optional
Ken Wakasad5e35ac2011-12-13 19:46:15 +0900100
Ken Wakasaf52c1c52012-07-06 15:53:51 +0900101LOCAL_SDK_VERSION := 14
102LOCAL_NDK_STL_VARIANT := stlport_static
Ken Wakasa0c1a3ec2012-03-31 05:07:32 +0900103
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 :=
Ken Wakasa8fcd7692012-06-28 21:47:11 +0900109LATIN_IME_GESTURE_IMPL_SRC_FILES :=
Ying Wang32f0e242012-03-29 14:57:55 -0700110LATIN_IME_SRC_DIR :=
Ken Wakasa8fcd7692012-06-28 21:47:11 +0900111LATIN_IME_SRC_FULLPATH_DIR :=