Add metrics GYP file

BUG=chromium:220003
TEST=Run emerge-<board> -v platform2 with and without platform2 USE
flag on a range of boards plus the host

Change-Id: I44f15c31a8ac3917f3262912c43419a93652c0d8
Reviewed-on: https://gerrit.chromium.org/gerrit/40316
Tested-by: Liam McLoughlin <lmcloughlin@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Liam McLoughlin <lmcloughlin@chromium.org>
This commit is contained in:
Liam McLoughlin 2013-01-01 22:32:25 -05:00 committed by ChromeBot
parent a7ebeb3e8b
commit 3ebadf8785
1 changed files with 113 additions and 0 deletions

113
metrics/metrics.gyp Normal file
View File

@ -0,0 +1,113 @@
{
'target_defaults': {
'dependencies': [
'../libchromeos/libchromeos-<(libbase_ver).gyp:libchromeos-<(libbase_ver)',
],
'variables': {
'deps': [
'dbus-1',
'dbus-glib-1',
'glib-2.0',
'gobject-2.0',
'gthread-2.0',
'libchrome-<(libbase_ver)',
]
},
'cflags_cc': [
'-fno-exceptions',
],
},
'targets': [
{
'target_name': 'metrics',
'type': 'static_library',
'sources': [
'c_metrics_library.cc',
'metrics_library.cc',
'timer.cc',
],
},
{
'target_name': 'libmetrics',
'type': 'shared_library',
'sources': [
'c_metrics_library.cc',
'metrics_library.cc',
'timer.cc',
],
},
{
'target_name': 'libmetrics_daemon',
'type': 'static_library',
'dependencies': ['libmetrics'],
'link_settings': {
'libraries': [
'-lrootdev',
'-lgflags',
],
},
'sources': [
'counter.cc',
'metrics_daemon.cc',
'metrics_daemon_main.cc',
]
},
{
'target_name': 'metrics_daemon',
'type': 'executable',
'dependencies': ['libmetrics_daemon'],
},
{
'target_name': 'metrics_client',
'type': 'executable',
'dependencies': ['libmetrics'],
'sources': [
'metrics_client.cc',
]
},
],
'conditions': [
['USE_test == 1', {
'targets': [
{
'target_name': 'metrics_library_test',
'type': 'executable',
'dependencies': ['libmetrics'],
'includes': ['../common-mk/common_test.gypi'],
'sources': [
'metrics_library_test.cc',
]
},
{
'target_name': 'metrics_daemon_test',
'type': 'executable',
'dependencies': [
'libmetrics_daemon',
],
'includes': ['../common-mk/common_test.gypi'],
'sources': [
'metrics_daemon_test.cc',
]
},
{
'target_name': 'counter_test',
'type': 'executable',
'includes': ['../common-mk/common_test.gypi'],
'sources': [
'counter.cc',
'counter_test.cc',
]
},
{
'target_name': 'timer_test',
'type': 'executable',
'includes': ['../common-mk/common_test.gypi'],
'sources': [
'timer.cc',
'timer_test.cc',
]
},
],
}],
],
}