1c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# Copyright (C) 2014 The Android Open Source Project
2c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#
3c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# Licensed under the Apache License, Version 2.0 (the "License");
4c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# you may not use this file except in compliance with the License.
5c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# You may obtain a copy of the License at
6c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#
7c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#      http://www.apache.org/licenses/LICENSE-2.0
8c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#
9c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# Unless required by applicable law or agreed to in writing, software
10c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# distributed under the License is distributed on an "AS IS" BASIS,
11c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# See the License for the specific language governing permissions and
13c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# limitations under the License.
14c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
15ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken Wakasa# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
16ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken WakasaLATINIME_HOST_OSNAME := $(shell uname -s)
17ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken Wakasaifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
18ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken Wakasa
19c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_PATH := $(call my-dir)
20c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
21c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa######################################
22c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(CLEAR_VARS)
23c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
24c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(LOCAL_PATH)/NativeFileList.mk
25c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
26c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#################### Host library for unit test
27c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# TODO: Remove -std=c++11 once it is set by default on host build.
28c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLATIN_IME_SRC_DIR := src
29c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function
30c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_CLANG := true
31c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
32c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_MODULE := liblatinime_host_static_for_unittests
33c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_MODULE_TAGS := optional
34c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_SRC_FILES := $(addprefix $(LATIN_IME_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
35c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(BUILD_HOST_STATIC_LIBRARY)
36c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
37c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#################### Host native tests
38c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(CLEAR_VARS)
39c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLATIN_IME_TEST_SRC_DIR := tests
40c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa# TODO: Remove -std=c++11 once it is set by default on host build.
41c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function
42c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_CLANG := true
43c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_SRC_DIR)
44c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_MODULE := liblatinime_host_unittests
45c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_MODULE_TAGS := tests
46c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLOCAL_SRC_FILES := $(addprefix $(LATIN_IME_TEST_SRC_DIR)/, $(LATIN_IME_CORE_TEST_FILES))
47cc9b60401e4d2f7b1895ae218eb3a952030325f1Yohei YukawaLOCAL_STATIC_LIBRARIES += liblatinime_host_static_for_unittests
48c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(BUILD_HOST_NATIVE_TEST)
49c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa
50ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken Wakasaendif # Darwin - TODO: Remove this
51ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken Wakasa
52c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawa#################### Clean up the tmp vars
53ed2781cf91b15a70f49fdec29cc9206e02aed1e4Ken WakasaLATINIME_HOST_OSNAME :=
54c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLATIN_IME_SRC_DIR :=
55c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei YukawaLATIN_IME_TEST_SRC_DIR :=
56c72652cb00eb0a02c46bfcd95202deec068ba5e0Yohei Yukawainclude $(LOCAL_PATH)/CleanupNativeFileList.mk
57