summaryrefslogtreecommitdiffstats
path: root/core/prebuilt.mk
diff options
context:
space:
mode:
authorYing Wang <wangying@google.com>2011-09-15 12:00:52 -0700
committerYing Wang <wangying@google.com>2011-09-15 16:13:39 -0700
commitc36b450ab10df53ce116ee7277e431e7b64ea218 (patch)
treeab02466e8de59b1e14109ffb88729e4275864cd2 /core/prebuilt.mk
parent704c0c9fcac5f680411666835fc6bd5d052ba8db (diff)
downloadbuild-c36b450ab10df53ce116ee7277e431e7b64ea218.zip
build-c36b450ab10df53ce116ee7277e431e7b64ea218.tar.gz
build-c36b450ab10df53ce116ee7277e431e7b64ea218.tar.bz2
Fix OVERRIDE_BUILT_MODULE_PATH for prebuilt shared libraries.
So that prebuilt shared libraries can be referenced with the module name in other module's Android.mk. Change-Id: I4c4b471696642694b805b71dd7605b91724ad924
Diffstat (limited to 'core/prebuilt.mk')
-rw-r--r--core/prebuilt.mk11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index bd4d91f..935bce1 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
+
ifeq ($(LOCAL_STRIP_MODULE),true)
ifdef LOCAL_IS_HOST_MODULE
$(error Cannot strip host module LOCAL_PATH=$(LOCAL_PATH))