1 LOCAL_PATH := $(call my-dir) 2 3 LLVM_ROOT_PATH := $(LOCAL_PATH)/../.. 4 5 6 #===---------------------------------------------------------------=== 7 # opt command line tool (common) 8 #===---------------------------------------------------------------=== 9 10 llvm_opt_SRC_FILES := \ 11 AnalysisWrappers.cpp \ 12 GraphPrinters.cpp \ 13 PrintSCC.cpp \ 14 opt.cpp 15 16 llvm_opt_STATIC_LIBRARIES := \ 17 libLLVMScalarOpts \ 18 libLLVMInstCombine \ 19 libLLVMInstrumentation \ 20 libLLVMMCParser \ 21 libLLVMMC \ 22 libLLVMAsmParser \ 23 libLLVMBitWriter \ 24 libLLVMBitReader \ 25 libLLVMipa \ 26 libLLVMipo \ 27 libLLVMTransformUtils \ 28 libLLVMVectorize \ 29 libLLVMAnalysis \ 30 libLLVMTarget \ 31 libLLVMCore \ 32 libLLVMSupport 33 34 35 #===---------------------------------------------------------------=== 36 # opt command line tool (host) 37 #===---------------------------------------------------------------=== 38 39 include $(CLEAR_VARS) 40 41 LOCAL_MODULE := opt 42 LOCAL_MODULE_TAGS := optional 43 LOCAL_MODULE_CLASS := EXECUTABLES 44 LOCAL_IS_HOST_MODULE := true 45 46 LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) 47 LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) 48 LOCAL_LDLIBS += -lpthread -lm -ldl 49 LOCAL_C_INCLUDES += external/llvm/include 50 51 include $(LLVM_ROOT_PATH)/llvm.mk 52 include $(LLVM_HOST_BUILD_MK) 53 include $(LLVM_GEN_INTRINSICS_MK) 54 include $(BUILD_HOST_EXECUTABLE) 55 56 57 #===---------------------------------------------------------------=== 58 # opt command line tool (target) 59 #===---------------------------------------------------------------=== 60 61 include $(CLEAR_VARS) 62 63 LOCAL_MODULE := opt 64 LOCAL_MODULE_TAGS := optional 65 LOCAL_MODULE_CLASS := EXECUTABLES 66 67 LOCAL_SRC_FILES := $(llvm_opt_SRC_FILES) 68 LOCAL_C_INCLUDES += external/llvm/include 69 LOCAL_STATIC_LIBRARIES := $(llvm_opt_STATIC_LIBRARIES) 70 LOCAL_SHARED_LIBRARIES := \ 71 libcutils \ 72 libdl \ 73 libstlport 74 75 76 include $(LLVM_ROOT_PATH)/llvm.mk 77 include $(LLVM_DEVICE_BUILD_MK) 78 include $(LLVM_GEN_INTRINSICS_MK) 79 include $(BUILD_EXECUTABLE) 80