toolkit/crashreporter/google-breakpad/android/google_breakpad/Android.mk

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/crashreporter/google-breakpad/android/google_breakpad/Android.mk	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,104 @@
     1.4 +# Copyright (c) 2012, Google Inc.
     1.5 +# All rights reserved.
     1.6 +#
     1.7 +# Redistribution and use in source and binary forms, with or without
     1.8 +# modification, are permitted provided that the following conditions are
     1.9 +# met:
    1.10 +#
    1.11 +#     * Redistributions of source code must retain the above copyright
    1.12 +# notice, this list of conditions and the following disclaimer.
    1.13 +#     * Redistributions in binary form must reproduce the above
    1.14 +# copyright notice, this list of conditions and the following disclaimer
    1.15 +# in the documentation and/or other materials provided with the
    1.16 +# distribution.
    1.17 +#     * Neither the name of Google Inc. nor the names of its
    1.18 +# contributors may be used to endorse or promote products derived from
    1.19 +# this software without specific prior written permission.
    1.20 +#
    1.21 +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    1.22 +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    1.23 +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    1.24 +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
    1.25 +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    1.26 +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    1.27 +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
    1.28 +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    1.29 +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    1.30 +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    1.31 +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    1.32 +
    1.33 +# ndk-build module definition for the Google Breakpad client library
    1.34 +#
    1.35 +# To use this file, do the following:
    1.36 +#
    1.37 +#   1/ Include this file from your own Android.mk, either directly
    1.38 +#      or with through the NDK's import-module function.
    1.39 +#
    1.40 +#   2/ Use the client static library in your project with:
    1.41 +#
    1.42 +#      LOCAL_STATIC_LIBRARIES += breakpad_client
    1.43 +#
    1.44 +#   3/ In your source code, include "src/client/linux/exception_handler.h"
    1.45 +#      and use the Linux instructions to use it.
    1.46 +#
    1.47 +# This module works with either the STLport or GNU libstdc++, but you need
    1.48 +# to select one in your Application.mk
    1.49 +#
    1.50 +
    1.51 +# Sanity check. We can only build for ARM for now.
    1.52 +ifneq (,$(filter-out armeabi armeabi-v7a x86,$(TARGET_ARCH_ABI)))
    1.53 +$(error Sorry, Google Breakpad only works on Android ARM and x86 for now!)
    1.54 +endif
    1.55 +
    1.56 +# The top Google Breakpad directory.
    1.57 +# We assume this Android.mk to be under 'android/google_breakpad'
    1.58 +
    1.59 +LOCAL_PATH := $(call my-dir)/../..
    1.60 +
    1.61 +# Defube the client library module, as a simple static library that
    1.62 +# exports the right include path / linker flags to its users.
    1.63 +
    1.64 +include $(CLEAR_VARS)
    1.65 +
    1.66 +LOCAL_MODULE := breakpad_client
    1.67 +
    1.68 +LOCAL_CPP_EXTENSION := .cc
    1.69 +
    1.70 +# Breakpad uses inline ARM assembly that requires the library
    1.71 +# to be built in ARM mode. Otherwise, the build will fail with
    1.72 +# cryptic assembler messages like:
    1.73 +#   Compile++ thumb  : google_breakpad_client <= crash_generation_client.cc
    1.74 +#   /tmp/cc8aMSoD.s: Assembler messages:
    1.75 +#   /tmp/cc8aMSoD.s:132: Error: invalid immediate: 288 is out of range
    1.76 +#   /tmp/cc8aMSoD.s:244: Error: invalid immediate: 296 is out of range
    1.77 +LOCAL_ARM_MODE := arm
    1.78 +
    1.79 +# List of client source files, directly taken from Makefile.am
    1.80 +LOCAL_SRC_FILES := \
    1.81 +    src/client/linux/crash_generation/crash_generation_client.cc \
    1.82 +    src/client/linux/handler/exception_handler.cc \
    1.83 +    src/client/linux/handler/minidump_descriptor.cc \
    1.84 +    src/client/linux/log/log.cc \
    1.85 +    src/client/linux/minidump_writer/linux_dumper.cc \
    1.86 +    src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
    1.87 +    src/client/linux/minidump_writer/minidump_writer.cc \
    1.88 +    src/client/minidump_file_writer.cc \
    1.89 +    src/common/android/breakpad_getcontext.S \
    1.90 +    src/common/convert_UTF.c \
    1.91 +    src/common/md5.cc src/common/string_conversion.cc \
    1.92 +    src/common/linux/elfutils.cc \
    1.93 +    src/common/linux/file_id.cc \
    1.94 +    src/common/linux/guid_creator.cc \
    1.95 +    src/common/linux/linux_libc_support.cc \
    1.96 +    src/common/linux/memory_mapped_file.cc \
    1.97 +    src/common/linux/safe_readlink.cc
    1.98 +
    1.99 +LOCAL_C_INCLUDES        := $(LOCAL_PATH)/src/common/android/include \
   1.100 +                           $(LOCAL_PATH)/src
   1.101 +
   1.102 +LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
   1.103 +LOCAL_EXPORT_LDLIBS     := -llog
   1.104 +
   1.105 +include $(BUILD_STATIC_LIBRARY)
   1.106 +
   1.107 +# Done.
   1.108 \ No newline at end of file

mercurial