blob: ed6297cbe65fbd1fdef6cd8d2c6b4779c849366a [file] [log] [blame]
Liam McLoughlinef342b42013-09-13 21:05:36 +01001{
2 'target_defaults': {
3 'dependencies': [
4 '../libchromeos/libchromeos-<(libbase_ver).gyp:libchromeos-<(libbase_ver)',
5 ],
6 'variables': {
7 'deps': [
8 'libchrome-<(libbase_ver)',
9 ],
10 },
11 'cflags': [
12 '-Wno-missing-field-initializers',
13 '-Wno-unused-parameter',
14 '-Wno-unused-result',
15 '-Wuninitialized',
16 ],
17 'cflags_cc': [
18 '-fno-strict-aliasing',
19 '-std=gnu++11',
20 '-Woverloaded-virtual',
21 ],
22 'defines': [
23 '__STDC_FORMAT_MACROS',
24 '__STDC_LIMIT_MACROS',
25 'RUNDIR="/var/run/shill"',
26 'SHIMDIR="/usr/lib/shill/shims"',
27 ],
28 'conditions': [
29 ['USE_cellular == 0', {
30 'defines': [
31 'DISABLE_CELLULAR',
32 ],
33 }],
34 ['USE_vpn == 0', {
35 'defines': [
36 'DISABLE_VPN',
37 ],
38 }],
39 ],
40 },
41 'targets': [
42 {
43 'target_name': 'shill-proxies',
44 'type': 'none',
45 'variables': {
46 'xml2cpp_type': 'proxy',
47 'xml2cpp_in_dir': 'dbus_bindings',
48 'xml2cpp_out_dir': 'include/shill/dbus_proxies',
49 },
50 'sources': [
51 '<(xml2cpp_in_dir)/dbus-properties.xml',
52 '<(xml2cpp_in_dir)/dbus-service.xml',
53 '<(xml2cpp_in_dir)/dhcpcd.xml',
54 '<(xml2cpp_in_dir)/power_manager.xml',
55 '<(xml2cpp_in_dir)/supplicant-bss.xml',
56 '<(xml2cpp_in_dir)/supplicant-interface.xml',
57 '<(xml2cpp_in_dir)/supplicant-network.xml',
58 '<(xml2cpp_in_dir)/supplicant-process.xml',
59 '<(xml2cpp_in_dir)/org.chromium.flimflam.Device.xml',
60 '<(xml2cpp_in_dir)/org.chromium.flimflam.IPConfig.xml',
61 '<(xml2cpp_in_dir)/org.chromium.flimflam.Manager.xml',
62 '<(xml2cpp_in_dir)/org.chromium.flimflam.Profile.xml',
63 '<(xml2cpp_in_dir)/org.chromium.flimflam.Service.xml',
64 '<(xml2cpp_in_dir)/org.chromium.flimflam.Task.xml',
65 ],
66 'conditions': [
67 ['USE_cellular == 1', {
68 'sources': [
69 '<(xml2cpp_in_dir)/dbus-objectmanager.xml',
70 '<(xml2cpp_in_dir)/modem-gobi.xml',
71 ],
72 }],
73 ],
74 'includes': ['../common-mk/xml2cpp.gypi'],
75 },
76 {
77 'target_name': 'shill-adaptors',
78 'type': 'none',
79 'variables': {
80 'xml2cpp_type': 'adaptor',
81 'xml2cpp_in_dir': 'dbus_bindings',
82 'xml2cpp_out_dir': 'include/shill/dbus_adaptors',
83 },
84 'sources': [
85 '<(xml2cpp_in_dir)/org.chromium.flimflam.Device.xml',
86 '<(xml2cpp_in_dir)/org.chromium.flimflam.IPConfig.xml',
87 '<(xml2cpp_in_dir)/org.chromium.flimflam.Manager.xml',
88 '<(xml2cpp_in_dir)/org.chromium.flimflam.Profile.xml',
89 '<(xml2cpp_in_dir)/org.chromium.flimflam.Service.xml',
90 '<(xml2cpp_in_dir)/org.chromium.flimflam.Task.xml',
91 ],
92 'includes': ['../common-mk/xml2cpp.gypi'],
93 },
94 {
95 'target_name': 'shim-protos',
96 'type': 'static_library',
97 'variables': {
98 'proto_in_dir': 'shims/protos',
99 'proto_out_dir': 'include/shill/proto_bindings/shims/protos',
100 },
101 'sources': [
102 '<(proto_in_dir)/crypto_util.proto',
103 ],
104 'includes': ['../common-mk/protoc.gypi'],
105 },
106 {
107 'target_name': 'crypto_util',
108 'type': 'executable',
109 'dependencies': ['shim-protos'],
110 'sources': [
111 'shims/crypto_util.cc',
112 ]
113 },
114 {
115 'target_name': 'libshill',
116 'type': 'static_library',
117 'dependencies': [
118 '../common-mk/external_dependencies.gyp:modemmanager-dbus-proxies',
119 '../metrics/metrics.gyp:libmetrics',
120 '../system_api/system_api.gyp:system_api-power_manager-protos',
121 '../wimax_manager/wimax_manager.gyp:wimax_manager-proxies',
122 'shill-adaptors',
123 'shill-proxies',
124 'shim-protos',
125 ],
126 'variables': {
127 'exported_deps': [
128 'dbus-c++-1',
129 'gio-2.0',
130 'glib-2.0',
131 'libcares',
132 'libnl-3.0',
133 'libnl-genl-3.0',
134 'protobuf-lite',
135 ],
136 'deps': ['<@(exported_deps)'],
137 },
138 'all_dependent_settings': {
139 'variables': {
140 'deps': [
141 '<@(exported_deps)',
142 ],
143 },
144 },
145 'link_settings': {
146 'variables': {
147 'deps': [
148 'dbus-c++-1',
149 'gio-2.0',
150 'glib-2.0',
151 'libcares',
152 'libnl-3.0',
153 'libnl-genl-3.0',
154 'protobuf-lite',
155 ],
156 },
157 'libraries': [
158 '-lbootstat',
159 '-lminijail',
160 '-lrt'
161 ],
162 },
163 'conditions': [
164 ['USE_cellular == 1', {
165 'link_settings': {
166 'libraries': [
167 '-lmobile-provider'
168 ],
169 'variables': {
170 'deps': [
171 'ModemManager',
172 ],
173 },
174 'sources': [
175 'cellular.cc',
176 'cellular_capability.cc',
177 'cellular_capability_cdma.cc',
178 'cellular_capability_classic.cc',
179 'cellular_capability_gsm.cc',
180 'cellular_capability_universal.cc',
181 'cellular_capability_universal_cdma.cc',
182 'cellular_error.cc',
183 'cellular_error_mm1.cc',
184 'cellular_operator_info.cc',
185 'cellular_service.cc',
186 'dbus_objectmanager_proxy.cc',
187 'mm1_bearer_proxy.cc',
188 'mm1_modem_location_proxy.cc',
189 'mm1_modem_modem3gpp_proxy.cc',
190 'mm1_modem_modemcdma_proxy.cc',
191 'mm1_modem_proxy.cc',
192 'mm1_modem_simple_proxy.cc',
193 'mm1_modem_time_proxy.cc',
194 'mm1_sim_proxy.cc',
195 'modem.cc',
196 'modem_1.cc',
197 'modem_cdma_proxy.cc',
198 'modem_classic.cc',
199 'modem_gobi_proxy.cc',
200 'modem_gsm_card_proxy.cc',
201 'modem_gsm_network_proxy.cc',
202 'modem_manager.cc',
203 'modem_manager_1.cc',
204 'modem_manager_proxy.cc',
205 'modem_proxy.cc',
206 'modem_simple_proxy.cc',
207 ],
208 },
209 }],
210 ['USE_vpn == 1', {
211 'link_settings': {
212 'libraries': [
213 ],
214 'variables': {
215 'deps': [
216 ],
217 },
218 'sources': [
219 'l2tp_ipsec_driver.cc',
220 'openvpn_driver.cc',
221 'openvpn_management_server.cc',
222 ],
223 },
224 }],
225 ],
226 'sources': [
227 'arp_client.cc',
228 'arp_packet.cc',
229 'async_connection.cc',
230 'attribute_list.cc',
231 'byte_string.cc',
232 'callback80211_metrics.cc',
233 'certificate_file.cc',
234 'connection.cc',
235 'connection_health_checker.cc',
236 'connection_info.cc',
237 'connection_info_reader.cc',
238 'control_netlink_attribute.cc',
239 'crypto_des_cbc.cc',
240 'crypto_provider.cc',
241 'crypto_rot47.cc',
242 'crypto_util_proxy.cc',
243 'dbus_adaptor.cc',
244 'dbus_control.cc',
245 'dbus_manager.cc',
246 'dbus_properties.cc',
247 'dbus_properties_proxy.cc',
248 'dbus_service_proxy.cc',
249 'default_profile.cc',
250 'device.cc',
251 'device_dbus_adaptor.cc',
252 'device_info.cc',
253 'dhcp_config.cc',
254 'dhcp_provider.cc',
255 'dhcpcd_proxy.cc',
256 'diagnostics_reporter.cc',
257 'dns_client.cc',
258 'dns_client_factory.cc',
259 'eap_credentials.cc',
260 'eap_listener.cc',
261 'endpoint.cc',
262 'ephemeral_profile.cc',
263 'error.cc',
264 'ethernet.cc',
265 'ethernet_eap_provider.cc',
266 'ethernet_eap_service.cc',
267 'ethernet_service.cc',
268 'event_dispatcher.cc',
269 'external_task.cc',
270 'file_io.cc',
271 'file_reader.cc',
272 'generic_netlink_message.cc',
273 'geolocation_info.cc',
274 'glib.cc',
275 'glib_io_input_handler.cc',
276 'glib_io_ready_handler.cc',
277 'hook_table.cc',
278 'http_proxy.cc',
279 'http_request.cc',
280 'http_url.cc',
281 'ip_address.cc',
282 'ip_address_store.cc',
283 'ipconfig.cc',
284 'ipconfig_dbus_adaptor.cc',
285 'key_file_store.cc',
286 'key_value_store.cc',
287 'link_monitor.cc',
288 'manager.cc',
289 'manager_dbus_adaptor.cc',
290 'memory_log.cc',
291 'metrics.cc',
292 'minijail.cc',
293 'modem_info.cc',
294 'netlink_attribute.cc',
295 'netlink_manager.cc',
296 'netlink_message.cc',
297 'netlink_socket.cc',
298 'nl80211_attribute.cc',
299 'nl80211_message.cc',
300 'nss.cc',
301 'pending_activation_store.cc',
302 'portal_detector.cc',
303 'power_manager.cc',
304 'power_manager_proxy.cc',
305 'ppp_device.cc',
306 'ppp_device_factory.cc',
307 'process_killer.cc',
308 'profile.cc',
309 'profile_dbus_adaptor.cc',
310 'profile_dbus_property_exporter.cc',
311 'property_store.cc',
312 'proxy_factory.cc',
313 'resolver.cc',
314 'result_aggregator.cc',
315 'routing_table.cc',
316 'rpc_task.cc',
317 'rpc_task_dbus_adaptor.cc',
318 'rtnl_handler.cc',
319 'rtnl_listener.cc',
320 'rtnl_message.cc',
321 'scan_session.cc',
322 'scope_logger.cc',
323 'service.cc',
324 'service_dbus_adaptor.cc',
325 'shill_ares.cc',
326 'shill_config.cc',
327 'shill_daemon.cc',
328 'shill_test_config.cc',
329 'shill_time.cc',
330 'socket_info.cc',
331 'socket_info_reader.cc',
332 'sockets.cc',
333 'static_ip_parameters.cc',
334 'supplicant_bss_proxy.cc',
335 'supplicant_eap_state_handler.cc',
336 'supplicant_interface_proxy.cc',
337 'supplicant_network_proxy.cc',
338 'supplicant_process_proxy.cc',
339 'technology.cc',
340 'traffic_monitor.cc',
341 'virtio_ethernet.cc',
342 'virtual_device.cc',
343 'vpn_driver.cc',
344 'vpn_provider.cc',
345 'vpn_service.cc',
346 'wifi.cc',
347 'wifi_endpoint.cc',
348 'wifi_provider.cc',
349 'wifi_service.cc',
350 'wimax.cc',
351 'wimax_device_proxy.cc',
352 'wimax_manager_proxy.cc',
353 'wimax_network_proxy.cc',
354 'wimax_provider.cc',
355 'wimax_service.cc',
356 'wpa_supplicant.cc',
357 ],
358 },
359 {
360 'target_name': 'shill',
361 'type': 'executable',
362 'dependencies': ['libshill'],
363 'sources': [
364 'shill_main.cc',
365 ]
366 },
367 {
368 'target_name': 'shill-pppd-plugin',
369 'type': 'shared_library',
370 'dependencies': ['shill-proxies'],
371 'sources': [
372 'shims/c_ppp.cc',
373 'shims/environment.cc',
374 'shims/ppp.cc',
375 'shims/pppd_plugin.c',
376 'shims/task_proxy.cc',
377 ]
378 },
379 {
380 'target_name': 'crypto-util',
381 'type': 'executable',
382 'dependencies': ['shim-protos'],
383 'variables': {
384 'deps': [
385 'openssl',
386 'protobuf-lite',
387 ],
388 },
389 'sources': [
390 'shims/crypto_util.cc',
391 ]
392 },
393 {
394 'target_name': 'net-diags-upload',
395 'type': 'executable',
396 'sources': [
397 'shims/net_diags_upload.cc',
398 ]
399 },
400 {
401 'target_name': 'nss-get-cert',
402 'type': 'executable',
403 'dependencies': ['libshill'],
404 'variables': {
405 'deps': [
406 'nss',
407 ],
408 },
409 'sources': [
410 'shims/certificates.cc',
411 'shims/nss_get_cert.cc',
412 ]
413 },
414 {
415 'target_name': 'netfilter-queue-helper',
416 'type': 'executable',
417 'variables': {
418 'deps': [
419 'libmnl',
420 'libnetfilter_queue',
421 'libnfnetlink',
422 ],
423 },
424 'sources': [
425 'shims/netfilter_queue_helper.cc',
426 'shims/netfilter_queue_processor.cc',
427 ]
428 },
429 {
430 'target_name': 'openvpn-script',
431 'type': 'executable',
432 'dependencies': ['shill-proxies'],
433 'variables': {
434 'deps': [
435 'dbus-c++-1',
436 ],
437 },
438 'sources': [
439 'shims/environment.cc',
440 'shims/openvpn_script.cc',
441 'shims/task_proxy.cc',
442 ]
443 },
444 ],
445 'conditions': [
446 ['USE_cellular == 1', {
447 'targets': [
448 {
449 'target_name': 'set-apn-helper',
450 'type': 'executable',
451 'sources': [
452 'shims/set_apn_helper.c',
453 ]
454 },
455 ],
456 }],
457 ['USE_test == 1', {
458 'targets': [
459 {
460 'target_name': 'shill_unittest',
461 'type': 'executable',
462 'dependencies': ['libshill'],
463 'includes': ['../common-mk/common_test.gypi'],
464 'variables': {
465 'deps': [
466 'nss',
467 'libmnl',
468 'libnetfilter_queue',
469 'libnfnetlink',
470 ],
471 },
472 'defines': [
473 'SYSROOT="<(sysroot)"',
474 ],
475 'sources': [
476 'arp_client_unittest.cc',
477 'arp_packet_unittest.cc',
478 'async_connection_unittest.cc',
479 'byte_string_unittest.cc',
Wade Guthriec2728962013-07-10 09:32:16 -0700480 'callback80211_metrics_unittest.cc',
Liam McLoughlinef342b42013-09-13 21:05:36 +0100481 'certificate_file_unittest.cc',
482 'connection_health_checker_unittest.cc',
483 'connection_info_reader_unittest.cc',
484 'connection_info_unittest.cc',
485 'connection_unittest.cc',
486 'crypto_des_cbc_unittest.cc',
487 'crypto_provider_unittest.cc',
488 'crypto_rot47_unittest.cc',
489 'crypto_util_proxy_unittest.cc',
490 'dbus_adaptor_unittest.cc',
491 'dbus_manager_unittest.cc',
492 'dbus_properties_unittest.cc',
493 'dbus_variant_gmock_printer.cc',
494 'default_profile_unittest.cc',
495 'device_info_unittest.cc',
496 'device_unittest.cc',
497 'dhcp_config_unittest.cc',
498 'dhcp_provider_unittest.cc',
499 'diagnostics_reporter_unittest.cc',
500 'dns_client_unittest.cc',
501 'eap_credentials_unittest.cc',
502 'eap_listener_unittest.cc',
503 'error_unittest.cc',
504 'ethernet_eap_provider_unittest.cc',
505 'ethernet_eap_service_unittest.cc',
506 'ethernet_service_unittest.cc',
507 'ethernet_unittest.cc',
508 'external_task_unittest.cc',
509 'file_reader_unittest.cc',
510 'hook_table_unittest.cc',
511 'http_proxy_unittest.cc',
512 'http_request_unittest.cc',
513 'http_url_unittest.cc',
514 'ip_address_store_unittest.cc',
515 'ip_address_unittest.cc',
516 'ipconfig_unittest.cc',
517 'key_file_store_unittest.cc',
518 'key_value_store_unittest.cc',
519 'link_monitor_unittest.cc',
520 'manager_unittest.cc',
521 'memory_log_unittest.cc',
522 'metrics_unittest.cc',
523 'mock_adaptors.cc',
524 'mock_ares.cc',
525 'mock_arp_client.cc',
526 'mock_async_connection.cc',
527 'mock_certificate_file.cc',
528 'mock_connection.cc',
529 'mock_connection_health_checker.cc',
530 'mock_connection_info_reader.cc',
531 'mock_control.cc',
532 'mock_crypto_util_proxy.cc',
533 'mock_dbus_manager.cc',
534 'mock_dbus_objectmanager_proxy.cc',
535 'mock_dbus_properties_proxy.cc',
536 'mock_dbus_service_proxy.cc',
537 'mock_device.cc',
538 'mock_device_info.cc',
539 'mock_dhcp_config.cc',
540 'mock_dhcp_provider.cc',
541 'mock_dhcp_proxy.cc',
542 'mock_diagnostics_reporter.cc',
543 'mock_dns_client.cc',
544 'mock_dns_client_factory.cc',
545 'mock_eap_credentials.cc',
546 'mock_eap_listener.cc',
547 'mock_ethernet.cc',
548 'mock_ethernet_eap_provider.cc',
549 'mock_ethernet_service.cc',
550 'mock_event_dispatcher.cc',
551 'mock_external_task.cc',
552 'mock_glib.cc',
553 'mock_http_request.cc',
554 'mock_ip_address_store.cc',
555 'mock_ipconfig.cc',
556 'mock_link_monitor.cc',
557 'mock_log.cc',
558 'mock_log_unittest.cc',
559 'mock_manager.cc',
560 'mock_metrics.cc',
561 'mock_minijail.cc',
562 'mock_modem_info.cc',
563 'mock_netlink_manager.cc',
564 'mock_nss.cc',
565 'mock_pending_activation_store.cc',
566 'mock_portal_detector.cc',
567 'mock_power_manager.cc',
568 'mock_power_manager_proxy.cc',
569 'mock_ppp_device.cc',
570 'mock_ppp_device_factory.cc',
571 'mock_process_killer.cc',
572 'mock_profile.cc',
573 'mock_property_store.cc',
574 'mock_proxy_factory.cc',
575 'mock_resolver.cc',
576 'mock_routing_table.cc',
577 'mock_rtnl_handler.cc',
578 'mock_scan_session.cc',
579 'mock_service.cc',
580 'mock_socket_info_reader.cc',
581 'mock_sockets.cc',
582 'mock_store.cc',
583 'mock_supplicant_bss_proxy.cc',
584 'mock_supplicant_eap_state_handler.cc',
585 'mock_supplicant_interface_proxy.cc',
586 'mock_supplicant_network_proxy.cc',
587 'mock_supplicant_process_proxy.cc',
588 'mock_time.cc',
589 'mock_traffic_monitor.cc',
590 'mock_virtual_device.cc',
591 'mock_vpn_provider.cc',
592 'mock_wifi.cc',
593 'mock_wifi_provider.cc',
594 'mock_wifi_service.cc',
595 'mock_wimax.cc',
596 'mock_wimax_device_proxy.cc',
597 'mock_wimax_manager_proxy.cc',
598 'mock_wimax_network_proxy.cc',
599 'mock_wimax_provider.cc',
600 'mock_wimax_service.cc',
601 'modem_info_unittest.cc',
602 'netlink_manager_unittest.cc',
603 'netlink_message_unittest.cc',
604 'netlink_socket_unittest.cc',
605 'nice_mock_control.cc',
606 'nss_unittest.cc',
607 'pending_activation_store_unittest.cc',
608 'portal_detector_unittest.cc',
609 'power_manager_unittest.cc',
610 'ppp_device_unittest.cc',
611 'process_killer_unittest.cc',
612 'profile_dbus_property_exporter_unittest.cc',
613 'profile_unittest.cc',
614 'property_accessor_unittest.cc',
615 'property_store_unittest.cc',
616 'resolver_unittest.cc',
617 'result_aggregator_unittest.cc',
618 'routing_table_unittest.cc',
619 'rpc_task_unittest.cc',
620 'rtnl_handler_unittest.cc',
621 'rtnl_listener_unittest.cc',
622 'rtnl_message_unittest.cc',
623 'scan_session_unittest.cc',
624 'scope_logger_unittest.cc',
625 'service_property_change_test.cc',
626 'service_under_test.cc',
627 'service_unittest.cc',
628 'shill_unittest.cc',
629 'shims/certificates.cc',
630 'shims/certificates_unittest.cc',
631 'shims/netfilter_queue_processor.cc',
632 'shims/netfilter_queue_processor_unittest.cc',
633 'socket_info_reader_unittest.cc',
634 'socket_info_unittest.cc',
635 'static_ip_parameters_unittest.cc',
636 'supplicant_eap_state_handler_unittest.cc',
637 'technology_unittest.cc',
638 'testrunner.cc',
639 'traffic_monitor_unittest.cc',
640 'virtual_device_unittest.cc',
641 'wifi_endpoint_unittest.cc',
642 'wifi_provider_unittest.cc',
643 'wifi_service_unittest.cc',
644 'wifi_unittest.cc',
645 'wimax_provider_unittest.cc',
646 'wimax_service_unittest.cc',
647 'wimax_unittest.cc',
648 'wpa_supplicant_unittest.cc',
649 ],
650 'conditions': [
651 ['USE_cellular == 1', {
652 'link_settings': {
653 'sources': [
654 'cellular_capability_cdma_unittest.cc',
655 'cellular_capability_classic_unittest.cc',
656 'cellular_capability_gsm_unittest.cc',
657 'cellular_capability_universal_cdma_unittest.cc',
658 'cellular_capability_universal_unittest.cc',
659 'cellular_error_unittest.cc',
660 'cellular_operator_info_unittest.cc',
661 'cellular_service_unittest.cc',
662 'cellular_unittest.cc',
663 'mock_cellular.cc',
664 'mock_cellular_operator_info.cc',
665 'mock_cellular_service.cc',
666 'mock_mm1_bearer_proxy.cc',
667 'mock_mm1_modem_location_proxy.cc',
668 'mock_mm1_modem_modem3gpp_proxy.cc',
669 'mock_mm1_modem_modemcdma_proxy.cc',
670 'mock_mm1_modem_proxy.cc',
671 'mock_mm1_modem_simple_proxy.cc',
672 'mock_mm1_modem_time_proxy.cc',
673 'mock_mm1_sim_proxy.cc',
674 'mock_modem.cc',
675 'mock_modem_cdma_proxy.cc',
676 'mock_modem_gobi_proxy.cc',
677 'mock_modem_gsm_card_proxy.cc',
678 'mock_modem_gsm_network_proxy.cc',
679 'mock_modem_manager_proxy.cc',
680 'mock_modem_proxy.cc',
681 'mock_modem_simple_proxy.cc',
682 'modem_1_unittest.cc',
683 'modem_manager_unittest.cc',
684 'modem_unittest.cc',
685 ],
686 },
687 }],
688 ['USE_vpn == 1', {
689 'sources': [
690 'l2tp_ipsec_driver_unittest.cc',
691 'mock_openvpn_driver.cc',
692 'mock_openvpn_management_server.cc',
693 'mock_vpn_driver.cc',
694 'mock_vpn_service.cc',
695 'openvpn_driver_unittest.cc',
696 'openvpn_management_server_unittest.cc',
697 'shims/environment.cc',
698 'shims/environment_unittest.cc',
699 'shims/task_proxy.cc',
700 'vpn_driver_unittest.cc',
701 'vpn_provider_unittest.cc',
702 'vpn_service_unittest.cc',
703 ],
704 }],
705 ],
706 },
707 ],
708 }],
709 ],
710}