diff options
author | Jeff Brown <jeffbrown@google.com> | 2011-01-11 12:38:32 -0800 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2011-02-03 16:58:38 -0800 |
commit | b415faba7482dd7ee3335f0f1518333554e3da0d (patch) | |
tree | 651af759a6d8d99349e844fe4cb11bc44347a644 /libop | |
parent | 219a1d03a9de33ae62abdb0cf5c45126940d0ace (diff) | |
download | oprofile-b415faba7482dd7ee3335f0f1518333554e3da0d.tar.gz |
Compile oprofile tools on the host.
Some of the new build targets are disabled for now because libbfd is
not currently provided by the prebuilt toolchain for all platforms.
Change-Id: Ie2c24bf997c9c5f15f6c3e2eaf949d73578890d8
Diffstat (limited to 'libop')
-rw-r--r-- | libop/Android.mk | 28 | ||||
-rw-r--r-- | libop/op_config.h | 2 | ||||
-rw-r--r-- | libop/op_hw_specific.h | 2 |
3 files changed, 25 insertions, 7 deletions
diff --git a/libop/Android.mk b/libop/Android.mk index e935a45..01ddea9 100644 --- a/libop/Android.mk +++ b/libop/Android.mk @@ -1,7 +1,6 @@ LOCAL_PATH:= $(call my-dir) -include $(CLEAR_VARS) -LOCAL_SRC_FILES:= \ +common_src := \ op_alloc_counter.c \ op_config.c \ op_cpu_type.c \ @@ -12,10 +11,29 @@ LOCAL_SRC_FILES:= \ op_xml_events.c \ op_xml_out.c -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/.. \ - $(LOCAL_PATH)/../libutil +common_includes := \ + external/oprofile \ + external/oprofile/libutil + +# Build libop on target +include $(CLEAR_VARS) +LOCAL_SRC_FILES:= $(common_src) +LOCAL_C_INCLUDES := $(common_includes) +LOCAL_CFLAGS := -fexceptions -DANDROID_HOST +LOCAL_MODULE_TAGS := optional LOCAL_MODULE := libop include $(BUILD_STATIC_LIBRARY) + +# Build libop on host +include $(CLEAR_VARS) + +LOCAL_SRC_FILES:= $(common_src) +LOCAL_C_INCLUDES := $(common_includes) +LOCAL_CFLAGS := -DANDROID_HOST +LOCAL_MODULE_TAGS := optional +LOCAL_MODULE := libop + +include $(BUILD_HOST_STATIC_LIBRARY) + diff --git a/libop/op_config.h b/libop/op_config.h index 12e4b96..f8b56c4 100644 --- a/libop/op_config.h +++ b/libop/op_config.h @@ -25,7 +25,7 @@ extern "C" { */ void init_op_config_dirs(char const * session_dir); -#ifndef ANDROID +#if !defined(ANDROID) || defined(ANDROID_HOST) #define OP_SESSION_DIR_DEFAULT "/var/lib/oprofile/" #endif diff --git a/libop/op_hw_specific.h b/libop/op_hw_specific.h index 27c44ec..57d8149 100644 --- a/libop/op_hw_specific.h +++ b/libop/op_hw_specific.h @@ -5,7 +5,7 @@ * @author Andi Kleen */ -#if defined(__i386__) || defined(__x86_64__) +#if (defined(__i386__) || defined(__x86_64__)) && !defined(ANDROID_HOST) /* Assume we run on the same host as the profilee */ |