2013-01-02 11:32:25 +08:00
|
|
|
{
|
|
|
|
'target_defaults': {
|
2014-02-06 15:26:25 +08:00
|
|
|
'variables': {
|
|
|
|
'deps': [
|
|
|
|
'dbus-1',
|
2015-10-28 02:46:37 +08:00
|
|
|
'libbrillo-<(libbase_ver)',
|
2014-02-06 15:26:25 +08:00
|
|
|
'libchrome-<(libbase_ver)',
|
|
|
|
]
|
|
|
|
},
|
|
|
|
'cflags_cc': [
|
|
|
|
'-fno-exceptions',
|
|
|
|
],
|
2013-01-02 11:32:25 +08:00
|
|
|
},
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'libmetrics_daemon',
|
|
|
|
'type': 'static_library',
|
2014-02-06 15:26:25 +08:00
|
|
|
'dependencies': [
|
|
|
|
'../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
|
2014-06-26 05:38:07 +08:00
|
|
|
'libupload_service',
|
|
|
|
'metrics_proto',
|
2014-02-06 15:26:25 +08:00
|
|
|
],
|
2013-01-02 11:32:25 +08:00
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lrootdev',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'sources': [
|
2014-02-27 03:53:16 +08:00
|
|
|
'persistent_integer.cc',
|
2013-01-02 11:32:25 +08:00
|
|
|
'metrics_daemon.cc',
|
|
|
|
'metrics_daemon_main.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
'include_dirs': ['.'],
|
2013-01-02 11:32:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'metrics_client',
|
|
|
|
'type': 'executable',
|
2014-02-06 15:26:25 +08:00
|
|
|
'dependencies': [
|
|
|
|
'../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
|
|
|
|
],
|
2013-01-02 11:32:25 +08:00
|
|
|
'sources': [
|
|
|
|
'metrics_client.cc',
|
|
|
|
]
|
|
|
|
},
|
2014-06-26 05:38:07 +08:00
|
|
|
{
|
|
|
|
'target_name': 'libupload_service',
|
|
|
|
'type': 'static_library',
|
|
|
|
'dependencies': [
|
2014-07-10 07:34:29 +08:00
|
|
|
'metrics_proto',
|
|
|
|
'../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lvboot_host',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'variables': {
|
|
|
|
'exported_deps': [
|
|
|
|
'protobuf-lite',
|
|
|
|
],
|
|
|
|
'deps': [
|
|
|
|
'<@(exported_deps)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
'all_dependent_settings': {
|
|
|
|
'variables': {
|
|
|
|
'deps+': [
|
|
|
|
'<@(exported_deps)',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
'sources': [
|
|
|
|
'uploader/upload_service.cc',
|
2014-12-12 01:48:46 +08:00
|
|
|
'uploader/metrics_hashes.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
'uploader/metrics_log.cc',
|
2014-12-12 01:48:46 +08:00
|
|
|
'uploader/metrics_log_base.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
'uploader/system_profile_cache.cc',
|
2014-09-05 07:16:28 +08:00
|
|
|
'uploader/sender_http.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
'include_dirs': ['.']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'metrics_proto',
|
|
|
|
'type': 'static_library',
|
|
|
|
'variables': {
|
2015-07-17 08:16:51 +08:00
|
|
|
'proto_in_dir': 'uploader/proto',
|
|
|
|
'proto_out_dir': 'include/metrics/uploader/proto',
|
2014-06-26 05:38:07 +08:00
|
|
|
},
|
|
|
|
'sources': [
|
|
|
|
'<(proto_in_dir)/chrome_user_metrics_extension.proto',
|
|
|
|
'<(proto_in_dir)/histogram_event.proto',
|
|
|
|
'<(proto_in_dir)/system_profile.proto',
|
|
|
|
'<(proto_in_dir)/user_action_event.proto',
|
|
|
|
],
|
|
|
|
'includes': [
|
2014-09-25 02:09:43 +08:00
|
|
|
'../common-mk/protoc.gypi'
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
},
|
2013-01-02 11:32:25 +08:00
|
|
|
],
|
|
|
|
'conditions': [
|
2013-11-19 06:35:09 +08:00
|
|
|
['USE_passive_metrics == 1', {
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'metrics_daemon',
|
|
|
|
'type': 'executable',
|
|
|
|
'dependencies': ['libmetrics_daemon'],
|
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2013-01-02 11:32:25 +08:00
|
|
|
['USE_test == 1', {
|
|
|
|
'targets': [
|
2014-03-15 05:17:52 +08:00
|
|
|
{
|
|
|
|
'target_name': 'persistent_integer_test',
|
|
|
|
'type': 'executable',
|
2014-09-25 02:09:43 +08:00
|
|
|
'includes': ['../common-mk/common_test.gypi'],
|
2014-03-15 05:17:52 +08:00
|
|
|
'sources': [
|
|
|
|
'persistent_integer.cc',
|
|
|
|
'persistent_integer_test.cc',
|
|
|
|
]
|
|
|
|
},
|
2013-01-02 11:32:25 +08:00
|
|
|
{
|
|
|
|
'target_name': 'metrics_library_test',
|
|
|
|
'type': 'executable',
|
2014-02-06 15:26:25 +08:00
|
|
|
'dependencies': [
|
|
|
|
'../metrics/libmetrics-<(libbase_ver).gyp:libmetrics-<(libbase_ver)',
|
|
|
|
],
|
2014-09-25 02:09:43 +08:00
|
|
|
'includes': ['../common-mk/common_test.gypi'],
|
2013-01-02 11:32:25 +08:00
|
|
|
'sources': [
|
|
|
|
'metrics_library_test.cc',
|
2014-12-12 01:48:46 +08:00
|
|
|
'serialization/serialization_utils_unittest.cc',
|
2014-06-05 04:08:52 +08:00
|
|
|
],
|
|
|
|
'link_settings': {
|
|
|
|
'libraries': [
|
|
|
|
'-lpolicy-<(libbase_ver)',
|
|
|
|
]
|
|
|
|
}
|
2013-01-02 11:32:25 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
'target_name': 'timer_test',
|
|
|
|
'type': 'executable',
|
2014-09-25 02:09:43 +08:00
|
|
|
'includes': ['../common-mk/common_test.gypi'],
|
2013-01-02 11:32:25 +08:00
|
|
|
'sources': [
|
|
|
|
'timer.cc',
|
|
|
|
'timer_test.cc',
|
|
|
|
]
|
|
|
|
},
|
2014-06-26 05:38:07 +08:00
|
|
|
{
|
|
|
|
'target_name': 'upload_service_test',
|
|
|
|
'type': 'executable',
|
|
|
|
'sources': [
|
|
|
|
'persistent_integer.cc',
|
2014-12-12 01:48:46 +08:00
|
|
|
'uploader/metrics_hashes_unittest.cc',
|
|
|
|
'uploader/metrics_log_base_unittest.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
'uploader/mock/sender_mock.cc',
|
|
|
|
'uploader/upload_service_test.cc',
|
|
|
|
],
|
|
|
|
'dependencies': [
|
|
|
|
'libupload_service',
|
|
|
|
],
|
|
|
|
'includes':[
|
2014-09-25 02:09:43 +08:00
|
|
|
'../common-mk/common_test.gypi',
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
'include_dirs': ['.']
|
|
|
|
},
|
2013-01-02 11:32:25 +08:00
|
|
|
],
|
|
|
|
}],
|
2013-11-19 06:35:09 +08:00
|
|
|
['USE_passive_metrics == 1 and USE_test == 1', {
|
|
|
|
'targets': [
|
|
|
|
{
|
|
|
|
'target_name': 'metrics_daemon_test',
|
|
|
|
'type': 'executable',
|
|
|
|
'dependencies': [
|
|
|
|
'libmetrics_daemon',
|
|
|
|
],
|
2014-09-25 02:09:43 +08:00
|
|
|
'includes': ['../common-mk/common_test.gypi'],
|
2013-11-19 06:35:09 +08:00
|
|
|
'sources': [
|
|
|
|
'metrics_daemon_test.cc',
|
2014-06-26 05:38:07 +08:00
|
|
|
],
|
|
|
|
'include_dirs': ['.'],
|
2013-11-19 06:35:09 +08:00
|
|
|
},
|
|
|
|
],
|
|
|
|
}],
|
2014-06-26 05:38:07 +08:00
|
|
|
]
|
2013-01-02 11:32:25 +08:00
|
|
|
}
|