Jean Chalard | e7870a2 | 2013-08-12 12:44:04 +0900 | [diff] [blame] | 1 | # |
| 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 | |
| 16 | LOCAL_PATH := $(call my-dir) |
| 17 | include $(CLEAR_VARS) |
| 18 | |
| 19 | # Need to define the name of the library in the caller in LATINIME_HOST_NATIVE_LIBNAME |
| 20 | |
| 21 | LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. |
| 22 | |
Jean Chalard | a245d15 | 2013-12-12 15:08:10 +0900 | [diff] [blame] | 23 | ifeq ($(FLAG_DBG), true) |
| 24 | $(warning Making debug version of native library) |
| 25 | LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline |
| 26 | endif #FLAG_DBG |
| 27 | |
Jean Chalard | e7870a2 | 2013-08-12 12:44:04 +0900 | [diff] [blame] | 28 | ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),) |
| 29 | LOCAL_CFLAGS += -m64 |
| 30 | LOCAL_LDFLAGS += -m64 |
| 31 | endif #HOST_JDK_IS_64BIT_VERSION |
| 32 | |
Jean Chalard | a245d15 | 2013-12-12 15:08:10 +0900 | [diff] [blame] | 33 | LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated |
Jean Chalard | e7870a2 | 2013-08-12 12:44:04 +0900 | [diff] [blame] | 34 | LOCAL_NO_DEFAULT_COMPILER_FLAGS := true |
| 35 | |
| 36 | LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni |
| 37 | LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src |
| 38 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR) |
| 39 | # Used in jni_common.cpp to avoid registering useless methods. |
| 40 | |
Jean Chalard | a245d15 | 2013-12-12 15:08:10 +0900 | [diff] [blame] | 41 | include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk |
Jean Chalard | e7870a2 | 2013-08-12 12:44:04 +0900 | [diff] [blame] | 42 | |
| 43 | LOCAL_SRC_FILES := \ |
| 44 | $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \ |
| 45 | $(addprefix $(LATINIME_NATIVE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES)) |
| 46 | |
| 47 | LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME) |
| 48 | |
| 49 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 50 | |
| 51 | # Clear our private variables |
Jean Chalard | a245d15 | 2013-12-12 15:08:10 +0900 | [diff] [blame] | 52 | include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk |
Jean Chalard | e7870a2 | 2013-08-12 12:44:04 +0900 | [diff] [blame] | 53 | LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. |