1LOCAL_PATH := $(call my-dir)
2
3#===---------------------------------------------------------------===
4# libARMAsmParser (common)
5#===---------------------------------------------------------------===
6
7arm_asm_parser_SRC_FILES := \
8  ARMAsmParser.cpp
9
10arm_asm_parser_TBLGEN_TABLES := \
11  ARMGenInstrInfo.inc \
12  ARMGenRegisterInfo.inc \
13  ARMGenAsmMatcher.inc \
14  ARMGenSubtargetInfo.inc
15
16arm_asm_parser_TBLGEN_TD_DIR := $(LOCAL_PATH)/..
17
18arm_asm_parser_C_INCLUDES := $(LOCAL_PATH)/..
19
20
21#===---------------------------------------------------------------===
22# libARMAsmParser (host)
23#===---------------------------------------------------------------===
24include $(CLEAR_VARS)
25include $(CLEAR_TBLGEN_VARS)
26
27LOCAL_MODULE:= libLLVMARMAsmParser
28LOCAL_MODULE_HOST_OS := darwin linux windows
29LOCAL_SRC_FILES := $(arm_asm_parser_SRC_FILES)
30LOCAL_C_INCLUDES += $(arm_asm_parser_C_INCLUDES)
31TBLGEN_TABLES := $(arm_asm_parser_TBLGEN_TABLES)
32TBLGEN_TD_DIR := $(arm_asm_parser_TBLGEN_TD_DIR)
33
34include $(LLVM_HOST_BUILD_MK)
35include $(LLVM_TBLGEN_RULES_MK)
36# Override the default optimization level to work around taking forever (~50m)
37# to compile ARMAsmParser.cpp on Mac with gcc 4.2,
38# or on Linux with mingw32msvc-gcc 4.2, which is used to cross-compile
39# the win_sdk.
40LOCAL_CFLAGS_darwin += -O0
41LOCAL_CFLAGS_windows += -O0
42include $(BUILD_HOST_STATIC_LIBRARY)
43
44
45#===---------------------------------------------------------------===
46# libARMAsmParser (target)
47#===---------------------------------------------------------------===
48ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
49include $(CLEAR_VARS)
50include $(CLEAR_TBLGEN_VARS)
51
52LOCAL_MODULE:= libLLVMARMAsmParser
53LOCAL_SRC_FILES := $(arm_asm_parser_SRC_FILES)
54LOCAL_C_INCLUDES += $(arm_asm_parser_C_INCLUDES)
55TBLGEN_TABLES := $(arm_asm_parser_TBLGEN_TABLES)
56TBLGEN_TD_DIR := $(arm_asm_parser_TBLGEN_TD_DIR)
57
58include $(LLVM_DEVICE_BUILD_MK)
59include $(LLVM_TBLGEN_RULES_MK)
60include $(BUILD_STATIC_LIBRARY)
61endif
62