Keisuke Kuroyanagi | e101a53 | 2014-10-31 20:27:06 +0900 | [diff] [blame] | 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 | |
| 15 | ifeq (,$(TARGET_BUILD_APPS)) |
| 16 | |
| 17 | # Only build if it's explicitly requested, or running mm/mmm. |
| 18 | ifneq ($(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. |
| 21 | LATINIME_HOST_OSNAME := $(shell uname -s) |
| 22 | ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this |
| 23 | |
| 24 | LOCAL_PATH := $(call my-dir) |
| 25 | |
| 26 | include $(CLEAR_VARS) |
| 27 | |
| 28 | LATIN_IME_CORE_PATH := $(LOCAL_PATH)/../jni |
| 29 | |
| 30 | LATIN_IME_DICT_TOOLKIT_SRC_DIR := src |
| 31 | LATIN_IME_CORE_SRC_DIR := ../jni/src |
| 32 | |
| 33 | LOCAL_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. |
| 38 | LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function |
Elliott Hughes | 8fd22fa | 2016-10-07 15:41:05 -0700 | [diff] [blame] | 39 | LOCAL_CFLAGS += -Wno-unused-parameter -Wno-unused-function |
Keisuke Kuroyanagi | e101a53 | 2014-10-31 20:27:06 +0900 | [diff] [blame] | 40 | |
| 41 | include $(LOCAL_PATH)/NativeFileList.mk |
| 42 | include $(LATIN_IME_CORE_PATH)/NativeFileList.mk |
| 43 | |
| 44 | LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(LATIN_IME_DICT_TOOLKIT_SRC_DIR) \ |
| 45 | $(LATIN_IME_CORE_PATH)/$(LATIN_IME_CORE_SRC_DIR) |
| 46 | |
| 47 | LOCAL_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 | |
| 51 | LOCAL_MODULE := dicttoolkit |
| 52 | LOCAL_MODULE_TAGS := optional |
| 53 | |
Keisuke Kuroyanagi | e101a53 | 2014-10-31 20:27:06 +0900 | [diff] [blame] | 54 | LOCAL_CXX_STL := libc++ |
| 55 | |
| 56 | include $(BUILD_HOST_EXECUTABLE) |
| 57 | #################### Clean up the tmp vars |
| 58 | include $(LOCAL_PATH)/CleanupNativeFileList.mk |
| 59 | #################### Unit test |
| 60 | include $(LOCAL_PATH)/UnitTests.mk |
| 61 | |
| 62 | endif # Darwin - TODO: Remove this |
| 63 | |
| 64 | endif |
| 65 | |
| 66 | endif # TARGET_BUILD_APPS |