| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 1 | LOCAL_PATH := $(call my-dir) | 
 | 2 |  | 
 | 3 | common_cppflags := \ | 
 | 4 |     -std=gnu++11 \ | 
 | 5 |     -W \ | 
 | 6 |     -Wall \ | 
 | 7 |     -Wextra \ | 
 | 8 |     -Wunused \ | 
 | 9 |     -Werror \ | 
| The Android Open Source Project | dd7bc33 | 2009-03-03 19:32:55 -0800 | [diff] [blame] | 10 |  | 
| Ben Cheng | bdcff7d | 2009-12-17 12:50:58 -0800 | [diff] [blame] | 11 | include $(CLEAR_VARS) | 
| Colin Cross | e951f60 | 2010-03-08 19:21:07 -0800 | [diff] [blame] | 12 |  | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 13 | LOCAL_SRC_FILES:= \ | 
| Elliott Hughes | 8c59768 | 2014-06-03 15:12:07 -0700 | [diff] [blame] | 14 |     backtrace.cpp \ | 
 | 15 |     debuggerd.cpp \ | 
| Christopher Ferris | a21bd93 | 2015-02-27 13:39:47 -0800 | [diff] [blame] | 16 |     elf_utils.cpp \ | 
| Elliott Hughes | 8c59768 | 2014-06-03 15:12:07 -0700 | [diff] [blame] | 17 |     getevent.cpp \ | 
 | 18 |     tombstone.cpp \ | 
 | 19 |     utility.cpp \ | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 20 |  | 
 | 21 | LOCAL_SRC_FILES_arm    := arm/machine.cpp | 
 | 22 | LOCAL_SRC_FILES_arm64  := arm64/machine.cpp | 
 | 23 | LOCAL_SRC_FILES_mips   := mips/machine.cpp | 
| Douglas Leung | 2ea9a32 | 2015-03-09 18:41:32 -0700 | [diff] [blame] | 24 | LOCAL_SRC_FILES_mips64 := mips64/machine.cpp | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 25 | LOCAL_SRC_FILES_x86    := x86/machine.cpp | 
 | 26 | LOCAL_SRC_FILES_x86_64 := x86_64/machine.cpp | 
 | 27 |  | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 28 | LOCAL_CPPFLAGS := $(common_cppflags) | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 29 |  | 
| Christopher Ferris | 9774df6 | 2015-01-15 14:47:36 -0800 | [diff] [blame] | 30 | ifeq ($(TARGET_IS_64_BIT),true) | 
 | 31 | LOCAL_CPPFLAGS += -DTARGET_IS_64_BIT | 
 | 32 | endif | 
 | 33 |  | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 34 | LOCAL_SHARED_LIBRARIES := \ | 
| Elliott Hughes | 8c59768 | 2014-06-03 15:12:07 -0700 | [diff] [blame] | 35 |     libbacktrace \ | 
| Christopher Ferris | a21bd93 | 2015-02-27 13:39:47 -0800 | [diff] [blame] | 36 |     libbase \ | 
| Elliott Hughes | 8c59768 | 2014-06-03 15:12:07 -0700 | [diff] [blame] | 37 |     libcutils \ | 
 | 38 |     liblog \ | 
 | 39 |     libselinux \ | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 40 |  | 
| Elliott Hughes | c184d56 | 2014-12-18 15:47:09 -0800 | [diff] [blame] | 41 | LOCAL_CLANG := true | 
 | 42 |  | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 43 | LOCAL_MODULE := debuggerd | 
 | 44 | LOCAL_MODULE_STEM_32 := debuggerd | 
 | 45 | LOCAL_MODULE_STEM_64 := debuggerd64 | 
 | 46 | LOCAL_MULTILIB := both | 
 | 47 |  | 
 | 48 | include $(BUILD_EXECUTABLE) | 
 | 49 |  | 
| Elliott Hughes | cb7aae1 | 2014-07-09 16:41:04 -0700 | [diff] [blame] | 50 |  | 
 | 51 |  | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 52 | include $(CLEAR_VARS) | 
 | 53 | LOCAL_SRC_FILES := crasher.c | 
 | 54 | LOCAL_SRC_FILES_arm    := arm/crashglue.S | 
 | 55 | LOCAL_SRC_FILES_arm64  := arm64/crashglue.S | 
 | 56 | LOCAL_SRC_FILES_mips   := mips/crashglue.S | 
| Douglas Leung | 2ea9a32 | 2015-03-09 18:41:32 -0700 | [diff] [blame] | 57 | LOCAL_SRC_FILES_mips64 := mips64/crashglue.S | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 58 | LOCAL_SRC_FILES_x86    := x86/crashglue.S | 
 | 59 | LOCAL_SRC_FILES_x86_64 := x86_64/crashglue.S | 
 | 60 | LOCAL_MODULE_PATH := $(TARGET_OUT_OPTIONAL_EXECUTABLES) | 
 | 61 | LOCAL_MODULE_TAGS := optional | 
| Mark Salyzyn | f1a8dfa | 2014-04-30 09:24:08 -0700 | [diff] [blame] | 62 | LOCAL_CFLAGS += -fstack-protector-all -Werror -Wno-free-nonheap-object | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 63 | #LOCAL_FORCE_STATIC_EXECUTABLE := true | 
 | 64 | LOCAL_SHARED_LIBRARIES := libcutils liblog libc | 
 | 65 |  | 
| Elliott Hughes | cb7aae1 | 2014-07-09 16:41:04 -0700 | [diff] [blame] | 66 | # The arm emulator has VFP but not VFPv3-D32. | 
 | 67 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) | 
 | 68 | LOCAL_ASFLAGS_arm += -DHAS_VFP_D32 | 
 | 69 | endif | 
 | 70 |  | 
| Colin Cross | 87a6b1d | 2014-03-21 16:58:30 -0700 | [diff] [blame] | 71 | LOCAL_MODULE := crasher | 
 | 72 | LOCAL_MODULE_STEM_32 := crasher | 
 | 73 | LOCAL_MODULE_STEM_64 := crasher64 | 
 | 74 | LOCAL_MULTILIB := both | 
 | 75 |  | 
 | 76 | include $(BUILD_EXECUTABLE) | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 77 |  | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 78 | debuggerd_test_src_files := \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 79 |     utility.cpp \ | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 80 |     test/dump_maps_test.cpp \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 81 |     test/dump_memory_test.cpp \ | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 82 |     test/elf_fake.cpp \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 83 |     test/log_fake.cpp \ | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 84 |     test/property_fake.cpp \ | 
 | 85 |     test/ptrace_fake.cpp \ | 
 | 86 |     test/selinux_fake.cpp \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 87 |  | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 88 | debuggerd_shared_libraries := \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 89 |     libbacktrace \ | 
 | 90 |     libbase \ | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 91 |     libcutils \ | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 92 |  | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 93 | debuggerd_c_includes := \ | 
 | 94 |     $(LOCAL_PATH)/test \ | 
 | 95 |  | 
 | 96 | debuggerd_cpp_flags := \ | 
 | 97 |     $(common_cppflags) \ | 
 | 98 |     -Wno-missing-field-initializers \ | 
 | 99 |  | 
 | 100 | # Only build the host tests on linux. | 
 | 101 | ifeq ($(HOST_OS),linux) | 
 | 102 |  | 
 | 103 | include $(CLEAR_VARS) | 
 | 104 |  | 
 | 105 | LOCAL_MODULE := debuggerd_test | 
 | 106 | LOCAL_SRC_FILES := $(debuggerd_test_src_files) | 
 | 107 | LOCAL_SHARED_LIBRARIES := $(debuggerd_shared_libraries) | 
 | 108 | LOCAL_C_INCLUDES := $(debuggerd_c_includes) | 
 | 109 | LOCAL_CPPFLAGS := $(debuggerd_cpp_flags) | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 110 |  | 
 | 111 | LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 | 
 | 112 | LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 | 
 | 113 | LOCAL_MULTILIB := both | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 114 | include $(BUILD_HOST_NATIVE_TEST) | 
 | 115 |  | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 116 | endif | 
 | 117 |  | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 118 | include $(CLEAR_VARS) | 
 | 119 |  | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 120 | LOCAL_MODULE := debuggerd_test | 
| Christopher Ferris | 862fe02 | 2015-06-02 14:52:44 -0700 | [diff] [blame] | 121 | LOCAL_SRC_FILES := $(debuggerd_test_src_files) | 
 | 122 | LOCAL_SHARED_LIBRARIES := $(debuggerd_shared_libraries) | 
 | 123 | LOCAL_C_INCLUDES := $(debuggerd_c_includes) | 
 | 124 | LOCAL_CPPFLAGS := $(debuggerd_cpp_flags) | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 125 |  | 
 | 126 | LOCAL_MODULE_STEM_32 := $(LOCAL_MODULE)32 | 
 | 127 | LOCAL_MODULE_STEM_64 := $(LOCAL_MODULE)64 | 
 | 128 | LOCAL_MULTILIB := both | 
| Christopher Ferris | e8bc77e | 2015-05-22 14:26:13 -0700 | [diff] [blame] | 129 | include $(BUILD_NATIVE_TEST) |