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 | |
Tim Murray | 6297382 | 2013-02-06 17:22:23 -0800 | [diff] [blame] | 17 | # Don't build for unbundled branches |
| 18 | ifeq (,$(TARGET_BUILD_APPS)) |
| 19 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 20 | LOCAL_PATH := $(call my-dir) |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 21 | LIBBCC_ROOT_PATH := $(LOCAL_PATH) |
| 22 | include $(LIBBCC_ROOT_PATH)/libbcc.mk |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 23 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 24 | #===================================================================== |
| 25 | # Whole Static Library to Be Linked In |
| 26 | #===================================================================== |
Logan | 3584900 | 2011-01-15 07:30:43 +0800 | [diff] [blame] | 27 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 28 | libbcc_WHOLE_STATIC_LIBRARIES += \ |
Stephen Hines | e198abe | 2012-07-27 18:05:41 -0700 | [diff] [blame] | 29 | libbccRenderscript \ |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 30 | libbccExecutionEngine \ |
Zonr Chang | c72c4dd | 2012-04-12 15:38:53 +0800 | [diff] [blame] | 31 | libbccCore \ |
| 32 | libbccSupport |
Logan Chien | 8d3b5e1 | 2011-07-12 16:19:21 +0800 | [diff] [blame] | 33 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 34 | #===================================================================== |
Shih-wei Liao | 2665c2f | 2012-04-25 04:06:52 -0700 | [diff] [blame] | 35 | # Calculate SHA1 checksum for libbcc.so, libRS.so and libclcore.bc |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 36 | #===================================================================== |
| 37 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 38 | my_2nd_arch_prefix := |
| 39 | include $(LOCAL_PATH)/libbcc.sha1.mk |
| 40 | ifneq ($(TARGET_2ND_ARCH),) |
| 41 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
| 42 | include $(LOCAL_PATH)/libbcc.sha1.mk |
Shih-wei Liao | b1cc74f | 2012-06-30 11:27:01 -0700 | [diff] [blame] | 43 | endif |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 44 | my_2nd_arch_prefix := |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 45 | |
| 46 | #===================================================================== |
| 47 | # Device Shared Library libbcc |
| 48 | #===================================================================== |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 49 | ifneq (true,$(DISABLE_LLVM_DEVICE_BUILDS)) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 50 | ifeq ($(TARGET_ARCH),arm64) |
| 51 | $(info TODOArm64: $(LOCAL_PATH)/Android.mk Enable libbcc build) |
| 52 | endif |
| 53 | |
| 54 | ifeq ($(TARGET_ARCH),mips64) |
| 55 | $(info TODOMips64: $(LOCAL_PATH)/Android.mk Enable libbcc build) |
| 56 | endif |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 57 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 58 | include $(CLEAR_VARS) |
Iliyan Malchev | 97bd44d | 2011-03-14 14:02:14 -0700 | [diff] [blame] | 59 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 60 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 61 | LOCAL_MODULE_TAGS := optional |
Joseph Wen | 5de1adf | 2011-06-21 15:41:31 -0700 | [diff] [blame] | 62 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 63 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 64 | LOCAL_WHOLE_STATIC_LIBRARIES := $(libbcc_WHOLE_STATIC_LIBRARIES) |
| 65 | |
Shih-wei Liao | 590a249 | 2012-07-22 16:33:34 -0700 | [diff] [blame] | 66 | LOCAL_WHOLE_STATIC_LIBRARIES += librsloader |
Shih-wei Liao | ddfd1ad | 2011-06-18 01:47:27 -0700 | [diff] [blame] | 67 | |
Tim Murray | c2074ca | 2014-04-08 15:39:08 -0700 | [diff] [blame] | 68 | LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM libdl libutils libcutils liblog libc++ |
Logan Chien | 41cb761 | 2011-07-12 16:12:03 +0800 | [diff] [blame] | 69 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 70 | # Modules that need get installed if and only if the target libbcc.so is |
| 71 | # installed. |
Stephen Hines | 8ee82d4 | 2013-04-16 19:57:34 -0700 | [diff] [blame] | 72 | LOCAL_REQUIRED_MODULES := libclcore.bc libclcore_debug.bc libbcc.sha1 libcompiler_rt |
Ying Wang | 3ae8c2a | 2011-01-14 10:50:53 -0800 | [diff] [blame] | 73 | |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 74 | LOCAL_REQUIRED_MODULES_x86 += libclcore_x86.bc |
| 75 | LOCAL_REQUIRED_MODULES_x86_64 += libclcore_x86.bc |
Michael Liao | cdcce32 | 2012-09-25 21:59:39 -0700 | [diff] [blame] | 76 | |
Stephen Hines | 43b3727 | 2012-05-08 19:02:21 -0700 | [diff] [blame] | 77 | ifeq ($(ARCH_ARM_HAVE_NEON),true) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 78 | LOCAL_REQUIRED_MODULES_arm += libclcore_neon.bc |
Stephen Hines | 43b3727 | 2012-05-08 19:02:21 -0700 | [diff] [blame] | 79 | endif |
| 80 | |
Zonr Chang | 7a5d423 | 2012-04-12 15:39:06 +0800 | [diff] [blame] | 81 | # Generate build information (Build time + Build git revision + Build Semi SHA1) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 82 | my_2nd_arch_prefix := |
Zonr Chang | 7a5d423 | 2012-04-12 15:39:06 +0800 | [diff] [blame] | 83 | include $(LIBBCC_ROOT_PATH)/libbcc-gen-build-info.mk |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 84 | ifdef TARGET_2ND_ARCH |
| 85 | my_2nd_arch_prefix := $(TARGET_2ND_ARCH_VAR_PREFIX) |
| 86 | include $(LIBBCC_ROOT_PATH)/libbcc-gen-build-info.mk |
| 87 | endif |
| 88 | my_2nd_arch_prefix := |
Logan Chien | 48dc01d | 2011-07-13 18:12:06 +0800 | [diff] [blame] | 89 | |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 90 | include $(LIBBCC_DEVICE_BUILD_MK) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 91 | include $(BUILD_SHARED_LIBRARY) |
Tim Murray | c6e6ee4 | 2014-04-07 14:13:26 -0700 | [diff] [blame] | 92 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 93 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 94 | #===================================================================== |
| 95 | # Host Shared Library libbcc |
| 96 | #===================================================================== |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 97 | |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 98 | include $(CLEAR_VARS) |
| 99 | |
| 100 | LOCAL_MODULE := libbcc |
Zonr Chang | 932648d | 2010-10-13 22:23:56 +0800 | [diff] [blame] | 101 | LOCAL_MODULE_TAGS := optional |
Joseph Wen | 5de1adf | 2011-06-21 15:41:31 -0700 | [diff] [blame] | 102 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 103 | LOCAL_IS_HOST_MODULE := true |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 104 | |
Tim Murray | c2074ca | 2014-04-08 15:39:08 -0700 | [diff] [blame] | 105 | LOCAL_CLANG := true |
| 106 | |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 107 | LOCAL_WHOLE_STATIC_LIBRARIES += $(libbcc_WHOLE_STATIC_LIBRARIES) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 108 | |
Shih-wei Liao | 590a249 | 2012-07-22 16:33:34 -0700 | [diff] [blame] | 109 | LOCAL_WHOLE_STATIC_LIBRARIES += librsloader |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 110 | |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 111 | LOCAL_STATIC_LIBRARIES += \ |
Zonr Chang | c989dce | 2012-04-12 12:03:04 +0800 | [diff] [blame] | 112 | libutils \ |
Ying Wang | 2edf6d6 | 2013-04-09 21:54:38 -0700 | [diff] [blame] | 113 | libcutils \ |
| 114 | liblog |
Logan Chien | 21392f0 | 2011-11-26 20:32:01 +0800 | [diff] [blame] | 115 | |
Stephen Hines | ba8d7ce | 2013-02-27 00:40:04 -0800 | [diff] [blame] | 116 | LOCAL_SHARED_LIBRARIES := libbcinfo libLLVM |
Stephen Hines | 569986d | 2012-03-09 19:58:45 -0800 | [diff] [blame] | 117 | |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 118 | ifndef USE_MINGW |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 119 | LOCAL_LDLIBS := -ldl -lpthread |
Stephen Hines | 48cd745 | 2013-07-30 22:33:44 -0700 | [diff] [blame] | 120 | endif |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 121 | |
Zonr Chang | 7a5d423 | 2012-04-12 15:39:06 +0800 | [diff] [blame] | 122 | # Generate build information (Build time + Build git revision + Build Semi SHA1) |
Colin Cross | 71df050 | 2014-02-04 16:27:32 -0800 | [diff] [blame] | 123 | my_2nd_arch_prefix := |
Zonr Chang | 7a5d423 | 2012-04-12 15:39:06 +0800 | [diff] [blame] | 124 | include $(LIBBCC_ROOT_PATH)/libbcc-gen-build-info.mk |
Logan Chien | 48dc01d | 2011-07-13 18:12:06 +0800 | [diff] [blame] | 125 | |
Zonr Chang | ddf5661 | 2012-04-12 15:38:42 +0800 | [diff] [blame] | 126 | include $(LIBBCC_HOST_BUILD_MK) |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 127 | include $(BUILD_HOST_SHARED_LIBRARY) |
| 128 | |
Tim Murray | 6297382 | 2013-02-06 17:22:23 -0800 | [diff] [blame] | 129 | endif # Don't build in unbundled branches |
Logan Chien | 7439685 | 2011-07-12 15:50:26 +0800 | [diff] [blame] | 130 | |
| 131 | #===================================================================== |
| 132 | # Include Subdirectories |
| 133 | #===================================================================== |
Shih-wei Liao | 77ed614 | 2010-04-07 12:21:42 -0700 | [diff] [blame] | 134 | include $(call all-makefiles-under,$(LOCAL_PATH)) |