1# 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 39LOCAL_CFLAGS += -std=c++11 -Wno-unused-parameter -Wno-unused-function 40 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 54LOCAL_CLANG := true 55LOCAL_CXX_STL := libc++ 56 57include $(BUILD_HOST_EXECUTABLE) 58#################### Clean up the tmp vars 59include $(LOCAL_PATH)/CleanupNativeFileList.mk 60#################### Unit test 61include $(LOCAL_PATH)/UnitTests.mk 62 63endif # Darwin - TODO: Remove this 64 65endif 66 67endif # TARGET_BUILD_APPS 68