blob: b2a1a049ab5411039a63e95eefcf27e9287adc8e [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
Tim Murray62973822013-02-06 17:22:23 -080017# Don't build for unbundled branches
18ifeq (,$(TARGET_BUILD_APPS))
19
Shih-wei Liao77ed6142010-04-07 12:21:42 -070020LOCAL_PATH := $(call my-dir)
Zonr Changddf56612012-04-12 15:38:42 +080021LIBBCC_ROOT_PATH := $(LOCAL_PATH)
22include $(LIBBCC_ROOT_PATH)/libbcc.mk
Shih-wei Liao77ed6142010-04-07 12:21:42 -070023
Stephen Hinese1094342014-05-13 17:55:49 -070024include frameworks/compile/slang/rs_version.mk
25
Logan Chien74396852011-07-12 15:50:26 +080026#=====================================================================
27# Whole Static Library to Be Linked In
28#=====================================================================
Logan35849002011-01-15 07:30:43 +080029
Logan Chien74396852011-07-12 15:50:26 +080030libbcc_WHOLE_STATIC_LIBRARIES += \
Stephen Hinese198abe2012-07-27 18:05:41 -070031 libbccRenderscript \
Logan Chien74396852011-07-12 15:50:26 +080032 libbccExecutionEngine \
Zonr Changc72c4dd2012-04-12 15:38:53 +080033 libbccCore \
34 libbccSupport
Logan Chien8d3b5e12011-07-12 16:19:21 +080035
Logan Chien74396852011-07-12 15:50:26 +080036#=====================================================================
Logan Chien74396852011-07-12 15:50:26 +080037# Device Shared Library libbcc
38#=====================================================================
Tim Murrayc6e6ee42014-04-07 14:13:26 -070039ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS))
Colin Cross71df0502014-02-04 16:27:32 -080040ifeq ($(TARGET_ARCH),mips64)
41$(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build)
42endif
Logan Chien74396852011-07-12 15:50:26 +080043
Shih-wei Liao77ed6142010-04-07 12:21:42 -070044include $(CLEAR_VARS)
Iliyan Malchev97bd44d2011-03-14 14:02:14 -070045
Shih-wei Liao77ed6142010-04-07 12:21:42 -070046LOCAL_MODULE := libbcc
Zonr Chang932648d2010-10-13 22:23:56 +080047LOCAL_MODULE_TAGS := optional
Joseph Wen5de1adf2011-06-21 15:41:31 -070048LOCAL_MODULE_CLASS := SHARED_LIBRARIES
Shih-wei Liao77ed6142010-04-07 12:21:42 -070049
Logan Chien21392f02011-11-26 20:32:01 +080050LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES)
51
Shih-wei Liao590a2492012-07-22 16:33:34 -070052LOCAL_WHOLE_STATIC_LIBRARIES += librsloader
Shih-wei Liaoddfd1ad2011-06-18 01:47:27 -070053
Tim Murrayc2074ca2014-04-08 15:39:08 -070054LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++
Logan Chien41cb7612011-07-12 16:12:03 +080055
Logan Chien21392f02011-11-26 20:32:01 +080056# Modules that need get installed if and only if the target libbcc.so is
57# installed.
Jean-Luc Brouilletc5e607a2014-06-18 18:14:02 -070058LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt
Ying Wang3ae8c2a2011-01-14 10:50:53 -080059
Colin Cross71df0502014-02-04 16:27:32 -080060LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc
61LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc
Michael Liaocdcce322012-09-25 21:59:39 -070062
Stephen Hines43b37272012-05-08 19:02:21 -070063ifeq ($(ARCH_ARM_HAVE_NEON),true)
Colin Cross71df0502014-02-04 16:27:32 -080064 LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc
Stephen Hines43b37272012-05-08 19:02:21 -070065endif
66
Zonr Changddf56612012-04-12 15:38:42 +080067include $(LIBBCC_DEVICE_BUILD_MK)
Stephen Hinesf21590e2014-07-15 16:49:25 -070068include $(LLVM_DEVICE_BUILD_MK)
Shih-wei Liao77ed6142010-04-07 12:21:42 -070069include $(BUILD_SHARED_LIBRARY)
Tim Murrayc6e6ee42014-04-07 14:13:26 -070070endif
Shih-wei Liao77ed6142010-04-07 12:21:42 -070071
Logan Chien74396852011-07-12 15:50:26 +080072#=====================================================================
73# Host Shared Library libbcc
74#=====================================================================
Logan Chien21392f02011-11-26 20:32:01 +080075
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))