From 3ebadf8785557efb6f1130c12df25eee454cba51 Mon Sep 17 00:00:00 2001 From: Liam McLoughlin Date: Tue, 1 Jan 2013 22:32:25 -0500 Subject: [PATCH] Add metrics GYP file BUG=chromium:220003 TEST=Run emerge- -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 Reviewed-by: Mike Frysinger Commit-Queue: Liam McLoughlin --- metrics/metrics.gyp | 113 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 metrics/metrics.gyp diff --git a/metrics/metrics.gyp b/metrics/metrics.gyp new file mode 100644 index 000000000..b2644ba23 --- /dev/null +++ b/metrics/metrics.gyp @@ -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', + ] + }, + ], + }], + ], +}