1 # 2 # Copyright (C) 2013 The Android Open Source Project 3 # 4 # Licensed under the Apache License, Version 2.0 (the "License"); 5 # you may not use this file except in compliance with the License. 6 # You may obtain a copy of the License at 7 # 8 # http://www.apache.org/licenses/LICENSE-2.0 9 # 10 # Unless required by applicable law or agreed to in writing, software 11 # distributed under the License is distributed on an "AS IS" BASIS, 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 # See the License for the specific language governing permissions and 14 # limitations under the License. 15 16 # HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11. 17 LATINIME_HOST_OSNAME := $(shell uname -s) 18 ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this 19 20 LOCAL_PATH := $(call my-dir) 21 include $(CLEAR_VARS) 22 23 # Need to define the name of the library in the caller in LATINIME_HOST_NATIVE_LIBNAME 24 25 LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. 26 27 ifeq ($(FLAG_DBG), true) 28 $(warning Making debug version of native library) 29 LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline 30 endif #FLAG_DBG 31 32 LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function 33 ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),) 34 LOCAL_MULTILIB := 64 35 endif #HOST_JDK_IS_64BIT_VERSION 36 37 LOCAL_CLANG := true 38 # For C++11 39 LOCAL_CFLAGS += -std=c++11 40 41 LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni 42 LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src 43 LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR) 44 45 include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk 46 47 LOCAL_SRC_FILES := \ 48 $(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \ 49 $(addprefix $(LATINIME_NATIVE_SRC_DIR)/, $(LATIN_IME_CORE_SRC_FILES)) 50 51 LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME) 52 53 include $(BUILD_HOST_SHARED_LIBRARY) 54 55 endif # Darwin - TODO: Remove this 56 57 # Clear our private variables 58 include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk 59 LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../.. 60 LATINIME_HOST_OSNAME := 61