blob: ecfea9009819309adc585ea077d19dbef5ef138e [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 \
Logan Chien74396852011-07-12 15:50:26 +080029 libbccExecutionEngine \
Zonr Changc72c4dd2012-04-12 15:38:53 +080030 libbccCore \
31 libbccSupport
Logan Chien8d3b5e12011-07-12 16:19:21 +080032
Logan Chien74396852011-07-12 15:50:26 +080033#=====================================================================
Logan Chien74396852011-07-12 15:50:26 +080034# Device Shared Library libbcc
35#=====================================================================
Tim Murrayc6e6ee42014-04-07 14:13:26 -070036ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
Colin Cross71df0502014-02-04 16:27:32 -080037ifeq ($(TARGET_ARCH),mips64)
38$(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build)
39endif
Logan Chien74396852011-07-12 15:50:26 +080040
Shih-wei Liao77ed6142010-04-07 12:21:42 -070041include $(CLEAR_VARS)
Iliyan Malchev97bd44d2011-03-14 14:02:14 -070042
Shih-wei Liao77ed6142010-04-07 12:21:42 -070043LOCAL_MODULE := libbcc
Zonr Chang932648d2010-10-13 22:23:56 +080044LOCAL_MODULE_TAGS := optional
Joseph Wen5de1adf2011-06-21 15:41:31 -070045LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Shih-wei Liao77ed6142010-04-07 12:21:42 -070046
Logan Chien21392f02011-11-26 20:32:01 +080047LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
48
Shih-wei Liao590a2492012-07-22 16:33:34 -070049LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
Shih-wei Liaoddfd1ad2011-06-18 01:47:27 -070050
Tim Murrayc2074ca2014-04-08 15:39:08 -070051LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
Logan Chien41cb7612011-07-12 16:12:03 +080052
Logan Chien21392f02011-11-26 20:32:01 +080053# Modules that need get installed if and only if the target libbcc.so is
54# installed.
Jean-Luc Brouilletc5e607a2014-06-18 18:14:02 -070055LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
Ying Wang3ae8c2a2011-01-14 10:50:53 -080056
Colin Cross71df0502014-02-04 16:27:32 -080057LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
58LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
Michael Liaocdcce322012-09-25 21:59:39 -070059
Stephen Hines43b37272012-05-08 19:02:21 -070060ifeq ($(ARCH_ARM_HAVE_NEON),true)
Colin Cross71df0502014-02-04 16:27:32 -080061 LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
Stephen Hines43b37272012-05-08 19:02:21 -070062endif
63
Zonr Changddf56612012-04-12 15:38:42 +080064include $(LIBBCC_DEVICE_BUILD_MK)
Stephen Hinesf21590e2014-07-15 16:49:25 -070065include $(LLVM_DEVICE_BUILD_MK)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070066include $(BUILD_SHARED_LIBRARY)
Tim Murrayc6e6ee42014-04-07 14:13:26 -070067endif
Shih-wei Liao77ed6142010-04-07 12:21:42 -070068
Logan Chien74396852011-07-12 15:50:26 +080069#=====================================================================
70# Host Shared Library libbcc
71#=====================================================================
Logan Chien21392f02011-11-26 20:32:01 +080072
Ying Wang8d01bd82014-08-01 14:19:38 -070073# Don't build for unbundled branches
74ifeq (,$(TARGET_BUILD_APPS))
75
Shih-wei Liao77ed6142010-04-07 12:21:42 -070076include $(CLEAR_VARS)
77
78LOCAL_MODULE := libbcc
Zonr Chang932648d2010-10-13 22:23:56 +080079LOCAL_MODULE_TAGS := optional
Joseph Wen5de1adf2011-06-21 15:41:31 -070080LOCAL_MODULE_CLASS := SHARED_LIBRARIES
81LOCAL_IS_HOST_MODULE := true
Logan Chien74396852011-07-12 15:50:26 +080082
Logan Chienbe115352014-05-26 23:00:06 +080083ifneq ($(HOST_OS),windows)
Tim Murrayc2074ca2014-04-08 15:39:08 -070084LOCAL_CLANG := true
Logan Chienbe115352014-05-26 23:00:06 +080085endif
Tim Murrayc2074ca2014-04-08 15:39:08 -070086
Logan Chien74396852011-07-12 15:50:26 +080087LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070088
Shih-wei Liao590a2492012-07-22 16:33:34 -070089LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
Shih-wei Liao77ed6142010-04-07 12:21:42 -070090
Logan Chien21392f02011-11-26 20:32:01 +080091LOCAL_STATIC_LIBRARIES += \
Zonr Changc989dce2012-04-12 12:03:04 +080092 libutils \
Ying Wang2edf6d62013-04-09 21:54:38 -070093 libcutils \
94 liblog
Logan Chien21392f02011-11-26 20:32:01 +080095
Stephen Hinesba8d7ce2013-02-27 00:40:04 -080096LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM
Stephen Hines569986d2012-03-09 19:58:45 -080097
Stephen Hines48cd7452013-07-30 22:33:44 -070098ifndef USE_MINGW
Shih-wei Liao77ed6142010-04-07 12:21:42 -070099LOCAL_LDLIBS := -ldl -lpthread
Stephen Hines48cd7452013-07-30 22:33:44 -0700100endif
Shih-wei Liao77ed6142010-04-07 12:21:42 -0700101
Zonr Changddf56612012-04-12 15:38:42 +0800102include $(LIBBCC_HOST_BUILD_MK)
Stephen Hinesf21590e2014-07-15 16:49:25 -0700103include $(LLVM_HOST_BUILD_MK)
Shih-wei Liao77ed6142010-04-07 12:21:42 -0700104include $(BUILD_HOST_SHARED_LIBRARY)
105
Tim Murray62973822013-02-06 17:22:23 -0800106endif # Don't build in unbundled branches
Logan Chien74396852011-07-12 15:50:26 +0800107
108#=====================================================================
109# Include Subdirectories
110#=====================================================================
Shih-wei Liao77ed6142010-04-07 12:21:42 -0700111include $(call all-makefiles-under,$(LOCAL_PATH))