• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2010-2012 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#
16
17LOCAL_PATH := $(call my-dir)
18LIBBCC_ROOT_PATH := $(LOCAL_PATH)
19include $(LIBBCC_ROOT_PATH)/libbcc.mk
20
21include frameworks/compile/slang/rs_version.mk
22
23#=====================================================================
24# Whole Static Library to Be Linked In
25#=====================================================================
26
27libbcc_WHOLE_STATIC_LIBRARIES += \
28  libbccRenderscript \
29  libbccExecutionEngine \
30  libbccCore \
31  libbccSupport
32
33#=====================================================================
34# Device Shared Library libbcc
35#=====================================================================
36ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
37ifeq ($(TARGET_ARCH),mips64)
38$(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build)
39endif
40
41include $(CLEAR_VARS)
42
43LOCAL_MODULE := libbcc
44LOCAL_MODULE_TAGS := optional
45LOCAL_MODULE_CLASS := SHARED_LIBRARIES
46
47LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
48
49LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
50
51LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
52
53# Modules that need get installed if and only if the target libbcc.so is
54# installed.
55LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
56
57LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
58LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
59
60ifeq ($(ARCH_ARM_HAVE_NEON),true)
61  LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
62endif
63
64include $(LIBBCC_DEVICE_BUILD_MK)
65include $(LLVM_DEVICE_BUILD_MK)
66include $(BUILD_SHARED_LIBRARY)
67endif
68
69#=====================================================================
70# Host Shared Library libbcc
71#=====================================================================
72
73# Don't build for unbundled branches
74ifeq (,$(TARGET_BUILD_APPS))
75
76include $(CLEAR_VARS)
77
78LOCAL_MODULE := libbcc
79LOCAL_MODULE_TAGS := optional
80LOCAL_MODULE_CLASS := SHARED_LIBRARIES
81LOCAL_IS_HOST_MODULE := true
82
83ifneq ($(HOST_OS),windows)
84LOCAL_CLANG := true
85endif
86
87LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES)
88
89LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
90
91LOCAL_STATIC_LIBRARIES += \
92  libutils \
93  libcutils \
94  liblog
95
96LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM
97
98ifndef USE_MINGW
99LOCAL_LDLIBS := -ldl -lpthread
100endif
101
102include $(LIBBCC_HOST_BUILD_MK)
103include $(LLVM_HOST_BUILD_MK)
104include $(BUILD_HOST_SHARED_LIBRARY)
105
106endif # Don't build in unbundled branches
107
108#=====================================================================
109# Include Subdirectories
110#=====================================================================
111include $(call all-makefiles-under,$(LOCAL_PATH))
112