blob: 7a446860ce65be672e998a6c2dd7861342891843 [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
17# Only build if it's explicitly requested, or running mm/mmm.
18ifneq ($(ONE_SHOT_MAKEFILE)$(filter $(MAKECMDGOALS),dicttoolkit),)
19
20# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
21LATINIME_HOST_OSNAME := $(shell uname -s)
22ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
23
24LOCAL_PATH := $(call my-dir)
25
26include $(CLEAR_VARS)
27
28LATIN_IME_CORE_PATH := $(LOCAL_PATH)/../jni
29
30LATIN_IME_DICT_TOOLKIT_SRC_DIR := src
31LATIN_IME_CORE_SRC_DIR := ../jni/src
32
33LOCAL_CFLAGS += -Werror -Wall -Wextra -Weffc++ -Wformat=2 -Wcast-qual -Wcast-align \
34 -Wwrite-strings -Wfloat-equal -Wpointer-arith -Winit-self -Wredundant-decls \
35 -Woverloaded-virtual -Wsign-promo -Wno-system-headers
36
37# To suppress compiler warnings for unused variables/functions used for debug features etc.
38LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
Elliott Hughes8fd22fa2016-10-07 15:41:05 -070039LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090040
41include $(LOCAL_PATH)/NativeFileList.mk
42include $(LATIN_IME_CORE_PATH)/NativeFileList.mk
43
44LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \
45 $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR)
46
47LOCAL_SRC_FILES := $(LATIN_IME_DICT_TOOLKIT_MAIN_SRC_FILES) \
48 $(addprefix $(LATIN_IME_DICT_TOOLKIT_SRC_DIR)/, $(LATIN_IME_DICT_TOOLKIT_SRC_FILES)) \
49 $(addprefix $(LATIN_IME_CORE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES))
50
51LOCAL_MODULE := dicttoolkit
52LOCAL_MODULE_TAGS := optional
53
Keisuke Kuroyanagie101a532014-10-31 20:27:06 +090054LOCAL_CXX_STL := libc++
55
56include $(BUILD_HOST_EXECUTABLE)
57#################### Clean up the tmp vars
58include $(LOCAL_PATH)/CleanupNativeFileList.mk
59#################### Unit test
60include $(LOCAL_PATH)/UnitTests.mk
61
62endif # Darwin - TODO: Remove this
63
64endif
65
66endif # TARGET_BUILD_APPS