Android.mk 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. # Copyright 2012 Google LLC
  2. #
  3. # Redistribution and use in source and binary forms, with or without
  4. # modification, are permitted provided that the following conditions are
  5. # met:
  6. #
  7. # * Redistributions of source code must retain the above copyright
  8. # notice, this list of conditions and the following disclaimer.
  9. # * Redistributions in binary form must reproduce the above
  10. # copyright notice, this list of conditions and the following disclaimer
  11. # in the documentation and/or other materials provided with the
  12. # distribution.
  13. # * Neither the name of Google LLC nor the names of its
  14. # contributors may be used to endorse or promote products derived from
  15. # this software without specific prior written permission.
  16. #
  17. # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  18. # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  19. # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  20. # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  21. # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  22. # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  23. # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  24. # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  25. # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  26. # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  27. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  28. # ndk-build module definition for the Google Breakpad client library
  29. #
  30. # To use this file, do the following:
  31. #
  32. # 1/ Include this file from your own Android.mk, either directly
  33. # or with through the NDK's import-module function.
  34. #
  35. # 2/ Use the client static library in your project with:
  36. #
  37. # LOCAL_STATIC_LIBRARIES += breakpad_client
  38. #
  39. # 3/ In your source code, include "src/client/linux/exception_handler.h"
  40. # and use the Linux instructions to use it.
  41. #
  42. # This module works with either the STLport or GNU libstdc++, but you need
  43. # to select one in your Application.mk
  44. #
  45. # The top Google Breakpad directory.
  46. # We assume this Android.mk to be under 'android/google_breakpad'
  47. LOCAL_PATH := $(call my-dir)/../..
  48. # Defube the client library module, as a simple static library that
  49. # exports the right include path / linker flags to its users.
  50. include $(CLEAR_VARS)
  51. LOCAL_MODULE := breakpad_client
  52. LOCAL_CPP_EXTENSION := .cc
  53. # Breakpad uses inline ARM assembly that requires the library
  54. # to be built in ARM mode. Otherwise, the build will fail with
  55. # cryptic assembler messages like:
  56. # Compile++ thumb : google_breakpad_client <= crash_generation_client.cc
  57. # /tmp/cc8aMSoD.s: Assembler messages:
  58. # /tmp/cc8aMSoD.s:132: Error: invalid immediate: 288 is out of range
  59. # /tmp/cc8aMSoD.s:244: Error: invalid immediate: 296 is out of range
  60. LOCAL_ARM_MODE := arm
  61. # List of client source files, directly taken from Makefile.am
  62. LOCAL_SRC_FILES := \
  63. src/client/linux/crash_generation/crash_generation_client.cc \
  64. src/client/linux/dump_writer_common/thread_info.cc \
  65. src/client/linux/dump_writer_common/ucontext_reader.cc \
  66. src/client/linux/handler/exception_handler.cc \
  67. src/client/linux/handler/minidump_descriptor.cc \
  68. src/client/linux/log/log.cc \
  69. src/client/linux/microdump_writer/microdump_writer.cc \
  70. src/client/linux/minidump_writer/linux_dumper.cc \
  71. src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
  72. src/client/linux/minidump_writer/minidump_writer.cc \
  73. src/client/linux/minidump_writer/pe_file.cc \
  74. src/client/minidump_file_writer.cc \
  75. src/common/convert_UTF.cc \
  76. src/common/md5.cc \
  77. src/common/string_conversion.cc \
  78. src/common/linux/breakpad_getcontext.S \
  79. src/common/linux/elfutils.cc \
  80. src/common/linux/file_id.cc \
  81. src/common/linux/guid_creator.cc \
  82. src/common/linux/linux_libc_support.cc \
  83. src/common/linux/memory_mapped_file.cc \
  84. src/common/linux/safe_readlink.cc
  85. LOCAL_C_INCLUDES := $(LOCAL_PATH)/src/common/android/include \
  86. $(LOCAL_PATH)/src \
  87. $(LSS_PATH)
  88. LOCAL_EXPORT_C_INCLUDES := $(LOCAL_C_INCLUDES)
  89. LOCAL_EXPORT_LDLIBS := -llog
  90. include $(BUILD_STATIC_LIBRARY)
  91. # Done.