blob: 02f591e499c43c7645bc5d65cddb97f48b28ed98 [file] [log] [blame]
Zonr Chang932648d2010-10-13 22:23:56 +08001#
Stephen Hinesdb169182012-01-05 18:46:36 -08002# Copyright (C) 2010-2012 The Android Open Source Project
Zonr Chang932648d2010-10-13 22:23:56 +08003#
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
Shih-wei Liao77ed6142010-04-07 12:21:42 -070017LOCAL_PATH := $(call my-dir)
Zonr Changddf56612012-04-12 15:38:42 +080018LIBBCC_ROOT_PATH := $(LOCAL_PATH)
19include $(LIBBCC_ROOT_PATH)/libbcc.mk
Shih-wei Liao77ed6142010-04-07 12:21:42 -070020
Stephen Hinese1094342014-05-13 17:55:49 -070021include frameworks/compile/slang/rs_version.mk
22
Logan Chien74396852011-07-12 15:50:26 +080023#=====================================================================
24# Whole Static Library to Be Linked In
25#=====================================================================
Logan35849002011-01-15 07:30:43 +080026
Logan Chien74396852011-07-12 15:50:26 +080027libbcc_WHOLE_STATIC_LIBRARIES += \
Stephen Hinese198abe2012-07-27 18:05:41 -070028 libbccRenderscript \
Zonr Changc72c4dd2012-04-12 15:38:53 +080029 libbccCore \
30 libbccSupport
Logan Chien8d3b5e12011-07-12 16:19:21 +080031
Logan Chien74396852011-07-12 15:50:26 +080032#=====================================================================
Logan Chien74396852011-07-12 15:50:26 +080033# Device Shared Library libbcc
34#=====================================================================
Tim Murrayc6e6ee42014-04-07 14:13:26 -070035ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
Colin Cross71df0502014-02-04 16:27:32 -080036ifeq ($(TARGET_ARCH),mips64)
37$(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build)
38endif
Logan Chien74396852011-07-12 15:50:26 +080039
Shih-wei Liao77ed6142010-04-07 12:21:42 -070040include $(CLEAR_VARS)
Iliyan Malchev97bd44d2011-03-14 14:02:14 -070041
Shih-wei Liao77ed6142010-04-07 12:21:42 -070042LOCAL_MODULE := libbcc
Zonr Chang932648d2010-10-13 22:23:56 +080043LOCAL_MODULE_TAGS := optional
Joseph Wen5de1adf2011-06-21 15:41:31 -070044LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Shih-wei Liao77ed6142010-04-07 12:21:42 -070045
Logan Chien21392f02011-11-26 20:32:01 +080046LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
47
Tim Murrayc2074ca2014-04-08 15:39:08 -070048LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
Logan Chien41cb7612011-07-12 16:12:03 +080049
Logan Chien21392f02011-11-26 20:32:01 +080050# Modules that need get installed if and only if the target libbcc.so is
51# installed.
Jean-Luc Brouilletc5e607a2014-06-18 18:14:02 -070052LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
Ying Wang3ae8c2a2011-01-14 10:50:53 -080053
Colin Cross71df0502014-02-04 16:27:32 -080054LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
55LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
Michael Liaocdcce322012-09-25 21:59:39 -070056
Stephen Hines43b37272012-05-08 19:02:21 -070057ifeq ($(ARCH_ARM_HAVE_NEON),true)
Colin Cross71df0502014-02-04 16:27:32 -080058 LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
Stephen Hines43b37272012-05-08 19:02:21 -070059endif
60
Zonr Changddf56612012-04-12 15:38:42 +080061include $(LIBBCC_DEVICE_BUILD_MK)
Stephen Hinesf21590e2014-07-15 16:49:25 -070062include $(LLVM_DEVICE_BUILD_MK)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070063include $(BUILD_SHARED_LIBRARY)
Tim Murrayc6e6ee42014-04-07 14:13:26 -070064endif
Shih-wei Liao77ed6142010-04-07 12:21:42 -070065
Logan Chien74396852011-07-12 15:50:26 +080066#=====================================================================
67# Host Shared Library libbcc
68#=====================================================================
Logan Chien21392f02011-11-26 20:32:01 +080069
Ying Wang8d01bd82014-08-01 14:19:38 -070070# Don't build for unbundled branches
71ifeq (,$(TARGET_BUILD_APPS))
72
Shih-wei Liao77ed6142010-04-07 12:21:42 -070073include $(CLEAR_VARS)
74
75LOCAL_MODULE := libbcc
Zonr Chang932648d2010-10-13 22:23:56 +080076LOCAL_MODULE_TAGS := optional
Joseph Wen5de1adf2011-06-21 15:41:31 -070077LOCAL_MODULE_CLASS := SHARED_LIBRARIES
78LOCAL_IS_HOST_MODULE := true
Logan Chien74396852011-07-12 15:50:26 +080079
Logan Chienbe115352014-05-26 23:00:06 +080080ifneq ($(HOST_OS),windows)
Tim Murrayc2074ca2014-04-08 15:39:08 -070081LOCAL_CLANG := true
Logan Chienbe115352014-05-26 23:00:06 +080082endif
Tim Murrayc2074ca2014-04-08 15:39:08 -070083
Logan Chien74396852011-07-12 15:50:26 +080084LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070085
Logan Chien21392f02011-11-26 20:32:01 +080086LOCAL_STATIC_LIBRARIES += \
Zonr Changc989dce2012-04-12 12:03:04 +080087 libutils \
Ying Wang2edf6d62013-04-09 21:54:38 -070088 libcutils \
89 liblog
Logan Chien21392f02011-11-26 20:32:01 +080090
Stephen Hinesba8d7ce2013-02-27 00:40:04 -080091LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM
Stephen Hines569986d2012-03-09 19:58:45 -080092
Stephen Hines48cd7452013-07-30 22:33:44 -070093ifndef USE_MINGW
Shih-wei Liao77ed6142010-04-07 12:21:42 -070094LOCAL_LDLIBS := -ldl -lpthread
Stephen Hines48cd7452013-07-30 22:33:44 -070095endif
Shih-wei Liao77ed6142010-04-07 12:21:42 -070096
Zonr Changddf56612012-04-12 15:38:42 +080097include $(LIBBCC_HOST_BUILD_MK)
Stephen Hinesf21590e2014-07-15 16:49:25 -070098include $(LLVM_HOST_BUILD_MK)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070099include $(BUILD_HOST_SHARED_LIBRARY)
100
Tim Murray62973822013-02-06 17:22:23 -0800101endif # Don't build in unbundled branches
Logan Chien74396852011-07-12 15:50:26 +0800102
103#=====================================================================
104# Include Subdirectories
105#=====================================================================
Shih-wei Liao77ed6142010-04-07 12:21:42 -0700106include $(call all-makefiles-under,$(LOCAL_PATH))