aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Target/X86/InstPrinter/Android.mk45
1 files changed, 36 insertions, 9 deletions
diff --git a/lib/Target/X86/InstPrinter/Android.mk b/lib/Target/X86/InstPrinter/Android.mk
index 7eeb452..ccc219f 100644
--- a/lib/Target/X86/InstPrinter/Android.mk
+++ b/lib/Target/X86/InstPrinter/Android.mk
@@ -1,30 +1,57 @@
LOCAL_PATH := $(call my-dir)
-# For the host only
-# =====================================================
-include $(CLEAR_VARS)
-include $(CLEAR_TBLGEN_VARS)
-
-TBLGEN_TABLES := \
+x86_instprinter_TBLGEN_TABLES := \
X86GenAsmWriter.inc \
X86GenAsmWriter1.inc \
X86GenInstrNames.inc \
X86GenRegisterNames.inc \
X86GenRegisterInfo.h.inc
-TBLGEN_TD_DIR := $(LOCAL_PATH)/..
-
-LOCAL_SRC_FILES := \
+x86_instprinter_SRC_FILES := \
X86ATTInstPrinter.cpp \
X86IntelInstPrinter.cpp \
X86InstComments.cpp
+# For the device
+# =====================================================
+ifeq ($(TARGET_ARCH),x86)
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(x86_instprinter_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(x86_instprinter_SRC_FILES)
+
LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
LOCAL_MODULE:= libLLVMX86InstPrinter
LOCAL_MODULE_TAGS := optional
+include $(LLVM_DEVICE_BUILD_MK)
+include $(LLVM_TBLGEN_RULES_MK)
+include $(BUILD_STATIC_LIBRARY)
+endif
+
+# For the host
+# =====================================================
+include $(CLEAR_VARS)
+include $(CLEAR_TBLGEN_VARS)
+
+TBLGEN_TABLES := $(x86_instprinter_TBLGEN_TABLES)
+
+TBLGEN_TD_DIR := $(LOCAL_PATH)/..
+
+LOCAL_SRC_FILES := $(x86_instprinter_SRC_FILES)
+
+LOCAL_C_INCLUDES += $(LOCAL_PATH)/..
+
+LOCAL_MODULE := libLLVMX86InstPrinter
+
+LOCAL_MODULE_TAGS := optional
+
include $(LLVM_HOST_BUILD_MK)
include $(LLVM_TBLGEN_RULES_MK)
include $(BUILD_HOST_STATIC_LIBRARY)