blob: aca6d4239185dbb6cd6bf327f719095abb0a8ed1 [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
Shih-wei Liaoffa58bb2010-10-10 14:15:13 -0700134# Executable llvm-rs-cc for host
Shih-wei Liao835a7b72010-08-06 02:29:11 -0700135# ========================================================
136include $(CLEAR_VARS)
137include $(CLEAR_TBLGEN_VARS)
138
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700139LOCAL_IS_HOST_MODULE := true
140LOCAL_MODULE := llvm-rs-cc
141LOCAL_MODULE_TAGS := optional
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700142
Shih-wei Liaobdd78882010-06-06 05:55:36 -0700143LOCAL_MODULE_CLASS := EXECUTABLES
144
Shih-wei Liaocecd11d2010-09-21 08:07:58 -0700145LOCAL_CFLAGS += -Wno-sign-promo
146
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700147TBLGEN_TABLES := \
Shih-wei Liaof52a6202010-09-10 17:40:53 -0700148 AttrList.inc \
149 Attrs.inc \
150 DeclNodes.inc \
151 DiagnosticCommonKinds.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700152 DiagnosticDriverKinds.inc \
Zonr Changcf6af6a2010-10-12 12:38:51 +0800153 DiagnosticFrontendKinds.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700154 DiagnosticSemaKinds.inc \
Zonr Chang92b344a2010-10-05 20:39:03 +0800155 StmtNodes.inc \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700156 RSCCOptions.inc
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700157
158LOCAL_SRC_FILES := \
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700159 llvm-rs-cc.cpp \
Zonr Chang3a9ca1f2010-10-06 17:52:56 +0800160 slang_rs.cpp \
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700161 slang_rs_context.cpp \
162 slang_rs_pragma_handler.cpp \
163 slang_rs_backend.cpp \
Zonr Chang641558f2010-10-12 21:07:06 +0800164 slang_rs_exportable.cpp \
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700165 slang_rs_export_type.cpp \
166 slang_rs_export_element.cpp \
167 slang_rs_export_var.cpp \
168 slang_rs_export_func.cpp \
Ying Wang3f8b44d2010-09-04 01:17:01 -0700169 slang_rs_reflection.cpp \
170 slang_rs_reflect_utils.cpp
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700171
Zonr Chang08df36e2010-10-07 18:50:42 +0800172LOCAL_SHARED_LIBRARIES := \
173 libslang
174
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700175LOCAL_STATIC_LIBRARIES := \
Zonr Chang8785d052010-10-13 22:42:43 +0800176 libclangDriver
Shih-wei Liao462aefd2010-06-04 15:32:04 -0700177
Shih-wei Liaob81c6a42010-10-10 14:15:00 -0700178# For build RSCCOptions.inc from RSCCOptions.td
179intermediates := $(call local-intermediates-dir)
180LOCAL_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 Liao462aefd2010-06-04 15:32:04 -0700185include $(CLANG_HOST_BUILD_MK)
186include $(CLANG_TBLGEN_RULES_MK)
187include $(BUILD_HOST_EXECUTABLE)