aboutsummaryrefslogtreecommitdiffstats
path: root/tools/dicttool/NativeLib.mk
diff options
context:
space:
mode:
Diffstat (limited to 'tools/dicttool/NativeLib.mk')
-rw-r--r--tools/dicttool/NativeLib.mk26
1 files changed, 18 insertions, 8 deletions
diff --git a/tools/dicttool/NativeLib.mk b/tools/dicttool/NativeLib.mk
index 812e76ced..028025d91 100644
--- a/tools/dicttool/NativeLib.mk
+++ b/tools/dicttool/NativeLib.mk
@@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+# HACK: Temporarily disable host tool build on Mac until the build system is ready for C++11.
+LATINIME_HOST_OSNAME := $(shell uname -s)
+ifneq ($(LATINIME_HOST_OSNAME), Darwin) # TODO: Remove this
+
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
@@ -20,23 +24,25 @@ include $(CLEAR_VARS)
LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
+ifeq ($(FLAG_DBG), true)
+ $(warning Making debug version of native library)
+ LOCAL_CFLAGS += -DFLAG_DBG -funwind-tables -fno-inline
+endif #FLAG_DBG
+
+LOCAL_CFLAGS += -DHOST_TOOL -fPIC -Wno-deprecated -Wno-unused-parameter -Wno-unused-function
ifneq ($(strip $(HOST_JDK_IS_64BIT_VERSION)),)
LOCAL_MULTILIB := 64
endif #HOST_JDK_IS_64BIT_VERSION
-LOCAL_CFLAGS += -DHOST_TOOL -fPIC
-LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
+LOCAL_CLANG := true
+# For C++11
+LOCAL_CFLAGS += -std=c++11
LATINIME_NATIVE_JNI_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni
LATINIME_NATIVE_SRC_DIR := $(LATINIME_DIR_RELATIVE_TO_DICTTOOL)/native/jni/src
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(LATINIME_NATIVE_SRC_DIR)
-# Used in jni_common.cpp to avoid registering useless methods.
-LATIN_IME_JNI_SRC_FILES := \
- com_android_inputmethod_latin_makedict_Ver3DictDecoder.cpp \
- jni_common.cpp
-
-LATIN_IME_CORE_SRC_FILES :=
+include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/NativeFileList.mk
LOCAL_SRC_FILES := \
$(addprefix $(LATINIME_NATIVE_JNI_DIR)/, $(LATIN_IME_JNI_SRC_FILES)) \
@@ -46,5 +52,9 @@ LOCAL_MODULE := $(LATINIME_HOST_NATIVE_LIBNAME)
include $(BUILD_HOST_SHARED_LIBRARY)
+endif # Darwin - TODO: Remove this
+
# Clear our private variables
+include $(LOCAL_PATH)/$(LATINIME_NATIVE_JNI_DIR)/CleanupNativeFileList.mk
LATINIME_DIR_RELATIVE_TO_DICTTOOL := ../..
+LATINIME_HOST_OSNAME :=