2015-05-23 05:26:13 +08:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
|
|
|
|
|
|
|
common_cppflags := \
|
|
|
|
-std=gnu++11 \
|
|
|
|
-W \
|
|
|
|
-Wall \
|
|
|
|
-Wextra \
|
|
|
|
-Wunused \
|
|
|
|
-Werror \
|
2014-01-11 08:05:12 +08:00
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
include $(CLEAR_VARS)
|
2014-01-11 08:05:12 +08:00
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_SRC_FILES:= \
|
2014-06-04 06:12:07 +08:00
|
|
|
backtrace.cpp \
|
|
|
|
debuggerd.cpp \
|
2015-02-28 05:39:47 +08:00
|
|
|
elf_utils.cpp \
|
2014-06-04 06:12:07 +08:00
|
|
|
getevent.cpp \
|
|
|
|
tombstone.cpp \
|
|
|
|
utility.cpp \
|
2009-03-04 11:32:55 +08:00
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_SRC_FILES_arm := arm/machine.cpp
|
|
|
|
LOCAL_SRC_FILES_arm64 := arm64/machine.cpp
|
|
|
|
LOCAL_SRC_FILES_mips := mips/machine.cpp
|
2015-03-10 09:41:32 +08:00
|
|
|
LOCAL_SRC_FILES_mips64 := mips64/machine.cpp
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_SRC_FILES_x86 := x86/machine.cpp
|
|
|
|
LOCAL_SRC_FILES_x86_64 := x86_64/machine.cpp
|
|
|
|
|
2015-05-23 05:26:13 +08:00
|
|
|
LOCAL_CPPFLAGS := $(common_cppflags)
|
2014-02-13 14:32:07 +08:00
|
|
|
|
2015-08-15 04:02:51 +08:00
|
|
|
LOCAL_INIT_RC_32 := debuggerd.rc
|
|
|
|
LOCAL_INIT_RC_64 := debuggerd64.rc
|
|
|
|
|
2015-01-16 06:47:36 +08:00
|
|
|
ifeq ($(TARGET_IS_64_BIT),true)
|
|
|
|
LOCAL_CPPFLAGS += -DTARGET_IS_64_BIT
|
|
|
|
endif
|
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := \
|
2014-06-04 06:12:07 +08:00
|
|
|
libbacktrace \
|
2015-02-28 05:39:47 +08:00
|
|
|
libbase \
|
2014-06-04 06:12:07 +08:00
|
|
|
libcutils \
|
|
|
|
liblog \
|
|
|
|
libselinux \
|
2014-03-22 07:58:30 +08:00
|
|
|
|
2014-12-19 07:47:09 +08:00
|
|
|
LOCAL_CLANG := true
|
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_MODULE := debuggerd
|
|
|
|
LOCAL_MODULE_STEM_32 := debuggerd
|
|
|
|
LOCAL_MODULE_STEM_64 := debuggerd64
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
|
|
|
|
include $(BUILD_EXECUTABLE)
|
|
|
|
|
2014-07-10 07:41:04 +08:00
|
|
|
|
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES := crasher.c
|
|
|
|
LOCAL_SRC_FILES_arm := arm/crashglue.S
|
|
|
|
LOCAL_SRC_FILES_arm64 := arm64/crashglue.S
|
|
|
|
LOCAL_SRC_FILES_mips := mips/crashglue.S
|
2015-03-10 09:41:32 +08:00
|
|
|
LOCAL_SRC_FILES_mips64 := mips64/crashglue.S
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_SRC_FILES_x86 := x86/crashglue.S
|
|
|
|
LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S
|
2009-03-04 11:32:55 +08:00
|
|
|
LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES)
|
2011-01-24 09:51:54 +08:00
|
|
|
LOCAL_MODULE_TAGS := optional
|
2014-05-01 00:24:08 +08:00
|
|
|
LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object
|
2014-03-22 07:58:30 +08:00
|
|
|
#LOCAL_FORCE_STATIC_EXECUTABLE := true
|
2013-04-10 13:03:45 +08:00
|
|
|
LOCAL_SHARED_LIBRARIES := libcutils liblog libc
|
2014-03-22 07:58:30 +08:00
|
|
|
|
2014-07-10 07:41:04 +08:00
|
|
|
# The arm emulator has VFP but not VFPv3-D32.
|
|
|
|
ifeq ($(ARCH_ARM_HAVE_VFP_D32),true)
|
|
|
|
LOCAL_ASFLAGS_arm += -DHAS_VFP_D32
|
|
|
|
endif
|
|
|
|
|
2014-03-22 07:58:30 +08:00
|
|
|
LOCAL_MODULE := crasher
|
|
|
|
LOCAL_MODULE_STEM_32 := crasher
|
|
|
|
LOCAL_MODULE_STEM_64 := crasher64
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
|
2009-03-04 11:32:55 +08:00
|
|
|
include $(BUILD_EXECUTABLE)
|
2015-05-23 05:26:13 +08:00
|
|
|
|
2015-06-03 05:52:44 +08:00
|
|
|
debuggerd_test_src_files := \
|
2015-05-23 05:26:13 +08:00
|
|
|
utility.cpp \
|
|
|
|
test/dump_memory_test.cpp \
|
2015-06-03 05:52:44 +08:00
|
|
|
test/elf_fake.cpp \
|
2015-05-23 05:26:13 +08:00
|
|
|
test/log_fake.cpp \
|
2015-06-03 05:52:44 +08:00
|
|
|
test/property_fake.cpp \
|
|
|
|
test/ptrace_fake.cpp \
|
2015-06-18 09:35:59 +08:00
|
|
|
test/tombstone_test.cpp \
|
2015-06-03 05:52:44 +08:00
|
|
|
test/selinux_fake.cpp \
|
2015-05-23 05:26:13 +08:00
|
|
|
|
2015-06-03 05:52:44 +08:00
|
|
|
debuggerd_shared_libraries := \
|
2015-05-23 05:26:13 +08:00
|
|
|
libbacktrace \
|
|
|
|
libbase \
|
2015-06-03 05:52:44 +08:00
|
|
|
libcutils \
|
2015-05-23 05:26:13 +08:00
|
|
|
|
2015-06-03 05:52:44 +08:00
|
|
|
debuggerd_c_includes := \
|
|
|
|
$(LOCAL_PATH)/test \
|
|
|
|
|
|
|
|
debuggerd_cpp_flags := \
|
|
|
|
$(common_cppflags) \
|
|
|
|
-Wno-missing-field-initializers \
|
|
|
|
|
|
|
|
# Only build the host tests on linux.
|
|
|
|
ifeq ($(HOST_OS),linux)
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_MODULE := debuggerd_test
|
|
|
|
LOCAL_SRC_FILES := $(debuggerd_test_src_files)
|
|
|
|
LOCAL_SHARED_LIBRARIES := $(debuggerd_shared_libraries)
|
|
|
|
LOCAL_C_INCLUDES := $(debuggerd_c_includes)
|
|
|
|
LOCAL_CPPFLAGS := $(debuggerd_cpp_flags)
|
2015-05-23 05:26:13 +08:00
|
|
|
|
|
|
|
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
|
|
|
|
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
include $(BUILD_HOST_NATIVE_TEST)
|
|
|
|
|
2015-06-03 05:52:44 +08:00
|
|
|
endif
|
2015-05-23 05:26:13 +08:00
|
|
|
|
2015-06-03 05:52:44 +08:00
|
|
|
include $(CLEAR_VARS)
|
2015-05-23 05:26:13 +08:00
|
|
|
|
|
|
|
LOCAL_MODULE := debuggerd_test
|
2015-06-03 05:52:44 +08:00
|
|
|
LOCAL_SRC_FILES := $(debuggerd_test_src_files)
|
|
|
|
LOCAL_SHARED_LIBRARIES := $(debuggerd_shared_libraries)
|
|
|
|
LOCAL_C_INCLUDES := $(debuggerd_c_includes)
|
|
|
|
LOCAL_CPPFLAGS := $(debuggerd_cpp_flags)
|
2015-05-23 05:26:13 +08:00
|
|
|
|
|
|
|
LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32
|
|
|
|
LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64
|
|
|
|
LOCAL_MULTILIB := both
|
|
|
|
include $(BUILD_NATIVE_TEST)
|