Zonr Chang | e86245a | 2010-10-12 21:42:13 +0800 | [diff] [blame] | 1 | # |
| 2 | # Copyright (C) 2010 The Android Open Source Project |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 16 | LOCAL_PATH := $(call my-dir) |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 17 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 18 | # Shared library libslang for host |
| 19 | # ======================================================== |
| 20 | include $(CLEAR_VARS) |
| 21 | include $(CLEAR_TBLGEN_VARS) |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 22 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 23 | LLVM_ROOT_PATH := external/llvm |
Ying Wang | 12f4d68 | 2010-09-08 09:54:32 -0700 | [diff] [blame] | 24 | CLANG_ROOT_PATH := external/clang |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 25 | |
Ying Wang | 12f4d68 | 2010-09-08 09:54:32 -0700 | [diff] [blame] | 26 | include $(CLANG_ROOT_PATH)/clang.mk |
| 27 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 28 | LOCAL_MODULE := libslang |
| 29 | LOCAL_MODULE_TAGS := optional |
| 30 | |
| 31 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 32 | |
| 33 | LOCAL_CFLAGS += -Wno-sign-promo |
| 34 | |
| 35 | TBLGEN_TABLES := \ |
| 36 | AttrList.inc \ |
| 37 | Attrs.inc \ |
| 38 | DeclNodes.inc \ |
| 39 | DiagnosticCommonKinds.inc \ |
| 40 | DiagnosticFrontendKinds.inc \ |
| 41 | DiagnosticSemaKinds.inc \ |
| 42 | StmtNodes.inc |
| 43 | |
| 44 | LOCAL_SRC_FILES := \ |
| 45 | slang.cpp \ |
| 46 | slang_utils.cpp \ |
| 47 | slang_backend.cpp \ |
| 48 | slang_pragma_recorder.cpp \ |
| 49 | slang_diagnostic_buffer.cpp |
| 50 | |
| 51 | LOCAL_STATIC_LIBRARIES := \ |
| 52 | libLLVMLinker \ |
| 53 | libLLVMipo \ |
| 54 | libLLVMBitWriter \ |
| 55 | libLLVMBitReader \ |
| 56 | libLLVMARMAsmPrinter \ |
| 57 | libLLVMX86AsmPrinter \ |
| 58 | libLLVMAsmPrinter \ |
| 59 | libLLVMMCParser \ |
| 60 | libLLVMARMCodeGen \ |
| 61 | libLLVMARMInfo \ |
| 62 | libLLVMX86CodeGen \ |
| 63 | libLLVMX86Info \ |
| 64 | libLLVMSelectionDAG \ |
| 65 | libLLVMCodeGen \ |
| 66 | libLLVMScalarOpts \ |
| 67 | libLLVMInstCombine \ |
| 68 | libLLVMTransformUtils \ |
| 69 | libLLVMInstrumentation \ |
| 70 | libLLVMipa \ |
| 71 | libLLVMAnalysis \ |
| 72 | libLLVMTarget \ |
| 73 | libLLVMMC \ |
| 74 | libLLVMCore \ |
| 75 | libclangParse \ |
| 76 | libclangSema \ |
| 77 | libclangAnalysis \ |
| 78 | libclangAST \ |
| 79 | libclangLex \ |
| 80 | libclangFrontend \ |
| 81 | libclangCodeGen \ |
| 82 | libclangBasic \ |
| 83 | libLLVMSupport \ |
| 84 | libLLVMSystem |
| 85 | |
| 86 | LOCAL_LDLIBS := -ldl -lpthread |
| 87 | |
| 88 | include $(CLANG_HOST_BUILD_MK) |
| 89 | include $(CLANG_TBLGEN_RULES_MK) |
| 90 | include $(LLVM_GEN_INTRINSICS_MK) |
| 91 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 92 | |
Zonr Chang | a02010c | 2010-10-11 20:54:28 +0800 | [diff] [blame] | 93 | # Host static library containing rslib.bc |
| 94 | # ======================================================== |
| 95 | include $(CLEAR_VARS) |
| 96 | |
| 97 | input_data_file := frameworks/compile/slang/rslib.bc |
| 98 | slangdata_output_var_name := rslib_bc |
| 99 | |
| 100 | LOCAL_IS_HOST_MODULE := true |
| 101 | LOCAL_MODULE := librslib |
| 102 | LOCAL_MODULE_TAGS := optional |
| 103 | |
| 104 | include $(LOCAL_PATH)/SlangData.mk |
| 105 | include $(BUILD_HOST_STATIC_LIBRARY) |
| 106 | |
Zonr Chang | 3c250c5 | 2010-10-07 12:19:23 +0800 | [diff] [blame] | 107 | # Executable llvm-rs-link for host |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 108 | # ======================================================== |
| 109 | include $(CLEAR_VARS) |
| 110 | include $(CLEAR_TBLGEN_VARS) |
| 111 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 112 | include $(LLVM_ROOT_PATH)/llvm.mk |
| 113 | |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 114 | LOCAL_MODULE := llvm-rs-link |
Zonr Chang | a02010c | 2010-10-11 20:54:28 +0800 | [diff] [blame] | 115 | LOCAL_MODULE_TAGS := optional |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 116 | |
| 117 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 118 | |
| 119 | LOCAL_SRC_FILES := \ |
Zonr Chang | 92b344a | 2010-10-05 20:39:03 +0800 | [diff] [blame] | 120 | llvm-rs-link.cpp |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 121 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 122 | LOCAL_SHARED_LIBRARIES := \ |
| 123 | libslang |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 124 | |
Zonr Chang | a02010c | 2010-10-11 20:54:28 +0800 | [diff] [blame] | 125 | LOCAL_STATIC_LIBRARIES := \ |
| 126 | librslib |
| 127 | |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 128 | LOCAL_LDLIBS := -ldl -lpthread |
| 129 | |
| 130 | include $(LLVM_HOST_BUILD_MK) |
| 131 | include $(LLVM_GEN_INTRINSICS_MK) |
| 132 | include $(BUILD_HOST_EXECUTABLE) |
| 133 | |
Shih-wei Liao | ffa58bb | 2010-10-10 14:15:13 -0700 | [diff] [blame] | 134 | # Executable llvm-rs-cc for host |
Shih-wei Liao | 835a7b7 | 2010-08-06 02:29:11 -0700 | [diff] [blame] | 135 | # ======================================================== |
| 136 | include $(CLEAR_VARS) |
| 137 | include $(CLEAR_TBLGEN_VARS) |
| 138 | |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 139 | LOCAL_IS_HOST_MODULE := true |
| 140 | LOCAL_MODULE := llvm-rs-cc |
| 141 | LOCAL_MODULE_TAGS := optional |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 142 | |
Shih-wei Liao | bdd7888 | 2010-06-06 05:55:36 -0700 | [diff] [blame] | 143 | LOCAL_MODULE_CLASS := EXECUTABLES |
| 144 | |
Shih-wei Liao | cecd11d | 2010-09-21 08:07:58 -0700 | [diff] [blame] | 145 | LOCAL_CFLAGS += -Wno-sign-promo |
| 146 | |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 147 | TBLGEN_TABLES := \ |
Shih-wei Liao | f52a620 | 2010-09-10 17:40:53 -0700 | [diff] [blame] | 148 | AttrList.inc \ |
| 149 | Attrs.inc \ |
| 150 | DeclNodes.inc \ |
| 151 | DiagnosticCommonKinds.inc \ |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 152 | DiagnosticDriverKinds.inc \ |
Zonr Chang | cf6af6a | 2010-10-12 12:38:51 +0800 | [diff] [blame] | 153 | DiagnosticFrontendKinds.inc \ |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 154 | DiagnosticSemaKinds.inc \ |
Zonr Chang | 92b344a | 2010-10-05 20:39:03 +0800 | [diff] [blame] | 155 | StmtNodes.inc \ |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 156 | RSCCOptions.inc |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 157 | |
| 158 | LOCAL_SRC_FILES := \ |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 159 | llvm-rs-cc.cpp \ |
Zonr Chang | 3a9ca1f | 2010-10-06 17:52:56 +0800 | [diff] [blame] | 160 | slang_rs.cpp \ |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 161 | slang_rs_context.cpp \ |
| 162 | slang_rs_pragma_handler.cpp \ |
| 163 | slang_rs_backend.cpp \ |
Zonr Chang | 641558f | 2010-10-12 21:07:06 +0800 | [diff] [blame] | 164 | slang_rs_exportable.cpp \ |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 165 | slang_rs_export_type.cpp \ |
| 166 | slang_rs_export_element.cpp \ |
| 167 | slang_rs_export_var.cpp \ |
| 168 | slang_rs_export_func.cpp \ |
Ying Wang | 3f8b44d | 2010-09-04 01:17:01 -0700 | [diff] [blame] | 169 | slang_rs_reflection.cpp \ |
| 170 | slang_rs_reflect_utils.cpp |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 171 | |
Zonr Chang | 08df36e | 2010-10-07 18:50:42 +0800 | [diff] [blame] | 172 | LOCAL_SHARED_LIBRARIES := \ |
| 173 | libslang |
| 174 | |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 175 | LOCAL_STATIC_LIBRARIES := \ |
Zonr Chang | 8785d05 | 2010-10-13 22:42:43 +0800 | [diff] [blame] | 176 | libclangDriver |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 177 | |
Shih-wei Liao | b81c6a4 | 2010-10-10 14:15:00 -0700 | [diff] [blame] | 178 | # For build RSCCOptions.inc from RSCCOptions.td |
| 179 | intermediates := $(call local-intermediates-dir) |
| 180 | LOCAL_GENERATED_SOURCES += $(intermediates)/RSCCOptions.inc |
| 181 | $(intermediates)/RSCCOptions.inc: $(LOCAL_PATH)/RSCCOptions.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN) |
| 182 | @echo "Building RenderScript compiler (llvm-rs-cc) Option tables with tblgen" |
| 183 | $(call transform-host-td-to-out,opt-parser-defs) |
| 184 | |
Shih-wei Liao | 462aefd | 2010-06-04 15:32:04 -0700 | [diff] [blame] | 185 | include $(CLANG_HOST_BUILD_MK) |
| 186 | include $(CLANG_TBLGEN_RULES_MK) |
| 187 | include $(BUILD_HOST_EXECUTABLE) |