aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2011-11-22 14:13:03 -0800
committerYing Wang <wangying@google.com>2011-11-22 14:14:34 -0800
commitacd93c7f6df7cd70d12622bf9fdb4af5d8f0eb24 (patch)
treec1819d1af98862b049eec21739fd5467b136f714
parent719051f9878f85b57470d9047e8156320f31c98a (diff)
downloadbuild-acd93c7f6df7cd70d12622bf9fdb4af5d8f0eb24.tar.gz
Fix OVERRIDE_BUILT_MODULE_PATH for prebuilt shared libraries.android-cts-2.3_r12android-cts-2.3_r11
So that prebuilt shared libraries can be referenced with the module name in other module's Android.mk. This is a clean cherrypick from later branches. Bug: 5652242 Change-Id: I850978251a23808559d30025a9c519fe8e59594a
-rw-r--r--core/prebuilt.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index 8f9eafb2fb..d0155cf742 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -16,6 +16,17 @@ ifneq ($(LOCAL_PREBUILT_JAVA_LIBRARIES),)
$(error dont use LOCAL_PREBUILT_JAVA_LIBRARIES anymore LOCAL_PATH=$(LOCAL_PATH))
endif
+ifdef LOCAL_IS_HOST_MODULE
+ my_prefix:=HOST_
+else
+ my_prefix:=TARGET_
+endif
+ifeq (SHARED_LIBRARIES,$(LOCAL_MODULE_CLASS))
+ # Put the built targets of all shared libraries in a common directory
+ # to simplify the link line.
+ OVERRIDE_BUILT_MODULE_PATH := $($(my_prefix)OUT_INTERMEDIATE_LIBRARIES)
+endif
+
ifneq ($(filter APPS,$(LOCAL_MODULE_CLASS)),)
ifeq (true,$(WITH_DEXPREOPT))
ifeq (,$(TARGET_BUILD_APPS))