Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 1 | { |
| 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', |
Liam McLoughlin | b2c56e1 | 2013-11-05 20:58:18 +0000 | [diff] [blame] | 33 | 'cflags': [ |
| 34 | '-fvisibility=default', |
| 35 | ], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 36 | 'sources': [ |
| 37 | 'c_metrics_library.cc', |
| 38 | 'metrics_library.cc', |
| 39 | 'timer.cc', |
| 40 | ], |
| 41 | }, |
| 42 | { |
| 43 | 'target_name': 'libmetrics_daemon', |
| 44 | 'type': 'static_library', |
| 45 | 'dependencies': ['libmetrics'], |
| 46 | 'link_settings': { |
| 47 | 'libraries': [ |
| 48 | '-lrootdev', |
| 49 | '-lgflags', |
| 50 | ], |
| 51 | }, |
| 52 | 'sources': [ |
| 53 | 'counter.cc', |
| 54 | 'metrics_daemon.cc', |
| 55 | 'metrics_daemon_main.cc', |
| 56 | ] |
| 57 | }, |
| 58 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 59 | 'target_name': 'metrics_client', |
| 60 | 'type': 'executable', |
| 61 | 'dependencies': ['libmetrics'], |
| 62 | 'sources': [ |
| 63 | 'metrics_client.cc', |
| 64 | ] |
| 65 | }, |
| 66 | ], |
| 67 | 'conditions': [ |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 68 | ['USE_passive_metrics == 1', { |
| 69 | 'targets': [ |
| 70 | { |
| 71 | 'target_name': 'metrics_daemon', |
| 72 | 'type': 'executable', |
| 73 | 'dependencies': ['libmetrics_daemon'], |
| 74 | }, |
| 75 | ], |
| 76 | }], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 77 | ['USE_test == 1', { |
| 78 | 'targets': [ |
| 79 | { |
| 80 | 'target_name': 'metrics_library_test', |
| 81 | 'type': 'executable', |
| 82 | 'dependencies': ['libmetrics'], |
| 83 | 'includes': ['../common-mk/common_test.gypi'], |
| 84 | 'sources': [ |
| 85 | 'metrics_library_test.cc', |
| 86 | ] |
| 87 | }, |
| 88 | { |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 89 | 'target_name': 'counter_test', |
| 90 | 'type': 'executable', |
| 91 | 'includes': ['../common-mk/common_test.gypi'], |
| 92 | 'sources': [ |
| 93 | 'counter.cc', |
| 94 | 'counter_test.cc', |
| 95 | ] |
| 96 | }, |
| 97 | { |
| 98 | 'target_name': 'timer_test', |
| 99 | 'type': 'executable', |
| 100 | 'includes': ['../common-mk/common_test.gypi'], |
| 101 | 'sources': [ |
| 102 | 'timer.cc', |
| 103 | 'timer_test.cc', |
| 104 | ] |
| 105 | }, |
| 106 | ], |
| 107 | }], |
Chris Masone | 33a1bae | 2013-11-18 14:35:09 -0800 | [diff] [blame] | 108 | ['USE_passive_metrics == 1 and USE_test == 1', { |
| 109 | 'targets': [ |
| 110 | { |
| 111 | 'target_name': 'metrics_daemon_test', |
| 112 | 'type': 'executable', |
| 113 | 'dependencies': [ |
| 114 | 'libmetrics_daemon', |
| 115 | ], |
| 116 | 'includes': ['../common-mk/common_test.gypi'], |
| 117 | 'sources': [ |
| 118 | 'metrics_daemon_test.cc', |
| 119 | ] |
| 120 | }, |
| 121 | ], |
| 122 | }], |
Liam McLoughlin | 3ebadf8 | 2013-01-01 22:32:25 -0500 | [diff] [blame] | 123 | ], |
| 124 | } |