Colin Cross | 579c9bc | 2014-02-12 22:32:07 -0800 | [diff] [blame^] | 1 | # Copyright 2005 The Android Open Source Project |
| 2 | |
| 3 | LOCAL_PATH:= $(call my-dir) |
| 4 | include $(CLEAR_VARS) |
| 5 | |
| 6 | LOCAL_SRC_FILES:= \ |
| 7 | backtrace.cpp \ |
| 8 | debuggerd.cpp \ |
| 9 | getevent.cpp \ |
| 10 | tombstone.cpp \ |
| 11 | utility.cpp \ |
| 12 | |
| 13 | LOCAL_SRC_FILES_arm := arm/machine.cpp |
| 14 | LOCAL_SRC_FILES_arm64 := arm64/machine.cpp |
| 15 | LOCAL_SRC_FILES_mips := mips/machine.cpp |
| 16 | LOCAL_SRC_FILES_x86 := x86/machine.cpp |
| 17 | LOCAL_SRC_FILES_x86_64 := x86_64/machine.cpp |
| 18 | |
| 19 | LOCAL_CONLYFLAGS := -std=gnu99 |
| 20 | LOCAL_CPPFLAGS := -std=gnu++11 |
| 21 | LOCAL_CFLAGS := \ |
| 22 | -Wall \ |
| 23 | -Wno-array-bounds \ |
| 24 | -Werror \ |
| 25 | -Wno-unused-parameter \ |
| 26 | |
| 27 | ifeq ($(ARCH_ARM_HAVE_VFP),true) |
| 28 | LOCAL_CFLAGS_arm += -DWITH_VFP |
| 29 | endif # ARCH_ARM_HAVE_VFP |
| 30 | ifeq ($(ARCH_ARM_HAVE_VFP_D32),true) |
| 31 | LOCAL_CFLAGS_arm += -DWITH_VFP_D32 |
| 32 | endif # ARCH_ARM_HAVE_VFP_D32 |
| 33 | |
| 34 | LOCAL_SHARED_LIBRARIES := \ |
| 35 | libbacktrace \ |
| 36 | libc \ |
| 37 | libcutils \ |
| 38 | liblog \ |
| 39 | libselinux \ |
| 40 | |
| 41 | include external/stlport/libstlport.mk |
| 42 | |
| 43 | ifeq ($(TARGET_IS_64_BIT)|$(debuggerd_2nd_arch_var_prefix),true|) |
| 44 | LOCAL_MODULE := debuggerd64 |
| 45 | LOCAL_NO_2ND_ARCH := true |
| 46 | else |
| 47 | LOCAL_MODULE := debuggerd |
| 48 | LOCAL_32_BIT_ONLY := true |
| 49 | endif |
| 50 | |
| 51 | include $(BUILD_EXECUTABLE) |
| 52 | |
| 53 | include $(CLEAR_VARS) |
| 54 | LOCAL_SRC_FILES := crasher.c |
| 55 | LOCAL_SRC_FILES_arm := arm/crashglue.S |
| 56 | LOCAL_SRC_FILES_arm64 := arm64/crashglue.S |
| 57 | LOCAL_SRC_FILES_mips := mips/crashglue.S |
| 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 |
| 62 | LOCAL_CFLAGS += -fstack-protector-all -Wno-unused-parameter -Wno-free-nonheap-object |
| 63 | #LOCAL_FORCE_STATIC_EXECUTABLE := true |
| 64 | LOCAL_SHARED_LIBRARIES := libcutils liblog libc |
| 65 | |
| 66 | LOCAL_2ND_ARCH_VAR_PREFIX := $(debuggerd_2nd_arch_var_prefix) |
| 67 | |
| 68 | ifeq ($(TARGET_IS_64_BIT)|$(debuggerd_2nd_arch_var_prefix),true|) |
| 69 | LOCAL_MODULE := crasher64 |
| 70 | LOCAL_NO_2ND_ARCH := true |
| 71 | else |
| 72 | LOCAL_MODULE := crasher |
| 73 | LOCAL_32_BIT_ONLY := true |
| 74 | endif |
| 75 | include $(BUILD_EXECUTABLE) |