blob: a9a0b1e877eda3973fc500ca81162cfdcefc8415 [file] [log] [blame]
Liam McLoughlin4f268f42013-03-04 18:09:53 -05001{
2 'target_defaults': {
3 'variables': {
4 'deps': [
5 'libchrome-<(libbase_ver)'
6 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -05007 },
8 'include_dirs': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -07009 '../libbrillo',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050010 ],
Alex Deymo94afaa42015-11-16 16:34:39 -030011 'defines': [
12 'USE_DBUS=<(USE_dbus)',
Alex Deymof68e8982016-01-05 21:20:10 -080013 'USE_RTTI_FOR_TYPE_TAGS',
Alex Deymo94afaa42015-11-16 16:34:39 -030014 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -050015 },
16 'targets': [
17 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -070018 'target_name': 'libbrillo-<(libbase_ver)',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050019 'type': 'none',
20 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -070021 'libbrillo-core-<(libbase_ver)',
22 'libbrillo-cryptohome-<(libbase_ver)',
23 'libbrillo-http-<(libbase_ver)',
24 'libbrillo-minijail-<(libbase_ver)',
25 'libbrillo-streams-<(libbase_ver)',
Thiemo Nagelce533da2016-10-24 14:53:14 +020026 'libinstallattributes-<(libbase_ver)',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050027 'libpolicy-<(libbase_ver)',
28 ],
29 'direct_dependent_settings': {
30 'include_dirs': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -070031 '../libbrillo',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050032 ],
33 },
Bertrand SIMONNET883c3e72014-06-04 13:22:47 -070034 'includes': ['../common-mk/deps.gypi'],
Liam McLoughlin4f268f42013-03-04 18:09:53 -050035 },
36 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -070037 'target_name': 'libbrillo-core-<(libbase_ver)',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050038 'type': 'shared_library',
39 'variables': {
40 'exported_deps': [
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -070041 ],
42 'conditions': [
43 ['USE_dbus == 1', {
44 'exported_deps': [
45 'dbus-1',
46 ],
47 }],
Liam McLoughlin4f268f42013-03-04 18:09:53 -050048 ],
49 'deps': ['<@(exported_deps)'],
50 },
51 'all_dependent_settings': {
52 'variables': {
53 'deps': [
54 '<@(exported_deps)',
55 ],
56 },
57 },
Bertrand SIMONNETf6ec4fc2015-07-15 14:14:19 -070058 'libraries': ['-lmodp_b64'],
Liam McLoughlin4f268f42013-03-04 18:09:53 -050059 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -070060 'brillo/asynchronous_signal_handler.cc',
61 'brillo/backoff_entry.cc',
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -070062 'brillo/daemons/daemon.cc',
63 'brillo/data_encoding.cc',
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -070064 'brillo/errors/error.cc',
65 'brillo/errors/error_codes.cc',
66 'brillo/file_utils.cc',
67 'brillo/flag_helper.cc',
68 'brillo/key_value_store.cc',
69 'brillo/message_loops/base_message_loop.cc',
70 'brillo/message_loops/message_loop.cc',
71 'brillo/message_loops/message_loop_utils.cc',
72 'brillo/mime_utils.cc',
73 'brillo/osrelease_reader.cc',
74 'brillo/process.cc',
75 'brillo/process_reaper.cc',
76 'brillo/process_information.cc',
77 'brillo/secure_blob.cc',
78 'brillo/strings/string_utils.cc',
79 'brillo/syslog_logging.cc',
80 'brillo/type_name_undecorate.cc',
81 'brillo/url_utils.cc',
82 'brillo/userdb_utils.cc',
Alex Vakulenkob57ecfa2016-01-28 14:41:20 -080083 'brillo/value_conversion.cc',
Liam McLoughlin4f268f42013-03-04 18:09:53 -050084 ],
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -070085 'conditions': [
86 ['USE_dbus == 1', {
87 'sources': [
88 'brillo/any.cc',
89 'brillo/daemons/dbus_daemon.cc',
90 'brillo/dbus/async_event_sequencer.cc',
91 'brillo/dbus/data_serialization.cc',
92 'brillo/dbus/dbus_connection.cc',
93 'brillo/dbus/dbus_method_invoker.cc',
94 'brillo/dbus/dbus_method_response.cc',
95 'brillo/dbus/dbus_object.cc',
96 'brillo/dbus/dbus_service_watcher.cc',
97 'brillo/dbus/dbus_signal.cc',
98 'brillo/dbus/exported_object_manager.cc',
99 'brillo/dbus/exported_property_set.cc',
100 'brillo/dbus/utils.cc',
101 ],
102 }],
103 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500104 },
105 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700106 'target_name': 'libbrillo-http-<(libbase_ver)',
Alex Vakulenkof788c952014-08-20 17:35:12 -0700107 'type': 'shared_library',
Alex Vakulenko80663bf2015-03-12 17:30:11 -0700108 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700109 'libbrillo-core-<(libbase_ver)',
110 'libbrillo-streams-<(libbase_ver)',
Alex Vakulenko80663bf2015-03-12 17:30:11 -0700111 ],
Alex Vakulenkof788c952014-08-20 17:35:12 -0700112 'variables': {
113 'exported_deps': [
114 'libcurl',
115 ],
116 'deps': ['<@(exported_deps)'],
117 },
118 'all_dependent_settings': {
119 'variables': {
120 'deps': [
121 '<@(exported_deps)',
122 ],
123 },
124 },
Alex Vakulenkof788c952014-08-20 17:35:12 -0700125 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700126 'brillo/http/curl_api.cc',
127 'brillo/http/http_connection_curl.cc',
128 'brillo/http/http_form_data.cc',
129 'brillo/http/http_request.cc',
130 'brillo/http/http_transport.cc',
131 'brillo/http/http_transport_curl.cc',
132 'brillo/http/http_utils.cc',
Alex Vakulenkof788c952014-08-20 17:35:12 -0700133 ],
134 },
135 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700136 'target_name': 'libbrillo-streams-<(libbase_ver)',
Alex Vakulenko1e582b32015-02-26 15:23:23 -0800137 'type': 'shared_library',
138 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700139 'libbrillo-core-<(libbase_ver)',
Alex Vakulenko1e582b32015-02-26 15:23:23 -0800140 ],
Alex Vakulenko7554ede2015-05-06 14:52:50 -0700141 'variables': {
142 'exported_deps': [
143 'openssl',
144 ],
145 'deps': ['<@(exported_deps)'],
146 },
147 'all_dependent_settings': {
148 'variables': {
149 'deps': [
150 '<@(exported_deps)',
151 ],
152 },
153 },
Alex Vakulenko1e582b32015-02-26 15:23:23 -0800154 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700155 'brillo/streams/file_stream.cc',
156 'brillo/streams/input_stream_set.cc',
157 'brillo/streams/memory_containers.cc',
158 'brillo/streams/memory_stream.cc',
159 'brillo/streams/openssl_stream_bio.cc',
160 'brillo/streams/stream.cc',
161 'brillo/streams/stream_errors.cc',
162 'brillo/streams/stream_utils.cc',
163 'brillo/streams/tls_stream.cc',
Alex Vakulenko1e582b32015-02-26 15:23:23 -0800164 ],
165 },
166 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700167 'target_name': 'libbrillo-test-<(libbase_ver)',
Alex Vakulenkof788c952014-08-20 17:35:12 -0700168 'type': 'static_library',
169 'standalone_static_library': 1,
170 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700171 'libbrillo-http-<(libbase_ver)',
Alex Vakulenkof788c952014-08-20 17:35:12 -0700172 ],
173 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700174 'brillo/http/http_connection_fake.cc',
175 'brillo/http/http_transport_fake.cc',
176 'brillo/message_loops/fake_message_loop.cc',
177 'brillo/streams/fake_stream.cc',
Alex Deymo37827b62016-03-29 15:56:29 -0700178 'brillo/unittest_utils.cc',
Alex Vakulenkof788c952014-08-20 17:35:12 -0700179 ],
180 'includes': ['../common-mk/deps.gypi'],
181 },
182 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700183 'target_name': 'libbrillo-cryptohome-<(libbase_ver)',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500184 'type': 'shared_library',
185 'variables': {
Daniel Erat15859412014-06-10 11:19:08 -0700186 'exported_deps': [
Daniel Erat15859412014-06-10 11:19:08 -0700187 'openssl',
188 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500189 'deps': ['<@(exported_deps)'],
190 },
191 'all_dependent_settings': {
192 'variables': {
193 'deps': [
194 '<@(exported_deps)',
195 ],
196 },
197 },
198 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700199 'brillo/cryptohome.cc',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500200 ],
201 },
202 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700203 'target_name': 'libbrillo-minijail-<(libbase_ver)',
Utkarsh Sanghid60f9ae2014-07-29 16:01:43 -0700204 'type': 'shared_library',
Bertrand SIMONNETd6143792015-08-13 14:27:05 -0700205 'variables': {
Bertrand SIMONNET92d2ceb2015-08-14 10:19:52 -0700206 'exported_deps': [
Bertrand SIMONNETd6143792015-08-13 14:27:05 -0700207 'libminijail',
208 ],
Bertrand SIMONNET92d2ceb2015-08-14 10:19:52 -0700209 'deps': ['<@(exported_deps)'],
210 },
211 'all_dependent_settings': {
212 'variables': {
213 'deps': [
214 '<@(exported_deps)',
215 ],
216 },
Bertrand SIMONNETd6143792015-08-13 14:27:05 -0700217 },
Utkarsh Sanghid60f9ae2014-07-29 16:01:43 -0700218 'cflags': [
219 '-fvisibility=default',
220 ],
221 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700222 'brillo/minijail/minijail.cc',
Utkarsh Sanghid60f9ae2014-07-29 16:01:43 -0700223 ],
224 },
225 {
Thiemo Nagelce533da2016-10-24 14:53:14 +0200226 'target_name': 'libinstallattributes-<(libbase_ver)',
227 'type': 'shared_library',
228 'dependencies': [
229 'libinstallattributes-includes',
230 '../common-mk/external_dependencies.gyp:install_attributes-proto',
231 ],
232 'variables': {
233 'exported_deps': [
234 'protobuf-lite',
235 ],
236 'deps': ['<@(exported_deps)'],
237 },
238 'all_dependent_settings': {
239 'variables': {
240 'deps': [
241 '<@(exported_deps)',
242 ],
243 },
244 },
245 'sources': [
246 'install_attributes/libinstallattributes.cc',
247 ],
248 },
249 {
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500250 'target_name': 'libpolicy-<(libbase_ver)',
251 'type': 'shared_library',
Chris Masone242ab242013-11-13 13:26:52 -0800252 'dependencies': [
Thiemo Nagelce533da2016-10-24 14:53:14 +0200253 'libinstallattributes-<(libbase_ver)',
Bertrand SIMONNET883c3e72014-06-04 13:22:47 -0700254 'libpolicy-includes',
255 '../common-mk/external_dependencies.gyp:policy-protos',
Chris Masone242ab242013-11-13 13:26:52 -0800256 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500257 'variables': {
258 'exported_deps': [
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500259 'openssl',
260 'protobuf-lite',
261 ],
262 'deps': ['<@(exported_deps)'],
263 },
264 'all_dependent_settings': {
265 'variables': {
266 'deps': [
267 '<@(exported_deps)',
268 ],
269 },
270 },
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500271 'ldflags': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700272 '-Wl,--version-script,<(platform2_root)/libbrillo/libpolicy.ver',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500273 ],
274 'sources': [
Alex Deymo3c8d4ab2015-09-02 17:15:00 -0700275 'policy/device_policy.cc',
276 'policy/device_policy_impl.cc',
277 'policy/libpolicy.cc',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500278 ],
279 },
Bertrand SIMONNET211054c2014-06-24 16:33:32 -0700280 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700281 'target_name': 'libbrillo-glib-<(libbase_ver)',
Christopher Wiley8065d312015-07-08 13:11:21 -0700282 'type': 'shared_library',
283 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700284 'libbrillo-<(libbase_ver)',
Christopher Wiley8065d312015-07-08 13:11:21 -0700285 ],
286 'variables': {
287 'exported_deps': [
Christopher Wiley8065d312015-07-08 13:11:21 -0700288 'glib-2.0',
289 'gobject-2.0',
290 ],
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -0700291 'conditions': [
292 ['USE_dbus == 1', {
293 'exported_deps': [
294 'dbus-1',
295 'dbus-glib-1',
296 ],
297 }],
298 ],
Christopher Wiley8065d312015-07-08 13:11:21 -0700299 'deps': ['<@(exported_deps)'],
300 },
301 'cflags': [
302 # glib uses the deprecated "register" attribute in some header files.
303 '-Wno-deprecated-register',
304 ],
305 'all_dependent_settings': {
306 'variables': {
307 'deps': [
308 '<@(exported_deps)',
309 ],
310 },
311 },
312 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700313 'brillo/message_loops/glib_message_loop.cc',
Christopher Wiley8065d312015-07-08 13:11:21 -0700314 ],
315 'includes': ['../common-mk/deps.gypi'],
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -0700316 'conditions': [
317 ['USE_dbus == 1', {
318 'sources': [
319 'brillo/glib/abstract_dbus_service.cc',
320 'brillo/glib/dbus.cc',
321 ],
322 }],
323 ],
Christopher Wiley8065d312015-07-08 13:11:21 -0700324 },
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500325 ],
326 'conditions': [
327 ['USE_test == 1', {
328 'targets': [
329 {
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700330 'target_name': 'libbrillo-<(libbase_ver)_unittests',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500331 'type': 'executable',
Daniel Erat8a6c5902014-06-04 13:50:01 -0700332 'dependencies': [
Alex Vakulenkofed60b02015-10-27 09:53:05 -0700333 'libbrillo-<(libbase_ver)',
334 'libbrillo-test-<(libbase_ver)',
335 'libbrillo-glib-<(libbase_ver)',
Daniel Erat8a6c5902014-06-04 13:50:01 -0700336 ],
Christopher Wileya96e6db2014-08-07 15:47:24 -0700337 'variables': {
338 'deps': [
339 'libchrome-test-<(libbase_ver)',
340 ],
Alex Vakulenkob2135452015-10-19 11:23:51 -0700341 'proto_in_dir': 'brillo/dbus',
Alex Vakulenko2df11632015-10-23 13:43:05 -0700342 'proto_out_dir': 'include/brillo/dbus',
Christopher Wileya96e6db2014-08-07 15:47:24 -0700343 },
Alex Vakulenkod0b4d8d2015-03-31 19:33:31 -0700344 'includes': [
345 '../common-mk/common_test.gypi',
346 '../common-mk/protoc.gypi',
347 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500348 'cflags': [
349 '-Wno-format-zero-length',
350 ],
351 'conditions': [
352 ['debug == 1', {
353 'cflags': [
354 '-fprofile-arcs',
355 '-ftest-coverage',
356 '-fno-inline',
357 ],
358 'libraries': [
359 '-lgcov',
360 ],
361 }],
362 ],
363 'sources': [
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700364 'brillo/asynchronous_signal_handler_unittest.cc',
365 'brillo/backoff_entry_unittest.cc',
366 'brillo/data_encoding_unittest.cc',
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700367 'brillo/errors/error_codes_unittest.cc',
368 'brillo/errors/error_unittest.cc',
369 'brillo/file_utils_unittest.cc',
370 'brillo/flag_helper_unittest.cc',
371 'brillo/glib/object_unittest.cc',
372 'brillo/http/http_connection_curl_unittest.cc',
373 'brillo/http/http_form_data_unittest.cc',
374 'brillo/http/http_request_unittest.cc',
375 'brillo/http/http_transport_curl_unittest.cc',
376 'brillo/http/http_utils_unittest.cc',
377 'brillo/key_value_store_unittest.cc',
378 'brillo/map_utils_unittest.cc',
Alex Deymod6717462016-01-14 10:50:16 -0800379 'brillo/message_loops/base_message_loop_unittest.cc',
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700380 'brillo/message_loops/fake_message_loop_unittest.cc',
381 'brillo/message_loops/glib_message_loop_unittest.cc',
382 'brillo/message_loops/message_loop_unittest.cc',
383 'brillo/mime_utils_unittest.cc',
384 'brillo/osrelease_reader_unittest.cc',
385 'brillo/process_reaper_unittest.cc',
386 'brillo/process_unittest.cc',
387 'brillo/secure_blob_unittest.cc',
388 'brillo/streams/fake_stream_unittest.cc',
389 'brillo/streams/file_stream_unittest.cc',
390 'brillo/streams/input_stream_set_unittest.cc',
391 'brillo/streams/memory_containers_unittest.cc',
392 'brillo/streams/memory_stream_unittest.cc',
393 'brillo/streams/openssl_stream_bio_unittests.cc',
394 'brillo/streams/stream_unittest.cc',
395 'brillo/streams/stream_utils_unittest.cc',
396 'brillo/strings/string_utils_unittest.cc',
Alex Deymo992e4292015-12-11 19:42:09 -0800397 'brillo/unittest_utils.cc',
Alex Vakulenko9ed0cab2015-10-12 15:21:28 -0700398 'brillo/url_utils_unittest.cc',
Alex Vakulenkob57ecfa2016-01-28 14:41:20 -0800399 'brillo/value_conversion_unittest.cc',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500400 'testrunner.cc',
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -0700401 ],
402 'conditions': [
403 ['USE_dbus == 1', {
404 'sources': [
405 'brillo/any_unittest.cc',
406 'brillo/any_internal_impl_unittest.cc',
407 'brillo/dbus/async_event_sequencer_unittest.cc',
408 'brillo/dbus/data_serialization_unittest.cc',
409 'brillo/dbus/dbus_method_invoker_unittest.cc',
410 'brillo/dbus/dbus_object_unittest.cc',
411 'brillo/dbus/dbus_param_reader_unittest.cc',
412 'brillo/dbus/dbus_param_writer_unittest.cc',
413 'brillo/dbus/dbus_signal_handler_unittest.cc',
414 'brillo/dbus/exported_object_manager_unittest.cc',
415 'brillo/dbus/exported_property_set_unittest.cc',
Stephen Barberc648bf02017-04-13 14:03:41 -0700416 'brillo/type_name_undecorate_unittest.cc',
Chirantan Ekbotee1c1af02017-03-14 18:32:26 -0700417 'brillo/variant_dictionary_unittest.cc',
418 '<(proto_in_dir)/test.proto',
419 ],
420 }],
421 ],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500422 },
423 {
Thiemo Nagelce533da2016-10-24 14:53:14 +0200424 'target_name': 'libinstallattributes-<(libbase_ver)_unittests',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500425 'type': 'executable',
Thiemo Nagelce533da2016-10-24 14:53:14 +0200426 'dependencies': [
427 '../common-mk/external_dependencies.gyp:install_attributes-proto',
428 'libinstallattributes-<(libbase_ver)',
429 ],
Bertrand SIMONNET883c3e72014-06-04 13:22:47 -0700430 'includes': ['../common-mk/common_test.gypi'],
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500431 'sources': [
Thiemo Nagelce533da2016-10-24 14:53:14 +0200432 'install_attributes/tests/libinstallattributes_unittest.cc',
433 ]
434 },
435 {
436 'target_name': 'libpolicy-<(libbase_ver)_unittests',
437 'type': 'executable',
438 'dependencies': [
439 '../common-mk/external_dependencies.gyp:install_attributes-proto',
440 'libinstallattributes-<(libbase_ver)',
441 'libpolicy-<(libbase_ver)',
442 ],
443 'includes': ['../common-mk/common_test.gypi'],
444 'sources': [
445 'install_attributes/mock_install_attributes_reader.cc',
Alex Deymo3c8d4ab2015-09-02 17:15:00 -0700446 'policy/tests/libpolicy_unittest.cc',
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500447 ]
448 },
Liam McLoughlin4f268f42013-03-04 18:09:53 -0500449 ],
450 }],
451 ],
452}