1# Copyright 2014 Google Inc. All rights reserved. 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 Inc. 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 29{ 30 'target_defaults': { 31 'target_conditions': [ 32 ['OS=="mac"', { 33 'defines': ['HAVE_MACH_O_NLIST_H'], 34 }], 35 ['OS=="linux"', { 36 # Assume glibc. 37 'defines': ['HAVE_A_OUT_H', 'HAVE_GETCONTEXT'], 38 'sources!': [ 39 'linux/breakpad_getcontext.S', 40 'linux/breakpad_getcontext.h', 41 'linux/breakpad_getcontext_unittest.cc', 42 ], 43 }], 44 ['OS!="android"', {'sources/': [['exclude', '(^|/)android/']]}], 45 ['OS!="linux"', {'sources/': [['exclude', '(^|/)linux/']]}], 46 ['OS!="mac"', {'sources/': [['exclude', '(^|/)mac/']]}], 47 ['OS!="solaris"', {'sources/': [['exclude', '(^|/)solaris/']]}], 48 ['OS!="win"', {'sources/': [['exclude', '(^|/)windows/']]}], 49 ], 50 }, 51 'targets': [ 52 { 53 'target_name': 'common', 54 'type': 'static_library', 55 'sources': [ 56 'android/include/elf.h', 57 'android/include/link.h', 58 'android/include/stab.h', 59 'android/include/sys/procfs.h', 60 'android/include/sys/user.h', 61 'android/testing/include/wchar.h', 62 'android/testing/mkdtemp.h', 63 'android/testing/pthread_fixes.h', 64 'android/ucontext_constants.h', 65 'basictypes.h', 66 'byte_cursor.h', 67 'convert_UTF.cc', 68 'convert_UTF.h', 69 'dwarf/bytereader-inl.h', 70 'dwarf/bytereader.cc', 71 'dwarf/bytereader.h', 72 'dwarf/cfi_assembler.cc', 73 'dwarf/cfi_assembler.h', 74 'dwarf/dwarf2diehandler.cc', 75 'dwarf/dwarf2diehandler.h', 76 'dwarf/dwarf2enums.h', 77 'dwarf/dwarf2reader.cc', 78 'dwarf/dwarf2reader.h', 79 'dwarf/dwarf2reader_test_common.h', 80 'dwarf/elf_reader.cc', 81 'dwarf/elf_reader.h', 82 'dwarf/functioninfo.cc', 83 'dwarf/functioninfo.h', 84 'dwarf/line_state_machine.h', 85 'dwarf/types.h', 86 'dwarf_cfi_to_module.cc', 87 'dwarf_cfi_to_module.h', 88 'dwarf_cu_to_module.cc', 89 'dwarf_cu_to_module.h', 90 'dwarf_line_to_module.cc', 91 'dwarf_line_to_module.h', 92 'language.cc', 93 'language.h', 94 'linux/breakpad_getcontext.S', 95 'linux/breakpad_getcontext.h', 96 'linux/crc32.cc', 97 'linux/crc32.h', 98 'linux/dump_symbols.cc', 99 'linux/dump_symbols.h', 100 'linux/eintr_wrapper.h', 101 'linux/elf_core_dump.cc', 102 'linux/elf_core_dump.h', 103 'linux/elf_gnu_compat.h', 104 'linux/elf_symbols_to_module.cc', 105 'linux/elf_symbols_to_module.h', 106 'linux/elfutils-inl.h', 107 'linux/elfutils.cc', 108 'linux/elfutils.h', 109 'linux/file_id.cc', 110 'linux/file_id.h', 111 'linux/google_crashdump_uploader.cc', 112 'linux/google_crashdump_uploader.h', 113 'linux/guid_creator.cc', 114 'linux/guid_creator.h', 115 'linux/http_upload.cc', 116 'linux/http_upload.h', 117 'linux/ignore_ret.h', 118 'linux/libcurl_wrapper.cc', 119 'linux/libcurl_wrapper.h', 120 'linux/linux_libc_support.cc', 121 'linux/linux_libc_support.h', 122 'linux/memory_mapped_file.cc', 123 'linux/memory_mapped_file.h', 124 'linux/safe_readlink.cc', 125 'linux/safe_readlink.h', 126 'linux/symbol_collector_client.cc', 127 'linux/symbol_collector_client.h', 128 'linux/synth_elf.cc', 129 'linux/synth_elf.h', 130 'long_string_dictionary.cc', 131 'long_string_dictionary.h', 132 'mac/arch_utilities.cc', 133 'mac/arch_utilities.h', 134 'mac/bootstrap_compat.cc', 135 'mac/bootstrap_compat.h', 136 'mac/byteswap.h', 137 'mac/dump_syms.h', 138 'mac/dump_syms.cc', 139 'mac/file_id.cc', 140 'mac/file_id.h', 141 'mac/GTMDefines.h', 142 'mac/GTMLogger.h', 143 'mac/GTMLogger.m', 144 'mac/HTTPMultipartUpload.h', 145 'mac/HTTPMultipartUpload.m', 146 'mac/MachIPC.h', 147 'mac/MachIPC.mm', 148 'mac/macho_id.cc', 149 'mac/macho_id.h', 150 'mac/macho_reader.cc', 151 'mac/macho_reader.h', 152 'mac/macho_utilities.cc', 153 'mac/macho_utilities.h', 154 'mac/macho_walker.cc', 155 'mac/macho_walker.h', 156 'mac/scoped_task_suspend-inl.h', 157 'mac/string_utilities.cc', 158 'mac/string_utilities.h', 159 'mac/super_fat_arch.h', 160 'md5.cc', 161 'md5.h', 162 'memory_allocator.h', 163 'memory_range.h', 164 'module.cc', 165 'module.h', 166 'scoped_ptr.h', 167 'simple_string_dictionary.cc', 168 'simple_string_dictionary.h', 169 'solaris/dump_symbols.cc', 170 'solaris/dump_symbols.h', 171 'solaris/file_id.cc', 172 'solaris/file_id.h', 173 'solaris/guid_creator.cc', 174 'solaris/guid_creator.h', 175 'solaris/message_output.h', 176 'stabs_reader.cc', 177 'stabs_reader.h', 178 'stabs_to_module.cc', 179 'stabs_to_module.h', 180 'string_conversion.cc', 181 'string_conversion.h', 182 'symbol_data.h', 183 'test_assembler.cc', 184 'test_assembler.h', 185 'unordered.h', 186 'using_std_string.h', 187 'windows/common_windows.gyp', 188 'windows/dia_util.cc', 189 'windows/dia_util.h', 190 'windows/guid_string.cc', 191 'windows/guid_string.h', 192 'windows/http_upload.cc', 193 'windows/http_upload.h', 194 'windows/omap.cc', 195 'windows/omap.h', 196 'windows/omap_internal.h', 197 'windows/pdb_source_line_writer.cc', 198 'windows/pdb_source_line_writer.h', 199 'windows/string_utils-inl.h', 200 'windows/string_utils.cc', 201 ], 202 'include_dirs': [ 203 '..', 204 ], 205 }, 206 { 207 'target_name': 'common_unittests', 208 'type': 'executable', 209 'sources': [ 210 'byte_cursor_unittest.cc', 211 'dwarf/bytereader_unittest.cc', 212 'dwarf/dwarf2diehandler_unittest.cc', 213 'dwarf/dwarf2reader_cfi_unittest.cc', 214 'dwarf/dwarf2reader_die_unittest.cc', 215 'dwarf_cfi_to_module_unittest.cc', 216 'dwarf_cu_to_module_unittest.cc', 217 'dwarf_line_to_module_unittest.cc', 218 'linux/breakpad_getcontext_unittest.cc', 219 'linux/dump_symbols_unittest.cc', 220 'linux/elf_core_dump_unittest.cc', 221 'linux/elf_symbols_to_module_unittest.cc', 222 'linux/file_id_unittest.cc', 223 'linux/google_crashdump_uploader_test.cc', 224 'linux/linux_libc_support_unittest.cc', 225 'linux/memory_mapped_file_unittest.cc', 226 'linux/safe_readlink_unittest.cc', 227 'linux/synth_elf_unittest.cc', 228 'linux/tests/auto_testfile.h', 229 'linux/tests/crash_generator.cc', 230 'linux/tests/crash_generator.h', 231 'long_string_dictionary_unittest.cc', 232 'mac/macho_reader_unittest.cc', 233 'memory_allocator_unittest.cc', 234 'memory_range_unittest.cc', 235 'module_unittest.cc', 236 'simple_string_dictionary_unittest.cc', 237 'stabs_reader_unittest.cc', 238 'stabs_to_module_unittest.cc', 239 'string_conversion_unittest.cc', 240 'test_assembler_unittest.cc', 241 'tests/auto_tempdir.h', 242 'tests/file_utils.cc', 243 'tests/file_utils.h', 244 'windows/omap_unittest.cc', 245 ], 246 'include_dirs': [ 247 '..', 248 ], 249 'dependencies': [ 250 'common', 251 '../build/testing.gyp:gmock_main', 252 '../build/testing.gyp:gmock', 253 '../build/testing.gyp:gtest', 254 ], 255 'libraries': [ 256 '-ldl', 257 ], 258 }, 259 ], 260} 261