1{ 2 'target_defaults': { 3 'variables': { 4 'deps': [ 5 'libchrome-<(libbase_ver)', 6 'openssl', 7 'protobuf', 8 ], 9 }, 10 'include_dirs': [ 11 'compat/cros', 12 '.', 13 ], 14 }, 15 'targets': [ 16 { 17 'target_name': 'common', 18 'type': 'static_library', 19 'sources': [ 20 'address_mapper.cc', 21 'binary_data_utils.cc', 22 'buffer_reader.cc', 23 'buffer_writer.cc', 24 'compat/log_level.cc', 25 'data_reader.cc', 26 'data_writer.cc', 27 'dso.cc', 28 'file_reader.cc', 29 'file_utils.cc', 30 'huge_page_deducer.cc', 31 'perf_data_utils.cc', 32 'perf_option_parser.cc', 33 'perf_parser.cc', 34 'perf_protobuf_io.cc', 35 'perf_reader.cc', 36 'perf_recorder.cc', 37 'perf_serializer.cc', 38 'perf_stat_parser.cc', 39 'run_command.cc', 40 'sample_info_reader.cc', 41 'scoped_temp_path.cc', 42 'string_utils.cc', 43 ], 44 'dependencies': [ 45 'perf_data_proto', 46 'perf_stat_proto', 47 ], 48 'export_dependent_settings': [ 49 'perf_data_proto', 50 'perf_stat_proto', 51 ], 52 'link_settings': { 53 'libraries': ['-lelf'], 54 }, 55 }, 56 { 57 'target_name': 'conversion_utils', 58 'type': 'static_library', 59 'sources': [ 60 'conversion_utils.cc', 61 ], 62 'dependencies': [ 63 'common', 64 ], 65 }, 66 { 67 'target_name': 'common_test', 68 'type': 'static_library', 69 'sources': [ 70 'dso_test_utils.cc', 71 'perf_test_files.cc', 72 'test_perf_data.cc', 73 'test_utils.cc', 74 ], 75 'dependencies': [ 76 'common', 77 ], 78 'export_dependent_settings': [ 79 'common', 80 ], 81 }, 82 { 83 'target_name': 'perf_data_proto', 84 'type': 'static_library', 85 'variables': { 86 'proto_in_dir': '.', 87 'proto_out_dir': 'include', 88 }, 89 'sources': [ 90 '<(proto_in_dir)/perf_data.proto', 91 ], 92 'includes': ['../common-mk/protoc.gypi'], 93 }, 94 { 95 'target_name': 'perf_stat_proto', 96 'type': 'static_library', 97 'variables': { 98 'proto_in_dir': '.', 99 'proto_out_dir': 'include', 100 }, 101 'sources': [ 102 '<(proto_in_dir)/perf_stat.proto', 103 ], 104 'includes': ['../common-mk/protoc.gypi'], 105 }, 106 { 107 'target_name': 'quipper', 108 'type': 'executable', 109 'dependencies': [ 110 'common', 111 ], 112 'sources': [ 113 'quipper.cc', 114 ], 115 }, 116 { 117 'target_name': 'perf_converter', 118 'type': 'executable', 119 'dependencies': [ 120 'common', 121 'conversion_utils', 122 ], 123 'sources': [ 124 'perf_converter.cc', 125 ], 126 }, 127 ], 128 'conditions': [ 129 ['USE_test == 1', { 130 'targets': [ 131 { 132 'target_name': 'integration_tests', 133 'type': 'executable', 134 'dependencies': [ 135 'common', 136 'common_test', 137 'conversion_utils', 138 ], 139 'includes': ['../common-mk/common_test.gypi'], 140 'sources': [ 141 'conversion_utils_test.cc', 142 'test_runner.cc', 143 ], 144 }, 145 { 146 'target_name': 'perf_recorder_test', 147 'type': 'executable', 148 'dependencies': [ 149 'common', 150 'common_test', 151 ], 152 'includes': ['../common-mk/common_test.gypi'], 153 'sources': [ 154 'perf_recorder_test.cc', 155 ], 156 }, 157 { 158 'target_name': 'unit_tests', 159 'type': 'executable', 160 'dependencies': [ 161 'common', 162 'common_test', 163 ], 164 'includes': ['../common-mk/common_test.gypi'], 165 'sources': [ 166 'address_mapper_test.cc', 167 'binary_data_utils_test.cc', 168 'buffer_reader_test.cc', 169 'buffer_writer_test.cc', 170 'dso_test.cc', 171 'file_reader_test.cc', 172 'huge_page_deducer_test.cc', 173 'perf_data_utils_test.cc', 174 'perf_option_parser_test.cc', 175 'perf_parser_test.cc', 176 'perf_reader_test.cc', 177 'perf_serializer_test.cc', 178 'perf_stat_parser_test.cc', 179 'run_command_test.cc', 180 'sample_info_reader_test.cc', 181 'scoped_temp_path_test.cc', 182 'test_runner.cc', 183 ], 184 'variables': { 185 'deps': [ 186 'libcap', 187 ], 188 }, 189 }, 190 ], 191 }], 192 ], 193} 194