Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 1 | { |
| 2 | 'target_defaults': { |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 3 | 'variables': { |
| 4 | 'deps': [ |
| 5 | 'dbus-1', |
Alex Vakulenko | 26aef37 | 2015-10-27 11:46:37 -0700 | [diff] [blame] | 6 | 'libbrillo-<(libbase_ver)', |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 7 | 'libchrome-<(libbase_ver)', |
| 8 | ] |
| 9 | }, |
| 10 | 'cflags_cc': [ |
| 11 | '-fno-exceptions', |
| 12 | ], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 13 | }, |
| 14 | 'targets': [ |
| 15 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 16 | 'target_name': 'libmetrics_daemon', |
| 17 | 'type': 'static_library', |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 18 | 'dependencies': [ |
| 19 | '../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 20 | 'libupload_service', |
| 21 | 'metrics_proto', |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 22 | ], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 23 | 'link_settings': { |
| 24 | 'libraries': [ |
| 25 | '-lrootdev', |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 26 | ], |
| 27 | }, |
| 28 | 'sources': [ |
Luigi Semenzato | 2fd51cc | 2014-02-26 11:53:16 -0800 | [diff] [blame] | 29 | 'persistent_integer.cc', |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 30 | 'metrics_daemon.cc', |
| 31 | 'metrics_daemon_main.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 32 | ], |
| 33 | 'include_dirs': ['.'], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 34 | }, |
| 35 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 36 | 'target_name': 'metrics_client', |
| 37 | 'type': 'executable', |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 38 | 'dependencies': [ |
| 39 | '../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)', |
| 40 | ], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 41 | 'sources': [ |
| 42 | 'metrics_client.cc', |
| 43 | ] |
| 44 | }, |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 45 | { |
| 46 | 'target_name': 'libupload_service', |
| 47 | 'type': 'static_library', |
| 48 | 'dependencies': [ |
Bertrand SIMONNET | d83ca80 | 2014-07-09 16:34:29 -0700 | [diff] [blame] | 49 | 'metrics_proto', |
| 50 | '../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 51 | ], |
| 52 | 'link_settings': { |
| 53 | 'libraries': [ |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 54 | '-lvboot_host', |
| 55 | ], |
| 56 | }, |
| 57 | 'variables': { |
| 58 | 'exported_deps': [ |
| 59 | 'protobuf-lite', |
| 60 | ], |
| 61 | 'deps': [ |
| 62 | '<@(exported_deps)', |
| 63 | ], |
| 64 | }, |
| 65 | 'all_dependent_settings': { |
| 66 | 'variables': { |
| 67 | 'deps+': [ |
| 68 | '<@(exported_deps)', |
| 69 | ], |
| 70 | }, |
| 71 | }, |
| 72 | 'sources': [ |
| 73 | 'uploader/upload_service.cc', |
Alex Vakulenko | 788d3b6 | 2014-12-11 09:48:46 -0800 | [diff] [blame] | 74 | 'uploader/metrics_hashes.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 75 | 'uploader/metrics_log.cc', |
Alex Vakulenko | 788d3b6 | 2014-12-11 09:48:46 -0800 | [diff] [blame] | 76 | 'uploader/metrics_log_base.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 77 | 'uploader/system_profile_cache.cc', |
Alex Vakulenko | ec991df | 2014-09-04 16:16:28 -0700 | [diff] [blame] | 78 | 'uploader/sender_http.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 79 | ], |
| 80 | 'include_dirs': ['.'] |
| 81 | }, |
| 82 | { |
| 83 | 'target_name': 'metrics_proto', |
| 84 | 'type': 'static_library', |
| 85 | 'variables': { |
Bertrand SIMONNET | c95440e | 2015-07-16 17:16:51 -0700 | [diff] [blame] | 86 | 'proto_in_dir': 'uploader/proto', |
| 87 | 'proto_out_dir': 'include/metrics/uploader/proto', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 88 | }, |
| 89 | 'sources': [ |
| 90 | '<(proto_in_dir)/chrome_user_metrics_extension.proto', |
| 91 | '<(proto_in_dir)/histogram_event.proto', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 92 | '<(proto_in_dir)/system_profile.proto', |
| 93 | '<(proto_in_dir)/user_action_event.proto', |
| 94 | ], |
| 95 | 'includes': [ |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 96 | '../common-mk/protoc.gypi' |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 97 | ], |
| 98 | }, |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 99 | ], |
| 100 | 'conditions': [ |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 101 | ['USE_passive_metrics == 1', { |
| 102 | 'targets': [ |
| 103 | { |
| 104 | 'target_name': 'metrics_daemon', |
| 105 | 'type': 'executable', |
| 106 | 'dependencies': ['libmetrics_daemon'], |
| 107 | }, |
| 108 | ], |
| 109 | }], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 110 | ['USE_test == 1', { |
| 111 | 'targets': [ |
| 112 | { |
Luigi Semenzato | 6c32006 | 2014-03-14 14:17:52 -0700 | [diff] [blame] | 113 | 'target_name': 'persistent_integer_test', |
| 114 | 'type': 'executable', |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 115 | 'includes': ['../common-mk/common_test.gypi'], |
Luigi Semenzato | 6c32006 | 2014-03-14 14:17:52 -0700 | [diff] [blame] | 116 | 'sources': [ |
| 117 | 'persistent_integer.cc', |
| 118 | 'persistent_integer_test.cc', |
| 119 | ] |
| 120 | }, |
| 121 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 122 | 'target_name': 'metrics_library_test', |
| 123 | 'type': 'executable', |
Ben Chan | 2e6543d | 2014-02-05 23:26:25 -0800 | [diff] [blame] | 124 | 'dependencies': [ |
| 125 | '../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)', |
| 126 | ], |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 127 | 'includes': ['../common-mk/common_test.gypi'], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 128 | 'sources': [ |
| 129 | 'metrics_library_test.cc', |
Alex Vakulenko | 788d3b6 | 2014-12-11 09:48:46 -0800 | [diff] [blame] | 130 | 'serialization/serialization_utils_unittest.cc', |
Bertrand SIMONNET | 4764f52 | 2014-06-04 13:08:52 -0700 | [diff] [blame] | 131 | ], |
| 132 | 'link_settings': { |
| 133 | 'libraries': [ |
| 134 | '-lpolicy-<(libbase_ver)', |
| 135 | ] |
| 136 | } |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 137 | }, |
| 138 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 139 | 'target_name': 'timer_test', |
| 140 | 'type': 'executable', |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 141 | 'includes': ['../common-mk/common_test.gypi'], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 142 | 'sources': [ |
| 143 | 'timer.cc', |
| 144 | 'timer_test.cc', |
| 145 | ] |
| 146 | }, |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 147 | { |
| 148 | 'target_name': 'upload_service_test', |
| 149 | 'type': 'executable', |
| 150 | 'sources': [ |
| 151 | 'persistent_integer.cc', |
Alex Vakulenko | 788d3b6 | 2014-12-11 09:48:46 -0800 | [diff] [blame] | 152 | 'uploader/metrics_hashes_unittest.cc', |
| 153 | 'uploader/metrics_log_base_unittest.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 154 | 'uploader/mock/sender_mock.cc', |
| 155 | 'uploader/upload_service_test.cc', |
| 156 | ], |
| 157 | 'dependencies': [ |
| 158 | 'libupload_service', |
| 159 | ], |
| 160 | 'includes':[ |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 161 | '../common-mk/common_test.gypi', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 162 | ], |
| 163 | 'include_dirs': ['.'] |
| 164 | }, |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 165 | ], |
| 166 | }], |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 167 | ['USE_passive_metrics == 1 and USE_test == 1', { |
| 168 | 'targets': [ |
| 169 | { |
| 170 | 'target_name': 'metrics_daemon_test', |
| 171 | 'type': 'executable', |
| 172 | 'dependencies': [ |
| 173 | 'libmetrics_daemon', |
| 174 | ], |
Alex Deymo | dfea2f8 | 2014-09-24 11:09:43 -0700 | [diff] [blame] | 175 | 'includes': ['../common-mk/common_test.gypi'], |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 176 | 'sources': [ |
| 177 | 'metrics_daemon_test.cc', |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 178 | ], |
| 179 | 'include_dirs': ['.'], |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 180 | }, |
| 181 | ], |
| 182 | }], |
Bertrand SIMONNET | 46b49da | 2014-06-25 14:38:07 -0700 | [diff] [blame] | 183 | ] |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 184 | } |