1LOCAL_PATH := $(call my-dir)
2
3LLVM_ROOT_PATH := $(LOCAL_PATH)/../..
4
5
6#===---------------------------------------------------------------===
7# bugpoint command line tool
8#===---------------------------------------------------------------===
9
10bugpoint_SRC_FILES := \
11  BugDriver.cpp       \
12  CrashDebugger.cpp   \
13  ExecutionDriver.cpp \
14  ExtractFunction.cpp \
15  FindBugs.cpp        \
16  Miscompilation.cpp  \
17  OptimizerDriver.cpp \
18  ToolRunner.cpp      \
19  bugpoint.cpp        \
20
21bugpoint_STATIC_LIBRARIES := \
22  libLLVMBitWriter \
23  libLLVMCodeGen \
24  libLLVMipo \
25  libLLVMipa \
26  libLLVMIRReader \
27  libLLVMBitReader \
28  libLLVMAsmParser \
29  libLLVMInstCombine \
30  libLLVMInstrumentation \
31  libLLVMLinker \
32  libLLVMTransformObjCARC \
33  libLLVMScalarOpts \
34  libLLVMAnalysis \
35  libLLVMTarget \
36  libLLVMCore \
37  libLLVMMC \
38  libLLVMProfileData \
39  libLLVMTransformUtils \
40  libLLVMVectorize \
41  libLLVMSupport \
42
43include $(CLEAR_VARS)
44
45LOCAL_MODULE := bugpoint
46LOCAL_MODULE_TAGS := optional
47LOCAL_MODULE_CLASS := EXECUTABLES
48LOCAL_IS_HOST_MODULE := true
49
50LOCAL_SRC_FILES := $(bugpoint_SRC_FILES)
51
52LOCAL_STATIC_LIBRARIES := $(bugpoint_STATIC_LIBRARIES)
53
54LOCAL_LDLIBS += -lpthread -lm -ldl
55ifeq ($(HOST_OS),darwin)
56LOCAL_LDFLAGS += -Wl,-export_dynamic
57else
58LOCAL_LDFLAGS += -Wl,--export-dynamic
59endif
60
61include $(LLVM_ROOT_PATH)/llvm.mk
62include $(LLVM_HOST_BUILD_MK)
63include $(LLVM_GEN_INTRINSICS_MK)
64include $(BUILD_HOST_EXECUTABLE)
65