summaryrefslogtreecommitdiffstats
path: root/core/shared_library.mk
diff options
context:
space:
mode:
authorKito Cheng <kito@0xlab.org>2012-06-15 15:15:50 +0800
committerKito Cheng <kito@0xlab.org>2012-06-15 15:16:50 +0800
commit70dc3e1d3d58647a7c9e4173d7a7fefd28ad81e3 (patch)
tree4358a82576c5dcaa64a6d1df77313f7ee0f08403 /core/shared_library.mk
parent3f8ff030e0c693ca0b1758612ecb571711ec2667 (diff)
downloadbuild-70dc3e1d3d58647a7c9e4173d7a7fefd28ad81e3.zip
build-70dc3e1d3d58647a7c9e4173d7a7fefd28ad81e3.tar.gz
build-70dc3e1d3d58647a7c9e4173d7a7fefd28ad81e3.tar.bz2
Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI
Change-Id: Ia95dc7318e17c0804867b22e239edccc5cbec0af
Diffstat (limited to 'core/shared_library.mk')
-rw-r--r--core/shared_library.mk13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/shared_library.mk b/core/shared_library.mk
index ca639eb..1c51346 100644
--- a/core/shared_library.mk
+++ b/core/shared_library.mk
@@ -17,12 +17,25 @@ ifneq ($(strip $(OVERRIDE_BUILT_MODULE_PATH)),)
$(error $(LOCAL_PATH): Illegal use of OVERRIDE_BUILT_MODULE_PATH)
endif
+####################################################
+## Add profiling libraries if aprof is turned
+####################################################
+ifeq ($(strip $(LOCAL_ENABLE_APROF_JNI)),true)
+ LOCAL_ENABLE_APROF := true
+ LOCAL_WHOLE_STATIC_LIBRARIES += libaprof_jni
+endif
+
+ifeq ($(strip $(LOCAL_ENABLE_APROF)),true)
+ LOCAL_SHARED_LIBRARIES += libaprof libaprof_runtime
+endif
+
# Put the built targets of all shared libraries in a common directory
# to simplify the link line.
OVERRIDE_BUILT_MODULE_PATH := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)
include $(BUILD_SYSTEM)/dynamic_binary.mk
+
# Define PRIVATE_ variables from global vars
my_target_global_ld_dirs := $(TARGET_GLOBAL_LD_DIRS)
my_target_global_ldflags := $(TARGET_GLOBAL_LDFLAGS)