blob: 96e28730e88a772553485ca77c8bb6d032331230 [file] [log] [blame]
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +09001# Copyright (C) 2014 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
15ifeq (,$(TARGET_BUILD_APPS))
16
17LOCAL_PATH := $(call my-dir)
18
19######################################
20include $(CLEAR_VARS)
21
22LATIN_IME_CORE_PATH := $(LOCAL_PATH)/../jni
23
24LATIN_IME_DICT_TOOLKIT_SRC_DIR := src
25LATIN_IME_CORE_SRC_DIR := ../jni/src
26LATIN_DICT_TOOLKIT_TEST_SRC_DIR := tests
27
28include $(LOCAL_PATH)/NativeFileList.mk
29include $(LATIN_IME_CORE_PATH)/NativeFileList.mk
30
31# TODO: Remove -std=c++11 once it is set by default on host build.
32LATIN_IME_SRC_DIR := src
33LOCAL_ADDRESS_SANITIZER := true
34LOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function
35LOCAL_CLANG := true
36LOCAL_CXX_STL := libc++
37LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
38 $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
39LOCAL_MODULE := liblatinime_dicttoolkit_host_static_for_unittests
40LOCAL_MODULE_TAGS := optional
41LOCAL_SRC_FILES := \
42 $(addprefix $(LATIN_IME_DICT_TOOLKIT_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_SRC_FILES)) \
43 $(addprefix $(LATIN_IME_CORE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
44include $(BUILD_HOST_STATIC_LIBRARY)
45
46include $(CLEAR_VARS)
47
48# TODO: Remove -std=c++11 once it is set by default on host build.
Keisuke Kuroyanagi4bfa3b22014-11-07 06:49:34 +090049LOCAL_ADDRESS_SANITIZER := true
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090050LOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function
51LOCAL_CLANG := true
52LOCAL_CXX_STL := libc++
53LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
54 $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
55LOCAL_MODULE := dicttoolkit_unittests
56LOCAL_MODULE_TAGS := tests
57LOCAL_SRC_FILES := \
58 $(addprefix $(LATIN_DICT_TOOLKIT_TEST_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_TEST_FILES))
59LOCAL_STATIC_LIBRARIES += liblatinime_dicttoolkit_host_static_for_unittests
60include $(BUILD_HOST_NATIVE_TEST)
61
62include $(LOCAL_PATH)/CleanupNativeFileList.mk
63
64#################### Clean up the tmp vars
65LATINIME_HOST_OSNAME :=
66LATIN_IME_SRC_DIR :=
67LATIN_IME_TEST_SRC_DIR :=
68
69endif # TARGET_BUILD_APPS