Home | History | Annotate | Download | only in google-breakpad
      1 # Copyright (C) 2015 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH := $(call my-dir)
     16 
     17 # Static library.
     18 # =================================================
     19 include $(CLEAR_VARS)
     20 
     21 LOCAL_MODULE := breakpad_client
     22 
     23 LOCAL_CPP_EXTENSION := .cc
     24 
     25 LOCAL_SRC_FILES := \
     26     src/client/linux/dump_writer_common/seccomp_unwinder.cc \
     27     src/client/linux/dump_writer_common/thread_info.cc \
     28     src/client/linux/dump_writer_common/ucontext_reader.cc \
     29     src/client/linux/handler/minidump_descriptor.cc \
     30     src/client/linux/minidump_writer/linux_core_dumper.cc \
     31     src/client/linux/minidump_writer/linux_dumper.cc \
     32     src/client/linux/minidump_writer/linux_ptrace_dumper.cc \
     33     src/client/linux/minidump_writer/minidump_writer.cc \
     34     src/client/minidump_file_writer.cc \
     35     src/common/convert_UTF.c \
     36     src/common/linux/elf_core_dump.cc \
     37     src/common/linux/elfutils.cc \
     38     src/common/linux/file_id.cc \
     39     src/common/linux/guid_creator.cc \
     40     src/common/linux/linux_libc_support.cc \
     41     src/common/linux/memory_mapped_file.cc \
     42     src/common/linux/safe_readlink.cc \
     43     src/common/string_conversion.cc \
     44 
     45 LOCAL_C_INCLUDES := \
     46     $(LOCAL_PATH)/src/common/android/include \
     47     $(LOCAL_PATH)/src \
     48 
     49 LOCAL_CFLAGS := \
     50     -Wno-unused-parameter \
     51     -Wno-tautological-compare
     52 
     53 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_C_INCLUDES)
     54 
     55 # Work around b/25435766 core2md segfault.
     56 LOCAL_CLANG_CFLAGS_x86 += -mno-stackrealign
     57 LOCAL_CLANG := true
     58 
     59 include $(BUILD_STATIC_LIBRARY)
     60 
     61 # core2md binary.
     62 # =================================================
     63 include $(CLEAR_VARS)
     64 
     65 LOCAL_MODULE := core2md
     66 
     67 LOCAL_CPP_EXTENSION := .cc
     68 
     69 LOCAL_SRC_FILES := src/tools/linux/core2md/core2md.cc
     70 
     71 LOCAL_STATIC_LIBRARIES := breakpad_client
     72 
     73 # Work around b/25435766 core2md segfault.
     74 LOCAL_CLANG_CFLAGS_x86 += -mno-stackrealign
     75 LOCAL_CLANG := true
     76 
     77 include $(BUILD_EXECUTABLE)
     78 
     79 # dump_syms host tool.
     80 # =================================================
     81 include $(CLEAR_VARS)
     82 LOCAL_MODULE := dump_syms
     83 LOCAL_MODULE_HOST_OS := linux
     84 LOCAL_CLANG := true
     85 LOCAL_CPPFLAGS_linux := -DHAVE_A_OUT_H -Wno-unused-parameter
     86 LOCAL_CPP_EXTENSION := .cc
     87 LOCAL_C_INCLUDES := \
     88     $(LOCAL_PATH)/src
     89 LOCAL_SRC_FILES := \
     90     src/common/dwarf/bytereader.cc \
     91     src/common/dwarf/dwarf2diehandler.cc \
     92     src/common/dwarf/dwarf2reader.cc \
     93     src/common/dwarf_cfi_to_module.cc \
     94     src/common/dwarf_cu_to_module.cc \
     95     src/common/dwarf_line_to_module.cc \
     96     src/common/language.cc \
     97     src/common/module.cc \
     98     src/common/stabs_reader.cc \
     99     src/common/stabs_to_module.cc
    100 LOCAL_SRC_FILES_linux := \
    101     src/common/linux/crc32.cc \
    102     src/common/linux/dump_symbols.cc \
    103     src/common/linux/elfutils.cc \
    104     src/common/linux/elf_symbols_to_module.cc \
    105     src/common/linux/file_id.cc \
    106     src/common/linux/linux_libc_support.cc \
    107     src/common/linux/memory_mapped_file.cc \
    108     src/tools/linux/dump_syms/dump_syms.cc
    109 include $(BUILD_HOST_EXECUTABLE)
    110 
    111 # sym_upload host tool.
    112 # =================================================
    113 include $(CLEAR_VARS)
    114 LOCAL_MODULE := sym_upload
    115 LOCAL_MODULE_HOST_OS := linux
    116 LOCAL_CLANG := true
    117 LOCAL_LDLIBS := -ldl
    118 LOCAL_CPP_EXTENSION := .cc
    119 LOCAL_C_INCLUDES := \
    120     $(LOCAL_PATH)/src
    121 LOCAL_SRC_FILES_linux := \
    122     src/common/linux/http_upload.cc \
    123     src/tools/linux/symupload/sym_upload.cc
    124 include $(BUILD_HOST_EXECUTABLE)
    125