blob: 510f18c4efa67650f06f6c63ef84c77e3aa1dee4 [file] [log] [blame]
Jean Chalarde7870a22013-08-12 12:44:04 +09001#
2# Copyright (C) 2013 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16LOCAL_PATH := $(call my-dir)
17include $(CLEAR_VARS)
18
19# Need to define the name of the library in the caller in LATINIME_HOST_NATIVE_LIBNAME
20
21LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
22
Jean Chalarda245d152013-12-12 15:08:10 +090023ifeq ($(FLAG_DBG), true)
24 $(warning Making debug version of native library)
25 LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline
26endif #FLAG_DBG
27
Ken Wakasa3ccbf7e2014-04-04 19:55:59 +090028LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function
Jean Chalarde7870a22013-08-12 12:44:04 +090029
30LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni
31LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src
32LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR)
Jean Chalarde7870a22013-08-12 12:44:04 +090033
Jean Chalarda245d152013-12-12 15:08:10 +090034include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk
Jean Chalarde7870a22013-08-12 12:44:04 +090035
36LOCAL_SRC_FILES := \
37 $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \
38 $(addprefix $(LATINIME_NATIVE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
39
40LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME)
41
42include $(BUILD_HOST_SHARED_LIBRARY)
43
44# Clear our private variables
Jean Chalarda245d152013-12-12 15:08:10 +090045include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk
Jean Chalarde7870a22013-08-12 12:44:04 +090046LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..