blob: 8cc416129f412a17f42c1d9345f6c5056a9e9879 [file] [log] [blame]
Zonr Change86245a2010-10-12 21:42:13 +08001#
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 Liao462aefd2010-06-04 15:32:04 -070016LOCAL_PATH := $(call my-dir)
Shih-wei Liao462aefd2010-06-04 15:32:04 -070017
Zonr Chang08df36e2010-10-07 18:50:42 +080018# Shared library libslang for host
19# ========================================================
20include $(CLEAR_VARS)
21include $(CLEAR_TBLGEN_VARS)
Shih-wei Liao462aefd2010-06-04 15:32:04 -070022
Zonr Chang08df36e2010-10-07 18:50:42 +080023LLVM_ROOT_PATH := external/llvm
Ying Wang12f4d682010-09-08 09:54:32 -070024CLANG_ROOT_PATH := external/clang
Zonr Chang08df36e2010-10-07 18:50:42 +080025
Ying Wang12f4d682010-09-08 09:54:32 -070026include $(CLANG_ROOT_PATH)/clang.mk
27
Zonr Chang08df36e2010-10-07 18:50:42 +080028LOCAL_MODULE := libslang
29LOCAL_MODULE_TAGS := optional
30
31LOCAL_MODULE_CLASS := SHARED_LIBRARIES
32
33LOCAL_CFLAGS += -Wno-sign-promo
34
35TBLGEN_TABLES := \
36 AttrList.inc \
37 Attrs.inc \
38 DeclNodes.inc \
39 DiagnosticCommonKinds.inc \
40 DiagnosticFrontendKinds.inc \
41 DiagnosticSemaKinds.inc \
42 StmtNodes.inc
43
44LOCAL_SRC_FILES := \
45 slang.cpp \
46 slang_utils.cpp \
47 slang_backend.cpp \
48 slang_pragma_recorder.cpp \
49 slang_diagnostic_buffer.cpp
50
51LOCAL_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
86LOCAL_LDLIBS := -ldl -lpthread
87
88include $(CLANG_HOST_BUILD_MK)
89include $(CLANG_TBLGEN_RULES_MK)
90include $(LLVM_GEN_INTRINSICS_MK)
91include $(BUILD_HOST_SHARED_LIBRARY)
92
Zonr Changa02010c2010-10-11 20:54:28 +080093# Host static library containing rslib.bc
94# ========================================================
95include $(CLEAR_VARS)
96
97input_data_file := frameworks/compile/slang/rslib.bc
98slangdata_output_var_name := rslib_bc
99
100LOCAL_IS_HOST_MODULE := true
101LOCAL_MODULE := librslib
102LOCAL_MODULE_TAGS := optional
103
104include $(LOCAL_PATH)/SlangData.mk
105include $(BUILD_HOST_STATIC_LIBRARY)
106
Zonr Chang3c250c52010-10-07 12:19:23 +0800107# Executable llvm-rs-link for host
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700108# ========================================================
109include $(CLEAR_VARS)
110include $(CLEAR_TBLGEN_VARS)
111
Zonr Chang08df36e2010-10-07 18:50:42 +0800112include $(LLVM_ROOT_PATH)/llvm.mk
113
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700114LOCAL_MODULE := llvm-rs-link
Zonr Changa02010c2010-10-11 20:54:28 +0800115LOCAL_MODULE_TAGS := optional
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700116
117LOCAL_MODULE_CLASS := EXECUTABLES
118
119LOCAL_SRC_FILES := \
Zonr Chang92b344a2010-10-05 20:39:03 +0800120 llvm-rs-link.cpp
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700121
Zonr Chang08df36e2010-10-07 18:50:42 +0800122LOCAL_SHARED_LIBRARIES := \
123 libslang
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700124
Zonr Changa02010c2010-10-11 20:54:28 +0800125LOCAL_STATIC_LIBRARIES := \
126 librslib
127
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700128LOCAL_LDLIBS := -ldl -lpthread
129
130include $(LLVM_HOST_BUILD_MK)
131include $(LLVM_GEN_INTRINSICS_MK)
132include $(BUILD_HOST_EXECUTABLE)
133
Zonr Chang3c250c52010-10-07 12:19:23 +0800134# Host static library containing rs_types.rsh
135# ========================================================
136include $(CLEAR_VARS)
137
138input_data_file := frameworks/base/libs/rs/scriptc/rs_types.rsh
139slangdata_output_var_name := rs_types_header
140
141LOCAL_IS_HOST_MODULE := true
142LOCAL_MODULE := librsheader-types
143LOCAL_MODULE_TAGS := optional
144
145include $(LOCAL_PATH)/SlangData.mk
146include $(BUILD_HOST_STATIC_LIBRARY)
147
148# Host static library containing rs_cl.rsh
149# ========================================================
150include $(CLEAR_VARS)
151
152input_data_file := frameworks/base/libs/rs/scriptc/rs_cl.rsh
153slangdata_output_var_name := rs_cl_header
154
155LOCAL_IS_HOST_MODULE := true
156LOCAL_MODULE := librsheader-cl
157LOCAL_MODULE_TAGS := optional
158
159include $(LOCAL_PATH)/SlangData.mk
160include $(BUILD_HOST_STATIC_LIBRARY)
161
162# Host static library containing rs_cores.rsh
163# ========================================================
164include $(CLEAR_VARS)
165
166input_data_file := frameworks/base/libs/rs/scriptc/rs_core.rsh
167slangdata_output_var_name := rs_core_header
168
169LOCAL_IS_HOST_MODULE := true
170LOCAL_MODULE := librsheader-core
171LOCAL_MODULE_TAGS := optional
172
173include $(LOCAL_PATH)/SlangData.mk
174include $(BUILD_HOST_STATIC_LIBRARY)
175
176# Host static library containing rs_math.rsh
177# ========================================================
178include $(CLEAR_VARS)
179
180input_data_file := frameworks/base/libs/rs/scriptc/rs_math.rsh
181slangdata_output_var_name := rs_math_header
182
183LOCAL_IS_HOST_MODULE := true
184LOCAL_MODULE := librsheader-math
185LOCAL_MODULE_TAGS := optional
186
187include $(LOCAL_PATH)/SlangData.mk
188include $(BUILD_HOST_STATIC_LIBRARY)
189
Shih-wei Liaoffa58bb2010-10-10 14:15:13 -0700190# Executable llvm-rs-cc for host
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700191# ========================================================
192include $(CLEAR_VARS)
193include $(CLEAR_TBLGEN_VARS)
194
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700195LOCAL_IS_HOST_MODULE := true
196LOCAL_MODULE := llvm-rs-cc
197LOCAL_MODULE_TAGS := optional
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700198
Shih-wei Liaobdd78882010-06-06 05:55:36 -0700199LOCAL_MODULE_CLASS := EXECUTABLES
200
Shih-wei Liaocecd11d2010-09-21 08:07:58 -0700201LOCAL_CFLAGS += -Wno-sign-promo
202
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700203TBLGEN_TABLES := \
Shih-wei Liaof52a6202010-09-10 17:40:53 -0700204 AttrList.inc \
205 Attrs.inc \
206 DeclNodes.inc \
207 DiagnosticCommonKinds.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700208 DiagnosticDriverKinds.inc \
Zonr Changcf6af6a2010-10-12 12:38:51 +0800209 DiagnosticFrontendKinds.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700210 DiagnosticSemaKinds.inc \
Zonr Chang92b344a2010-10-05 20:39:03 +0800211 StmtNodes.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700212 RSCCOptions.inc
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700213
214LOCAL_SRC_FILES := \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700215 llvm-rs-cc.cpp \
Zonr Chang3a9ca1f2010-10-06 17:52:56 +0800216 slang_rs.cpp \
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700217 slang_rs_context.cpp \
218 slang_rs_pragma_handler.cpp \
219 slang_rs_backend.cpp \
Zonr Chang641558f2010-10-12 21:07:06 +0800220 slang_rs_exportable.cpp \
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700221 slang_rs_export_type.cpp \
222 slang_rs_export_element.cpp \
223 slang_rs_export_var.cpp \
224 slang_rs_export_func.cpp \
Ying Wang3f8b44d2010-09-04 01:17:01 -0700225 slang_rs_reflection.cpp \
226 slang_rs_reflect_utils.cpp
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700227
Zonr Chang08df36e2010-10-07 18:50:42 +0800228LOCAL_SHARED_LIBRARIES := \
229 libslang
230
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700231LOCAL_STATIC_LIBRARIES := \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700232 libclangDriver \
Zonr Chang3c250c52010-10-07 12:19:23 +0800233 librsheader-types \
234 librsheader-cl \
235 librsheader-core \
Zonr Changb2573012010-10-07 19:35:21 +0800236 librsheader-math
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700237
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700238# For build RSCCOptions.inc from RSCCOptions.td
239intermediates := $(call local-intermediates-dir)
240LOCAL_GENERATED_SOURCES += $(intermediates)/RSCCOptions.inc
241$(intermediates)/RSCCOptions.inc: $(LOCAL_PATH)/RSCCOptions.td $(CLANG_ROOT_PATH)/include/clang/Driver/OptParser.td $(TBLGEN)
242 @echo "Building RenderScript compiler (llvm-rs-cc) Option tables with tblgen"
243 $(call transform-host-td-to-out,opt-parser-defs)
244
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700245include $(CLANG_HOST_BUILD_MK)
246include $(CLANG_TBLGEN_RULES_MK)
247include $(BUILD_HOST_EXECUTABLE)