blob: 67e7c379d7df9781f71f88ff5e5b5b173802f19c [file] [log] [blame]
Liam McLoughlin3ebadf82013-01-01 22:32:25 -05001{
2 'target_defaults': {
3 'dependencies': [
4 '../libchromeos/libchromeos-<(libbase_ver).gyp:libchromeos-<(libbase_ver)',
5 ],
6 'variables': {
7 'deps': [
8 'dbus-1',
9 'dbus-glib-1',
10 'glib-2.0',
11 'gobject-2.0',
12 'gthread-2.0',
13 'libchrome-<(libbase_ver)',
14 ]
15 },
16 'cflags_cc': [
17 '-fno-exceptions',
18 ],
19 },
20 'targets': [
21 {
22 'target_name': 'metrics',
23 'type': 'static_library',
24 'sources': [
25 'c_metrics_library.cc',
26 'metrics_library.cc',
27 'timer.cc',
28 ],
29 },
30 {
31 'target_name': 'libmetrics',
32 'type': 'shared_library',
33 'sources': [
34 'c_metrics_library.cc',
35 'metrics_library.cc',
36 'timer.cc',
37 ],
38 },
39 {
40 'target_name': 'libmetrics_daemon',
41 'type': 'static_library',
42 'dependencies': ['libmetrics'],
43 'link_settings': {
44 'libraries': [
45 '-lrootdev',
46 '-lgflags',
47 ],
48 },
49 'sources': [
50 'counter.cc',
51 'metrics_daemon.cc',
52 'metrics_daemon_main.cc',
53 ]
54 },
55 {
Liam McLoughlin3ebadf82013-01-01 22:32:25 -050056 'target_name': 'metrics_client',
57 'type': 'executable',
58 'dependencies': ['libmetrics'],
59 'sources': [
60 'metrics_client.cc',
61 ]
62 },
63 ],
64 'conditions': [
Chris Masone33a1bae2013-11-18 14:35:09 -080065 ['USE_passive_metrics == 1', {
66 'targets': [
67 {
68 'target_name': 'metrics_daemon',
69 'type': 'executable',
70 'dependencies': ['libmetrics_daemon'],
71 },
72 ],
73 }],
Liam McLoughlin3ebadf82013-01-01 22:32:25 -050074 ['USE_test == 1', {
75 'targets': [
76 {
77 'target_name': 'metrics_library_test',
78 'type': 'executable',
79 'dependencies': ['libmetrics'],
80 'includes': ['../common-mk/common_test.gypi'],
81 'sources': [
82 'metrics_library_test.cc',
83 ]
84 },
85 {
Liam McLoughlin3ebadf82013-01-01 22:32:25 -050086 'target_name': 'counter_test',
87 'type': 'executable',
88 'includes': ['../common-mk/common_test.gypi'],
89 'sources': [
90 'counter.cc',
91 'counter_test.cc',
92 ]
93 },
94 {
95 'target_name': 'timer_test',
96 'type': 'executable',
97 'includes': ['../common-mk/common_test.gypi'],
98 'sources': [
99 'timer.cc',
100 'timer_test.cc',
101 ]
102 },
103 ],
104 }],
Chris Masone33a1bae2013-11-18 14:35:09 -0800105 ['USE_passive_metrics == 1 and USE_test == 1', {
106 'targets': [
107 {
108 'target_name': 'metrics_daemon_test',
109 'type': 'executable',
110 'dependencies': [
111 'libmetrics_daemon',
112 ],
113 'includes': ['../common-mk/common_test.gypi'],
114 'sources': [
115 'metrics_daemon_test.cc',
116 ]
117 },
118 ],
119 }],
Liam McLoughlin3ebadf82013-01-01 22:32:25 -0500120 ],
121}