summaryrefslogtreecommitdiffstats
path: root/core/shared_library.mk
diff options
context:
space:
mode:
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)