Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 1 | # |
Stephen Hines | db16918 | 2012-01-05 18:46:36 -0800 | [diff] [blame] | 2 | # Copyright (C) 2010-2012 The Android Open Source Project |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 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 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 17 | LOCAL_PATH := $(call my-dir) |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 18 | LIBBCC_ROOT_PATH := $(LOCAL_PATH) |
| 19 | include $(LIBBCC_ROOT_PATH)/libbcc.mk |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 20 | |
Stephen Hines | e109434 | 2014-05-13 17:55:49 -0700 | [diff] [blame] | 21 | include frameworks/compile/slang/rs_version.mk |
| 22 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 23 | #===================================================================== |
| 24 | # Whole Static Library to Be Linked In |
| 25 | #===================================================================== |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 26 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 27 | libbcc_WHOLE_STATIC_LIBRARIES += \ |
Stephen Hines | e198abe | 2012-07-27 18:05:41 -0700 | [diff] [blame] | 28 | libbccRenderscript \ |
Zonr Chang | c72c4dd | 2012-04-12 15:38:53 +0800 | [diff] [blame] | 29 | libbccCore \ |
| 30 | libbccSupport |
Logan Chien | 8d3b5e1 | 2011-07-12 16:19:21 +0800 | [diff] [blame] | 31 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 32 | #===================================================================== |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 33 | # Device Shared Library libbcc |
| 34 | #===================================================================== |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 35 | ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS)) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 36 | ifeq ($(TARGET_ARCH),mips64) |
| 37 | $(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build) |
| 38 | endif |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 39 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 40 | include $(CLEAR_VARS) |
Iliyan Malchev | 97bd44d | 2011-03-14 14:02:14 -0700 | [diff] [blame] | 41 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 42 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 43 | LOCAL_MODULE_TAGS := optional |
Joseph Wen | 5de1adf | 2011-06-21 15:41:31 -0700 | [diff] [blame] | 44 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 45 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 46 | LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES) |
| 47 | |
Tim Murray | c2074ca | 2014-04-08 15:39:08 -0700 | [diff] [blame] | 48 | LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++ |
Logan Chien | 41cb761 | 2011-07-12 16:12:03 +0800 | [diff] [blame] | 49 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 50 | # Modules that need get installed if and only if the target libbcc.so is |
| 51 | # installed. |
Jean-Luc Brouillet | c5e607a | 2014-06-18 18:14:02 -0700 | [diff] [blame] | 52 | LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libcompiler_rt |
Ying Wang | 3ae8c2a | 2011-01-14 10:50:53 -0800 | [diff] [blame] | 53 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 54 | LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc |
| 55 | LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc |
Michael Liao | cdcce32 | 2012-09-25 21:59:39 -0700 | [diff] [blame] | 56 | |
Stephen Hines | 43b3727 | 2012-05-08 19:02:21 -0700 | [diff] [blame] | 57 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 58 | LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc |
Stephen Hines | 43b3727 | 2012-05-08 19:02:21 -0700 | [diff] [blame] | 59 | endif |
| 60 | |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 61 | include $(LIBBCC_DEVICE_BUILD_MK) |
Stephen Hines | f21590e | 2014-07-15 16:49:25 -0700 | [diff] [blame] | 62 | include $(LLVM_DEVICE_BUILD_MK) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 63 | include $(BUILD_SHARED_LIBRARY) |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 64 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 65 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 66 | #===================================================================== |
| 67 | # Host Shared Library libbcc |
| 68 | #===================================================================== |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 69 | |
Ying Wang | 8d01bd8 | 2014-08-01 14:19:38 -0700 | [diff] [blame] | 70 | # Don't build for unbundled branches |
| 71 | ifeq (,$(TARGET_BUILD_APPS)) |
| 72 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 73 | include $(CLEAR_VARS) |
| 74 | |
| 75 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 76 | LOCAL_MODULE_TAGS := optional |
Joseph Wen | 5de1adf | 2011-06-21 15:41:31 -0700 | [diff] [blame] | 77 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 78 | LOCAL_IS_HOST_MODULE := true |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 79 | |
Logan Chien | be11535 | 2014-05-26 23:00:06 +0800 | [diff] [blame] | 80 | ifneq ($(HOST_OS),windows) |
Tim Murray | c2074ca | 2014-04-08 15:39:08 -0700 | [diff] [blame] | 81 | LOCAL_CLANG := true |
Logan Chien | be11535 | 2014-05-26 23:00:06 +0800 | [diff] [blame] | 82 | endif |
Tim Murray | c2074ca | 2014-04-08 15:39:08 -0700 | [diff] [blame] | 83 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 84 | LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 85 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 86 | LOCAL_STATIC_LIBRARIES += \ |
Zonr Chang | c989dce | 2012-04-12 12:03:04 +0800 | [diff] [blame] | 87 | libutils \ |
Ying Wang | 2edf6d6 | 2013-04-09 21:54:38 -0700 | [diff] [blame] | 88 | libcutils \ |
| 89 | liblog |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 90 | |
Stephen Hines | ba8d7ce | 2013-02-27 00:40:04 -0800 | [diff] [blame] | 91 | LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM |
Stephen Hines | 569986d | 2012-03-09 19:58:45 -0800 | [diff] [blame] | 92 | |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 93 | ifndef USE_MINGW |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 94 | LOCAL_LDLIBS := -ldl -lpthread |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 95 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 96 | |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 97 | include $(LIBBCC_HOST_BUILD_MK) |
Stephen Hines | f21590e | 2014-07-15 16:49:25 -0700 | [diff] [blame] | 98 | include $(LLVM_HOST_BUILD_MK) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 99 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 100 | |
Tim Murray | 6297382 | 2013-02-06 17:22:23 -0800 | [diff] [blame] | 101 | endif # Don't build in unbundled branches |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 102 | |
| 103 | #===================================================================== |
| 104 | # Include Subdirectories |
| 105 | #===================================================================== |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 106 | include $(call all-makefiles-under,$(LOCAL_PATH)) |