Android.mk revision cf6af6abc1de499920571308b14a27e19cf57097
1LOCAL_PATH := $(call my-dir) 2 3# Shared library libslang for host 4# ======================================================== 5include $(CLEAR_VARS) 6include $(CLEAR_TBLGEN_VARS) 7 8LLVM_ROOT_PATH := external/llvm 9CLANG_ROOT_PATH := external/clang 10 11include $(CLANG_ROOT_PATH)/clang.mk 12 13LOCAL_MODULE := libslang 14LOCAL_MODULE_TAGS := optional 15 16LOCAL_MODULE_CLASS := SHARED_LIBRARIES 17 18LOCAL_CFLAGS += -Wno-sign-promo 19 20TBLGEN_TABLES := \ 21 AttrList.inc \ 22 Attrs.inc \ 23 DeclNodes.inc \ 24 DiagnosticCommonKinds.inc \ 25 DiagnosticFrontendKinds.inc \ 26 DiagnosticSemaKinds.inc \ 27 StmtNodes.inc 28 29LOCAL_SRC_FILES := \ 30 slang.cpp \ 31 slang_utils.cpp \ 32 slang_backend.cpp \ 33 slang_pragma_recorder.cpp \ 34 slang_diagnostic_buffer.cpp 35 36LOCAL_STATIC_LIBRARIES := \ 37 libLLVMLinker \ 38 libLLVMipo \ 39 libLLVMBitWriter \ 40 libLLVMBitReader \ 41 libLLVMARMAsmPrinter \ 42 libLLVMX86AsmPrinter \ 43 libLLVMAsmPrinter \ 44 libLLVMMCParser \ 45 libLLVMARMCodeGen \ 46 libLLVMARMInfo \ 47 libLLVMX86CodeGen \ 48 libLLVMX86Info \ 49 libLLVMSelectionDAG \ 50 libLLVMCodeGen \ 51 libLLVMScalarOpts \ 52 libLLVMInstCombine \ 53 libLLVMTransformUtils \ 54 libLLVMInstrumentation \ 55 libLLVMipa \ 56 libLLVMAnalysis \ 57 libLLVMTarget \ 58 libLLVMMC \ 59 libLLVMCore \ 60 libclangParse \ 61 libclangSema \ 62 libclangAnalysis \ 63 libclangAST \ 64 libclangLex \ 65 libclangFrontend \ 66 libclangCodeGen \ 67 libclangBasic \ 68 libLLVMSupport \ 69 libLLVMSystem 70 71LOCAL_LDLIBS := -ldl -lpthread 72 73include $(CLANG_HOST_BUILD_MK) 74include $(CLANG_TBLGEN_RULES_MK) 75include $(LLVM_GEN_INTRINSICS_MK) 76include $(BUILD_HOST_SHARED_LIBRARY) 77 78# Host static library containing rslib.bc 79# ======================================================== 80include $(CLEAR_VARS) 81 82input_data_file := frameworks/compile/slang/rslib.bc 83slangdata_output_var_name := rslib_bc 84 85LOCAL_IS_HOST_MODULE := true 86LOCAL_MODULE := librslib 87LOCAL_MODULE_TAGS := optional 88 89include $(LOCAL_PATH)/SlangData.mk 90include $(BUILD_HOST_STATIC_LIBRARY) 91 92# Executable llvm-rs-link for host 93# ======================================================== 94include $(CLEAR_VARS) 95include $(CLEAR_TBLGEN_VARS) 96 97include $(LLVM_ROOT_PATH)/llvm.mk 98 99LOCAL_MODULE := llvm-rs-link 100LOCAL_MODULE_TAGS := optional 101 102LOCAL_MODULE_CLASS := EXECUTABLES 103 104LOCAL_SRC_FILES := \ 105 llvm-rs-link.cpp 106 107LOCAL_SHARED_LIBRARIES := \ 108 libslang 109 110LOCAL_STATIC_LIBRARIES := \ 111 librslib 112 113LOCAL_LDLIBS := -ldl -lpthread 114 115include $(LLVM_HOST_BUILD_MK) 116include $(LLVM_GEN_INTRINSICS_MK) 117include $(BUILD_HOST_EXECUTABLE) 118 119# Host static library containing rs_types.rsh 120# ======================================================== 121include $(CLEAR_VARS) 122 123input_data_file := frameworks/base/libs/rs/scriptc/rs_types.rsh 124slangdata_output_var_name := rs_types_header 125 126LOCAL_IS_HOST_MODULE := true 127LOCAL_MODULE := librsheader-types 128LOCAL_MODULE_TAGS := optional 129 130include $(LOCAL_PATH)/SlangData.mk 131include $(BUILD_HOST_STATIC_LIBRARY) 132 133# Host static library containing rs_cl.rsh 134# ======================================================== 135include $(CLEAR_VARS) 136 137input_data_file := frameworks/base/libs/rs/scriptc/rs_cl.rsh 138slangdata_output_var_name := rs_cl_header 139 140LOCAL_IS_HOST_MODULE := true 141LOCAL_MODULE := librsheader-cl 142LOCAL_MODULE_TAGS := optional 143 144include $(LOCAL_PATH)/SlangData.mk 145include $(BUILD_HOST_STATIC_LIBRARY) 146 147# Host static library containing rs_cores.rsh 148# ======================================================== 149include $(CLEAR_VARS) 150 151input_data_file := frameworks/base/libs/rs/scriptc/rs_core.rsh 152slangdata_output_var_name := rs_core_header 153 154LOCAL_IS_HOST_MODULE := true 155LOCAL_MODULE := librsheader-core 156LOCAL_MODULE_TAGS := optional 157 158include $(LOCAL_PATH)/SlangData.mk 159include $(BUILD_HOST_STATIC_LIBRARY) 160 161# Host static library containing rs_math.rsh 162# ======================================================== 163include $(CLEAR_VARS) 164 165input_data_file := frameworks/base/libs/rs/scriptc/rs_math.rsh 166slangdata_output_var_name := rs_math_header 167 168LOCAL_IS_HOST_MODULE := true 169LOCAL_MODULE := librsheader-math 170LOCAL_MODULE_TAGS := optional 171 172include $(LOCAL_PATH)/SlangData.mk 173include $(BUILD_HOST_STATIC_LIBRARY) 174 175# Executable llvm-rs-cc for host 176# ======================================================== 177include $(CLEAR_VARS) 178include $(CLEAR_TBLGEN_VARS) 179 180LOCAL_IS_HOST_MODULE := true 181LOCAL_MODULE := llvm-rs-cc 182LOCAL_MODULE_TAGS := optional 183 184LOCAL_MODULE_CLASS := EXECUTABLES 185 186LOCAL_CFLAGS += -Wno-sign-promo 187 188TBLGEN_TABLES := \ 189 AttrList.inc \ 190 Attrs.inc \ 191 DeclNodes.inc \ 192 DiagnosticCommonKinds.inc \ 193 DiagnosticDriverKinds.inc \ 194 DiagnosticFrontendKinds.inc \ 195 DiagnosticSemaKinds.inc \ 196 StmtNodes.inc \ 197 RSCCOptions.inc 198 199LOCAL_SRC_FILES := \ 200 llvm-rs-cc.cpp \ 201 slang_rs.cpp \ 202 slang_rs_context.cpp \ 203 slang_rs_pragma_handler.cpp \ 204 slang_rs_backend.cpp \ 205 slang_rs_export_type.cpp \ 206 slang_rs_export_element.cpp \ 207 slang_rs_export_var.cpp \ 208 slang_rs_export_func.cpp \ 209 slang_rs_reflection.cpp \ 210 slang_rs_reflect_utils.cpp 211 212LOCAL_SHARED_LIBRARIES := \ 213 libslang 214 215LOCAL_STATIC_LIBRARIES := \ 216 libclangDriver \ 217 librsheader-types \ 218 librsheader-cl \ 219 librsheader-core \ 220 librsheader-math 221 222# For build RSCCOptions.inc from RSCCOptions.td 223intermediates := $(call local-intermediates-dir) 224LOCAL_GENERATED_SOURCES += $(intermediates)/RSCCOptions.inc 225$(intermediates)/RSCCOptions.inc: $(LOCAL_PATH)/RSCCOptions.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN) 226 @echo "Building RenderScript compiler (llvm-rs-cc) Option tables with tblgen" 227 $(call transform-host-td-to-out,opt-parser-defs) 228 229include $(CLANG_HOST_BUILD_MK) 230include $(CLANG_TBLGEN_RULES_MK) 231include $(BUILD_HOST_EXECUTABLE) 232