Home | History | Annotate | Download | only in shill
      1 #
      2 # Copyright (C) 2015 The Android Open Source Project
      3 #
      4 # Licensed under the Apache License, Version 2.0 (the "License");
      5 # you may not use this file except in compliance with the License.
      6 # You may obtain a copy of the License at
      7 #
      8 #      http://www.apache.org/licenses/LICENSE-2.0
      9 #
     10 # Unless required by applicable law or agreed to in writing, software
     11 # distributed under the License is distributed on an "AS IS" BASIS,
     12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 # See the License for the specific language governing permissions and
     14 # limitations under the License.
     15 #
     16 
     17 {
     18   'target_defaults': {
     19     'variables': {
     20       'deps': [
     21         'dbus-1',
     22         'libbrillo-<(libbase_ver)',
     23         'libchrome-<(libbase_ver)',
     24       ],
     25       'enable_exceptions': 1,
     26     },
     27     'cflags': [
     28       '-Wextra',
     29       '-Werror',
     30       '-Wno-unused-parameter',  # for pppd_plugin.c, base/tuple.h
     31     ],
     32     'cflags_cc': [
     33       '-fno-strict-aliasing',
     34       '-Woverloaded-virtual',
     35       '-Wno-missing-field-initializers',  # for LAZY_INSTANCE_INITIALIZER
     36     ],
     37     'defines': [
     38       'ENABLE_CHROMEOS_DBUS',
     39       'RUNDIR="/var/run/shill"',
     40       'SHIMDIR="<(libdir)/shill/shims"',
     41     ],
     42     'conditions': [
     43       ['USE_cellular == 0', {
     44         'defines': [
     45           'DISABLE_CELLULAR',
     46         ],
     47       }],
     48       ['USE_dhcpv6 == 0', {
     49         'defines': [
     50           'DISABLE_DHCPV6',
     51         ],
     52       }],
     53       ['USE_json_store == 1', {
     54         'defines': [
     55           'ENABLE_JSON_STORE',
     56         ],
     57       }],
     58       ['USE_pppoe == 0', {
     59         'defines': [
     60           'DISABLE_PPPOE',
     61         ],
     62       }],
     63       ['USE_vpn == 0', {
     64         'defines': [
     65           'DISABLE_VPN',
     66         ],
     67       }],
     68       ['USE_wake_on_wifi == 0', {
     69         'defines': [
     70           'DISABLE_WAKE_ON_WIFI',
     71         ],
     72       }],
     73       ['USE_wifi == 0', {
     74         'defines': [
     75           'DISABLE_WIFI',
     76         ],
     77       }],
     78       ['USE_wimax == 0', {
     79         'defines': [
     80           'DISABLE_WIMAX',
     81         ],
     82       }],
     83       ['USE_wired_8021x == 0', {
     84         'defines': [
     85           'DISABLE_WIRED_8021X',
     86         ],
     87       }],
     88     ],
     89     'include_dirs': [
     90       # We need this include dir because we include all the local code as
     91       # # "shill/...".
     92       '<(platform2_root)/../aosp/system/connectivity',
     93     ],
     94   },
     95   'includes': [
     96     'shill.gypi',
     97   ],
     98   'targets': [
     99     {
    100       'target_name': 'mobile_operator_db-protos',
    101       'type': 'static_library',
    102       'variables': {
    103         'proto_in_dir': 'mobile_operator_db',
    104         'proto_out_dir':
    105             'include/shill/mobile_operator_db'
    106       },
    107       'sources': [
    108         '<(proto_in_dir)/mobile_operator_db.proto'
    109       ],
    110       'includes': ['../../../../platform2/common-mk/protoc.gypi'],
    111     },
    112     {
    113       'target_name': 'mobile_operator_db-db',
    114       'type': 'none',
    115       'variables' : {
    116         'protoc_proto_dir': 'mobile_operator_db',
    117         'protoc_proto_def': 'mobile_operator_db.proto',
    118         'protoc_text_dir': 'mobile_operator_db',
    119         'protoc_bin_dir': '<(PRODUCT_DIR)',
    120         'protoc_message_name': 'shill.mobile_operator_db.MobileOperatorDB',
    121       },
    122       'sources': [
    123         '<(protoc_text_dir)/serviceproviders.prototxt',
    124       ],
    125       'includes': ['../../../../platform2/common-mk/protoctxt.gypi'],
    126     },
    127     {
    128       'target_name': 'mobile_operator_db',
    129       'type': 'static_library',
    130       'dependencies': [
    131         'mobile_operator_db-protos',
    132         'mobile_operator_db-db',
    133       ],
    134     },
    135     {
    136       'target_name': 'shill-chromeos-dbus-adaptors',
    137       'type': 'none',
    138       'variables': {
    139         'dbus_adaptors_out_dir': 'include/dbus_bindings',
    140         'dbus_xml_extension': 'dbus-xml',
    141       },
    142       'sources': [
    143         'dbus_bindings/org.chromium.flimflam.Device.dbus-xml',
    144         'dbus_bindings/org.chromium.flimflam.IPConfig.dbus-xml',
    145         'dbus_bindings/org.chromium.flimflam.Manager.dbus-xml',
    146         'dbus_bindings/org.chromium.flimflam.Profile.dbus-xml',
    147         'dbus_bindings/org.chromium.flimflam.Service.dbus-xml',
    148         'dbus_bindings/org.chromium.flimflam.Task.dbus-xml',
    149         'dbus_bindings/org.chromium.flimflam.ThirdPartyVpn.dbus-xml',
    150       ],
    151       'includes': ['../../../../platform2/common-mk/generate-dbus-adaptors.gypi'],
    152     },
    153     {
    154       'target_name': 'shim-protos',
    155       'type': 'static_library',
    156       'variables': {
    157         'proto_in_dir': 'shims/protos',
    158         'proto_out_dir': 'include/shill/shims/protos',
    159       },
    160       'sources': [
    161         '<(proto_in_dir)/crypto_util.proto',
    162       ],
    163       'includes': ['../../../../platform2/common-mk/protoc.gypi'],
    164     },
    165     {
    166       'target_name': 'crypto_util',
    167       'type': 'executable',
    168       'dependencies': ['shim-protos'],
    169       'variables': {
    170         'deps': [
    171           'openssl',
    172           'protobuf-lite',
    173         ]
    174       },
    175       'sources': [
    176         'shims/crypto_util.cc',
    177       ],
    178     },
    179     {
    180       'target_name': 'libshill-net-<(libbase_ver)',
    181       'type': 'shared_library',
    182       'sources': [
    183         'net/attribute_list.cc',
    184         'net/byte_string.cc',
    185         'net/control_netlink_attribute.cc',
    186         'net/event_history.cc',
    187         'net/generic_netlink_message.cc',
    188         'net/io_handler_factory.cc',
    189         'net/io_handler_factory_container.cc',
    190         'net/io_input_handler.cc',
    191         'net/io_ready_handler.cc',
    192         'net/ip_address.cc',
    193         'net/netlink_attribute.cc',
    194         'net/netlink_manager.cc',
    195         'net/netlink_message.cc',
    196         'net/netlink_packet.cc',
    197         'net/netlink_socket.cc',
    198         'net/nl80211_attribute.cc',
    199         'net/nl80211_message.cc',
    200         'net/rtnl_handler.cc',
    201         'net/rtnl_listener.cc',
    202         'net/rtnl_message.cc',
    203         'net/shill_time.cc',
    204         'net/sockets.cc',
    205       ],
    206       'includes': ['../../../../platform2/common-mk/deps.gypi'],
    207     },
    208     {
    209       'target_name': 'libshill',
    210       'type': 'static_library',
    211       'dependencies': [
    212         'mobile_operator_db',
    213         'shill-chromeos-dbus-adaptors',
    214         'shim-protos',
    215         'libshill-net-<(libbase_ver)',
    216       ],
    217       'variables': {
    218         'exported_deps': [
    219           'libcares',
    220           'libmetrics-<(libbase_ver)',
    221           'libpermission_broker-client',
    222           'libpower_manager-client',
    223           'protobuf-lite',
    224         ],
    225         'deps': [
    226           '<@(exported_deps)',
    227           'libshill-client',
    228         ],
    229       },
    230       'all_dependent_settings': {
    231         'variables': {
    232           'deps': [
    233             '<@(exported_deps)',
    234           ],
    235         },
    236       },
    237       'link_settings': {
    238         'variables': {
    239           'deps': [
    240             'libcares',
    241             # system_api depends on protobuf (or protobuf-lite). It must appear
    242             # before protobuf here or the linker flags won't be in the right
    243             # order.
    244             'system_api',
    245             'protobuf-lite',
    246           ],
    247         },
    248         'libraries': [
    249           '-lbootstat',
    250           '-lrootdev',
    251           '-lrt'
    252         ],
    253       },
    254       'conditions': [
    255         ['USE_cellular == 1', {
    256           'dependencies': [
    257             '../../../../platform2/common-mk/external_dependencies.gyp:modemmanager-dbus-proxies',
    258           ],
    259           'variables': {
    260             'deps': [
    261               'ModemManager',
    262             ],
    263           },
    264           'sources': [
    265             'cellular/active_passive_out_of_credits_detector.cc',
    266             'cellular/cellular.cc',
    267             'cellular/cellular_bearer.cc',
    268             'cellular/cellular_capability.cc',
    269             'cellular/cellular_capability_cdma.cc',
    270             'cellular/cellular_capability_classic.cc',
    271             'cellular/cellular_capability_gsm.cc',
    272             'cellular/cellular_capability_universal.cc',
    273             'cellular/cellular_capability_universal_cdma.cc',
    274             'cellular/cellular_error.cc',
    275             'cellular/cellular_error_mm1.cc',
    276             'cellular/cellular_service.cc',
    277             'cellular/mobile_operator_info.cc',
    278             'cellular/mobile_operator_info_impl.cc',
    279             'cellular/modem.cc',
    280             'cellular/modem_1.cc',
    281             'cellular/modem_classic.cc',
    282             'cellular/modem_info.cc',
    283             'cellular/modem_manager.cc',
    284             'cellular/modem_manager_1.cc',
    285             'cellular/out_of_credits_detector.cc',
    286             'cellular/subscription_state_out_of_credits_detector.cc',
    287             'dbus/chromeos_dbus_objectmanager_proxy.cc',
    288             'dbus/chromeos_dbus_properties_proxy.cc',
    289             'dbus/chromeos_mm1_modem_modem3gpp_proxy.cc',
    290             'dbus/chromeos_mm1_modem_modemcdma_proxy.cc',
    291             'dbus/chromeos_mm1_modem_proxy.cc',
    292             'dbus/chromeos_mm1_modem_simple_proxy.cc',
    293             'dbus/chromeos_mm1_sim_proxy.cc',
    294             'dbus/chromeos_modem_cdma_proxy.cc',
    295             'dbus/chromeos_modem_gobi_proxy.cc',
    296             'dbus/chromeos_modem_gsm_card_proxy.cc',
    297             'dbus/chromeos_modem_gsm_network_proxy.cc',
    298             'dbus/chromeos_modem_manager_proxy.cc',
    299             'dbus/chromeos_modem_proxy.cc',
    300             'dbus/chromeos_modem_simple_proxy.cc',
    301             'protobuf_lite_streams.cc',
    302           ],
    303           'actions': [
    304             {
    305               'action_name': 'generate-cellular-proxies',
    306               'variables': {
    307                 'proxy_output_file': 'include/cellular/dbus-proxies.h',
    308                 'modemmanager_in_dir': '<(sysroot)/usr/share/dbus-1/interfaces/',
    309               },
    310               'sources': [
    311                 'dbus_bindings/dbus-objectmanager.dbus-xml',
    312                 'dbus_bindings/dbus-properties.dbus-xml',
    313                 'dbus_bindings/modem-gobi.dbus-xml',
    314                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.Modem.Cdma.xml',
    315                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Card.xml',
    316                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.Modem.Gsm.Network.xml',
    317                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.Modem.Simple.xml',
    318                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.Modem.xml',
    319                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager.xml',
    320                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager1.Modem.Modem3gpp.xml',
    321                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager1.Modem.ModemCdma.xml',
    322                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager1.Modem.Simple.xml',
    323                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager1.Modem.xml',
    324                 '<(modemmanager_in_dir)/org.freedesktop.ModemManager1.Sim.xml',
    325               ],
    326               'includes': ['../../../../platform2/common-mk/generate-dbus-proxies.gypi'],
    327             },
    328           ],
    329         }],
    330         ['USE_json_store == 0', {
    331           'link_settings': {
    332             'variables': {
    333               'deps': [
    334                 'gio-2.0',  # for g_type_init()
    335                 'glib-2.0',  # for g_key_*(), etc.
    336               ],
    337             },
    338           },
    339           'sources': [
    340             'key_file_store.cc',
    341           ],
    342           'variables': {
    343             'exported_deps': [
    344               'gio-2.0',  # for g_type_init()
    345               'glib-2.0',  # for g_key_*(), etc.
    346             ],
    347             'deps': ['<@(exported_deps)'],
    348           },
    349         }],
    350         ['USE_json_store == 1', {
    351           'sources': [
    352             'json_store.cc',
    353           ],
    354         }],
    355         ['USE_vpn == 1', {
    356           'sources': [
    357             'vpn/l2tp_ipsec_driver.cc',
    358             'vpn/openvpn_driver.cc',
    359             'vpn/openvpn_management_server.cc',
    360             'vpn/third_party_vpn_driver.cc',
    361           ],
    362         }],
    363         ['USE_wifi == 1', {
    364           'sources': [
    365             'wifi/callback80211_metrics.cc',
    366             'wifi/mac80211_monitor.cc',
    367             'wifi/scan_session.cc',
    368             'wifi/tdls_manager.cc',
    369             'wifi/wake_on_wifi.cc',
    370             'wifi/wifi.cc',
    371             'wifi/wifi_endpoint.cc',
    372             'wifi/wifi_provider.cc',
    373             'wifi/wifi_service.cc',
    374           ],
    375         }],
    376         ['USE_wifi == 1 or USE_wired_8021x == 1', {
    377           'sources': [
    378             'dbus/chromeos_supplicant_bss_proxy.cc',
    379             'dbus/chromeos_supplicant_interface_proxy.cc',
    380             'dbus/chromeos_supplicant_network_proxy.cc',
    381             'dbus/chromeos_supplicant_process_proxy.cc',
    382             'eap_credentials.cc',
    383             'eap_listener.cc',
    384             'supplicant/supplicant_eap_state_handler.cc',
    385             'supplicant/wpa_supplicant.cc',
    386           ],
    387           'actions': [
    388             {
    389               'action_name': 'generate-supplicant-proxies',
    390               'variables': {
    391                 'proxy_output_file': 'include/supplicant/dbus-proxies.h',
    392               },
    393               'sources': [
    394                 'dbus_bindings/supplicant-bss.dbus-xml',
    395                 'dbus_bindings/supplicant-interface.dbus-xml',
    396                 'dbus_bindings/supplicant-network.dbus-xml',
    397                 'dbus_bindings/supplicant-process.dbus-xml',
    398               ],
    399               'includes': ['../../../../platform2/common-mk/generate-dbus-proxies.gypi'],
    400             },
    401           ],
    402         }],
    403         ['USE_wimax == 1', {
    404           'variables': {
    405             'exported_deps': [
    406               'libwimax_manager-client',
    407             ],
    408             'deps': ['<@(exported_deps)'],
    409           },
    410           'all_dependent_settings': {
    411             'variables': {
    412               'deps': [
    413                 '<@(exported_deps)',
    414               ],
    415             },
    416           },
    417           'sources': [
    418             'dbus/chromeos_wimax_device_proxy.cc',
    419             'dbus/chromeos_wimax_manager_proxy.cc',
    420             'dbus/chromeos_wimax_network_proxy.cc',
    421             'wimax/wimax.cc',
    422             'wimax/wimax_provider.cc',
    423             'wimax/wimax_service.cc',
    424           ],
    425         }],
    426         ['USE_wired_8021x == 1', {
    427           'sources': [
    428             'ethernet/ethernet_eap_provider.cc',
    429             'ethernet/ethernet_eap_service.cc',
    430           ],
    431         }],
    432         ['USE_dhcpv6 == 1', {
    433           'sources': [
    434             'dhcp/dhcpv6_config.cc',
    435           ],
    436         }],
    437       ],
    438       'sources': [
    439         'active_link_monitor.cc',
    440         'arp_client.cc',
    441         'arp_packet.cc',
    442         'async_connection.cc',
    443         'certificate_file.cc',
    444         'connection.cc',
    445         'connection_diagnostics.cc',
    446         'connection_health_checker.cc',
    447         'connection_info.cc',
    448         'connection_info_reader.cc',
    449         'connection_tester.cc',
    450         'connectivity_trial.cc',
    451         'crypto_des_cbc.cc',
    452         'crypto_provider.cc',
    453         'crypto_rot47.cc',
    454         'crypto_util_proxy.cc',
    455         'daemon_task.cc',
    456         'dbus/chromeos_dbus_adaptor.cc',
    457         'dbus/chromeos_dbus_control.cc',
    458         'dbus/chromeos_dbus_service_watcher.cc',
    459         'dbus/chromeos_device_dbus_adaptor.cc',
    460         'dbus/chromeos_dhcpcd_listener.cc',
    461         'dbus/chromeos_dhcpcd_proxy.cc',
    462         'dbus/chromeos_ipconfig_dbus_adaptor.cc',
    463         'dbus/chromeos_manager_dbus_adaptor.cc',
    464         'dbus/chromeos_permission_broker_proxy.cc',
    465         'dbus/chromeos_power_manager_proxy.cc',
    466         'dbus/chromeos_profile_dbus_adaptor.cc',
    467         'dbus/chromeos_rpc_task_dbus_adaptor.cc',
    468         'dbus/chromeos_service_dbus_adaptor.cc',
    469         'dbus/chromeos_third_party_vpn_dbus_adaptor.cc',
    470         'dbus/chromeos_upstart_proxy.cc',
    471         'dbus/dbus_service_watcher_factory.cc',
    472         'default_profile.cc',
    473         'device.cc',
    474         'device_claimer.cc',
    475         'device_info.cc',
    476         'dhcp_properties.cc',
    477         'dhcp/dhcp_config.cc',
    478         'dhcp/dhcp_provider.cc',
    479         'dhcp/dhcpv4_config.cc',
    480         'dns_client.cc',
    481         'dns_client_factory.cc',
    482         'dns_server_tester.cc',
    483         'ephemeral_profile.cc',
    484         'error.cc',
    485         'ethernet/ethernet.cc',
    486         'ethernet/ethernet_service.cc',
    487         'ethernet/ethernet_temporary_service.cc',
    488         'ethernet/virtio_ethernet.cc',
    489         'event_dispatcher.cc',
    490         'external_task.cc',
    491         'file_io.cc',
    492         'file_reader.cc',
    493         'geolocation_info.cc',
    494         'hook_table.cc',
    495         'http_proxy.cc',
    496         'http_request.cc',
    497         'http_url.cc',
    498         'icmp.cc',
    499         'icmp_session.cc',
    500         'icmp_session_factory.cc',
    501         'ip_address_store.cc',
    502         'ipconfig.cc',
    503         'key_value_store.cc',
    504         'link_monitor.cc',
    505         'logging.cc',
    506         'manager.cc',
    507         'metrics.cc',
    508         'passive_link_monitor.cc',
    509         'pending_activation_store.cc',
    510         'portal_detector.cc',
    511         'power_manager.cc',
    512         'ppp_daemon.cc',
    513         'ppp_device.cc',
    514         'ppp_device_factory.cc',
    515         'pppoe/pppoe_service.cc',
    516         'process_manager.cc',
    517         'profile.cc',
    518         'property_store.cc',
    519         'resolver.cc',
    520         'result_aggregator.cc',
    521         'routing_table.cc',
    522         'rpc_task.cc',
    523         'scope_logger.cc',
    524         'scoped_umask.cc',
    525         'service.cc',
    526         'service_property_change_notifier.cc',
    527         'shill_ares.cc',
    528         'shill_config.cc',
    529         'shill_daemon.cc',
    530         'shill_test_config.cc',
    531         'socket_info.cc',
    532         'socket_info_reader.cc',
    533         'static_ip_parameters.cc',
    534         'store_factory.cc',
    535         'technology.cc',
    536         'tethering.cc',
    537         'traffic_monitor.cc',
    538         'upstart/upstart.cc',
    539         'virtual_device.cc',
    540         'vpn/vpn_driver.cc',
    541         'vpn/vpn_provider.cc',
    542         'vpn/vpn_service.cc',
    543       ],
    544       'actions': [
    545         {
    546           'action_name': 'generate-dhcpcd-proxies',
    547           'variables': {
    548             'proxy_output_file': 'include/dhcpcd/dbus-proxies.h',
    549           },
    550           'sources': [
    551             'dbus_bindings/dhcpcd.dbus-xml',
    552           ],
    553           'includes': ['../../../../platform2/common-mk/generate-dbus-proxies.gypi'],
    554         },
    555         {
    556           'action_name': 'generate-upstart-proxies',
    557           'variables': {
    558             'proxy_output_file': 'include/upstart/dbus-proxies.h',
    559           },
    560           'sources': [
    561             'dbus_bindings/upstart.dbus-xml',
    562           ],
    563           'includes': ['../../../../platform2/common-mk/generate-dbus-proxies.gypi'],
    564         },
    565       ],
    566     },
    567     {
    568       'target_name': 'shill',
    569       'type': 'executable',
    570       'dependencies': ['libshill'],
    571       'sources': [
    572         'shill_main.cc',
    573       ]
    574     },
    575     {
    576       'target_name': 'crypto-util',
    577       'type': 'executable',
    578       'dependencies': ['shim-protos'],
    579       'variables': {
    580         'deps': [
    581           'openssl',
    582           'protobuf-lite',
    583         ],
    584       },
    585       'sources': [
    586         'shims/crypto_util.cc',
    587       ]
    588     },
    589     {
    590       'target_name': 'netfilter-queue-helper',
    591       'type': 'executable',
    592       'variables': {
    593         'deps': [
    594           'libnetfilter_queue',
    595           'libnfnetlink',
    596         ],
    597       },
    598       'sources': [
    599         'shims/netfilter_queue_helper.cc',
    600         'shims/netfilter_queue_processor.cc',
    601       ]
    602     },
    603     {
    604       'target_name': 'openvpn-script',
    605       'type': 'executable',
    606       'variables': {
    607         'deps': [
    608           'libshill-client',
    609         ],
    610       },
    611       'sources': [
    612         'shims/environment.cc',
    613         'shims/openvpn_script.cc',
    614         'shims/task_proxy.cc',
    615       ]
    616     },
    617   ],
    618   'conditions': [
    619     ['USE_cellular == 1', {
    620       'targets': [
    621         {
    622           'target_name': 'set-apn-helper',
    623           'type': 'executable',
    624           'variables': {
    625             'deps': [
    626               'dbus-glib-1'
    627             ]
    628           },
    629           'sources': [
    630             'shims/set_apn_helper.c',
    631           ],
    632         },
    633       ],
    634     }],
    635     ['USE_cellular == 1 or USE_vpn == 1 or USE_pppoe == 1', {
    636       'targets': [
    637         {
    638           'target_name': 'shill-pppd-plugin',
    639           'type': 'shared_library',
    640           'variables': {
    641             'deps': [
    642               'libshill-client',
    643             ],
    644           },
    645           'sources': [
    646             'shims/c_ppp.cc',
    647             'shims/environment.cc',
    648             'shims/ppp.cc',
    649             'shims/pppd_plugin.c',
    650             'shims/task_proxy.cc',
    651           ],
    652         },
    653       ],
    654     }],
    655     ['USE_test == 1', {
    656       'targets': [
    657         {
    658           'target_name': 'shill_unittest',
    659           'type': 'executable',
    660           'dependencies': [
    661             'libshill',
    662           ],
    663           'includes': ['../../../../platform2/common-mk/common_test.gypi'],
    664           'variables': {
    665             'deps': [
    666               'libchrome-test-<(libbase_ver)',
    667               'libnetfilter_queue',
    668               'libnfnetlink',
    669             ],
    670           },
    671           'defines': [
    672             'SYSROOT="<(sysroot)"',
    673           ],
    674           'sources': [
    675             'active_link_monitor_unittest.cc',
    676             'arp_client_test_helper.cc',
    677             'arp_client_unittest.cc',
    678             'arp_packet_unittest.cc',
    679             'async_connection_unittest.cc',
    680             'certificate_file_unittest.cc',
    681             'connection_diagnostics_unittest.cc',
    682             'connection_health_checker_unittest.cc',
    683             'connection_info_reader_unittest.cc',
    684             'connection_info_unittest.cc',
    685             'connection_tester_unittest.cc',
    686             'connection_unittest.cc',
    687             'connectivity_trial_unittest.cc',
    688             'crypto_des_cbc_unittest.cc',
    689             'crypto_provider_unittest.cc',
    690             'crypto_rot47_unittest.cc',
    691             'crypto_util_proxy_unittest.cc',
    692             'daemon_task_unittest.cc',
    693             'dbus/chromeos_dbus_adaptor_unittest.cc',
    694             'dbus/chromeos_manager_dbus_adaptor_unittest.cc',
    695             'default_profile_unittest.cc',
    696             'device_claimer_unittest.cc',
    697             'device_info_unittest.cc',
    698             'device_unittest.cc',
    699             'dhcp/dhcp_config_unittest.cc',
    700             'dhcp/dhcp_provider_unittest.cc',
    701             'dhcp/dhcpv4_config_unittest.cc',
    702             'dhcp/mock_dhcp_config.cc',
    703             'dhcp/mock_dhcp_provider.cc',
    704             'dhcp/mock_dhcp_proxy.cc',
    705             'dhcp_properties_unittest.cc',
    706             'dns_client_unittest.cc',
    707             'dns_server_tester_unittest.cc',
    708             'error_unittest.cc',
    709             'ethernet/ethernet_service_unittest.cc',
    710             'ethernet/ethernet_unittest.cc',
    711             'ethernet/mock_ethernet.cc',
    712             'ethernet/mock_ethernet_service.cc',
    713             'external_task_unittest.cc',
    714             'fake_store.cc',
    715             'file_reader_unittest.cc',
    716             'hook_table_unittest.cc',
    717             'http_proxy_unittest.cc',
    718             'http_request_unittest.cc',
    719             'http_url_unittest.cc',
    720             'icmp_unittest.cc',
    721             'icmp_session_unittest.cc',
    722             'ip_address_store_unittest.cc',
    723             'ipconfig_unittest.cc',
    724             'key_value_store_unittest.cc',
    725             'link_monitor_unittest.cc',
    726             'manager_unittest.cc',
    727             'metrics_unittest.cc',
    728             'mock_active_link_monitor.cc',
    729             'mock_adaptors.cc',
    730             'mock_ares.cc',
    731             'mock_arp_client.cc',
    732             'mock_async_connection.cc',
    733             'mock_certificate_file.cc',
    734             'mock_connection.cc',
    735             'mock_connection_health_checker.cc',
    736             'mock_connection_info_reader.cc',
    737             'mock_connectivity_trial.cc',
    738             'mock_control.cc',
    739             'mock_crypto_util_proxy.cc',
    740             'mock_device.cc',
    741             'mock_device_claimer.cc',
    742             'mock_device_info.cc',
    743 	    'mock_dhcp_properties.cc',
    744             'mock_dns_client.cc',
    745             'mock_dns_client_factory.cc',
    746             'mock_dns_server_tester.cc',
    747             'mock_event_dispatcher.cc',
    748             'mock_external_task.cc',
    749             'mock_http_request.cc',
    750             'mock_icmp.cc',
    751             'mock_icmp_session.cc',
    752             'mock_icmp_session_factory.cc',
    753             'mock_ip_address_store.cc',
    754             'mock_ipconfig.cc',
    755             'mock_link_monitor.cc',
    756             'mock_log.cc',
    757             'mock_log_unittest.cc',
    758             'mock_manager.cc',
    759             'mock_metrics.cc',
    760             'mock_passive_link_monitor.cc',
    761             'mock_pending_activation_store.cc',
    762             'mock_portal_detector.cc',
    763             'mock_power_manager.cc',
    764             'mock_power_manager_proxy.cc',
    765             'mock_ppp_device.cc',
    766             'mock_ppp_device_factory.cc',
    767             'mock_process_manager.cc',
    768             'mock_profile.cc',
    769             'mock_property_store.cc',
    770             'mock_resolver.cc',
    771             'mock_routing_table.cc',
    772             'mock_service.cc',
    773             'mock_socket_info_reader.cc',
    774             'mock_store.cc',
    775             'mock_traffic_monitor.cc',
    776             'mock_virtual_device.cc',
    777             'net/attribute_list_unittest.cc',
    778             'net/byte_string_unittest.cc',
    779             'net/event_history_unittest.cc',
    780             'net/ip_address_unittest.cc',
    781             'net/netlink_attribute_unittest.cc',
    782             'net/rtnl_handler_unittest.cc',
    783             'net/rtnl_listener_unittest.cc',
    784             'net/rtnl_message_unittest.cc',
    785             'net/shill_time_unittest.cc',
    786             'nice_mock_control.cc',
    787             'passive_link_monitor_unittest.cc',
    788             'pending_activation_store_unittest.cc',
    789             'portal_detector_unittest.cc',
    790             'power_manager_unittest.cc',
    791             'ppp_daemon_unittest.cc',
    792             'ppp_device_unittest.cc',
    793             'pppoe/pppoe_service_unittest.cc',
    794             'process_manager_unittest.cc',
    795             'profile_unittest.cc',
    796             'property_accessor_unittest.cc',
    797             'property_observer_unittest.cc',
    798             'property_store_unittest.cc',
    799             'resolver_unittest.cc',
    800             'result_aggregator_unittest.cc',
    801             'routing_table_unittest.cc',
    802             'rpc_task_unittest.cc',
    803             'scope_logger_unittest.cc',
    804             'service_property_change_test.cc',
    805             'service_under_test.cc',
    806             'service_unittest.cc',
    807             'shims/netfilter_queue_processor.cc',
    808             'shims/netfilter_queue_processor_unittest.cc',
    809             'socket_info_reader_unittest.cc',
    810             'socket_info_unittest.cc',
    811             'static_ip_parameters_unittest.cc',
    812             'technology_unittest.cc',
    813             'testrunner.cc',
    814             'traffic_monitor_unittest.cc',
    815             'upstart/mock_upstart.cc',
    816             'upstart/mock_upstart_proxy.cc',
    817             'upstart/upstart_unittest.cc',
    818             'virtual_device_unittest.cc',
    819             'vpn/mock_vpn_provider.cc',
    820           ],
    821           'conditions': [
    822             ['USE_cellular == 1', {
    823               'variables': {
    824                 'deps': [
    825                   'ModemManager',
    826                 ],
    827               },
    828               'sources': [
    829                 'cellular/active_passive_out_of_credits_detector_unittest.cc',
    830                 'cellular/cellular_bearer_unittest.cc',
    831                 'cellular/cellular_capability_cdma_unittest.cc',
    832                 'cellular/cellular_capability_classic_unittest.cc',
    833                 'cellular/cellular_capability_gsm_unittest.cc',
    834                 'cellular/cellular_capability_universal_cdma_unittest.cc',
    835                 'cellular/cellular_capability_universal_unittest.cc',
    836                 'cellular/cellular_error_unittest.cc',
    837                 'cellular/cellular_service_unittest.cc',
    838                 'cellular/cellular_unittest.cc',
    839                 'cellular/mobile_operator_info_unittest.cc',
    840                 'cellular/mock_cellular.cc',
    841                 'cellular/mock_cellular_service.cc',
    842                 'cellular/mock_dbus_objectmanager_proxy.cc',
    843                 'cellular/mock_mm1_modem_modem3gpp_proxy.cc',
    844                 'cellular/mock_mm1_modem_modemcdma_proxy.cc',
    845                 'cellular/mock_mm1_modem_proxy.cc',
    846                 'cellular/mock_mm1_modem_simple_proxy.cc',
    847                 'cellular/mock_mm1_sim_proxy.cc',
    848                 'cellular/mock_mobile_operator_info.cc',
    849                 'cellular/mock_modem.cc',
    850                 'cellular/mock_modem_cdma_proxy.cc',
    851                 'cellular/mock_modem_gobi_proxy.cc',
    852                 'cellular/mock_modem_gsm_card_proxy.cc',
    853                 'cellular/mock_modem_gsm_network_proxy.cc',
    854                 'cellular/mock_modem_info.cc',
    855                 'cellular/mock_modem_manager_proxy.cc',
    856                 'cellular/mock_modem_proxy.cc',
    857                 'cellular/mock_modem_simple_proxy.cc',
    858                 'cellular/mock_out_of_credits_detector.cc',
    859                 'cellular/modem_1_unittest.cc',
    860                 'cellular/modem_info_unittest.cc',
    861                 'cellular/modem_manager_unittest.cc',
    862                 'cellular/modem_unittest.cc',
    863                 'cellular/subscription_state_out_of_credits_detector_unittest.cc',
    864                 'mock_dbus_properties_proxy.cc',
    865               ],
    866             }],
    867             ['USE_dhcpv6 == 1', {
    868               'sources': [
    869                 'dhcp/dhcpv6_config_unittest.cc',
    870               ],
    871             }],
    872             ['USE_json_store == 0', {
    873               'sources': [
    874                 'key_file_store_unittest.cc',
    875               ],
    876             }],
    877             ['USE_json_store == 1', {
    878               'sources': [
    879                 'json_store_unittest.cc',
    880               ],
    881             }],
    882             ['USE_vpn == 1', {
    883               'sources': [
    884                 'shims/environment.cc',
    885                 'shims/environment_unittest.cc',
    886                 'vpn/l2tp_ipsec_driver_unittest.cc',
    887                 'vpn/mock_openvpn_driver.cc',
    888                 'vpn/mock_openvpn_management_server.cc',
    889                 'vpn/mock_vpn_driver.cc',
    890                 'vpn/mock_vpn_service.cc',
    891                 'vpn/openvpn_driver_unittest.cc',
    892                 'vpn/openvpn_management_server_unittest.cc',
    893                 'vpn/third_party_vpn_driver_unittest.cc',
    894                 'vpn/vpn_driver_unittest.cc',
    895                 'vpn/vpn_provider_unittest.cc',
    896                 'vpn/vpn_service_unittest.cc',
    897               ],
    898             }],
    899             ['USE_wifi == 1', {
    900               'sources': [
    901                 'net/netlink_manager_unittest.cc',
    902                 'net/netlink_message_unittest.cc',
    903                 'net/netlink_packet_unittest.cc',
    904                 'net/netlink_socket_unittest.cc',
    905                 'net/nl80211_attribute_unittest.cc',
    906                 'supplicant/mock_supplicant_bss_proxy.cc',
    907                 'wifi/callback80211_metrics_unittest.cc',
    908                 'wifi/mac80211_monitor_unittest.cc',
    909                 'wifi/mock_mac80211_monitor.cc',
    910                 'wifi/mock_scan_session.cc',
    911                 'wifi/mock_tdls_manager.cc',
    912                 'wifi/mock_wake_on_wifi.cc',
    913                 'wifi/mock_wifi.cc',
    914                 'wifi/mock_wifi_provider.cc',
    915                 'wifi/mock_wifi_service.cc',
    916                 'wifi/scan_session_unittest.cc',
    917                 'wifi/tdls_manager_unittest.cc',
    918                 'wifi/wake_on_wifi_unittest.cc',
    919                 'wifi/wifi_endpoint_unittest.cc',
    920                 'wifi/wifi_provider_unittest.cc',
    921                 'wifi/wifi_service_unittest.cc',
    922                 'wifi/wifi_unittest.cc',
    923               ],
    924             }],
    925             ['USE_wifi == 1 or USE_wired_8021x == 1', {
    926               'sources': [
    927                 'eap_credentials_unittest.cc',
    928                 'eap_listener_unittest.cc',
    929                 'mock_eap_credentials.cc',
    930                 'mock_eap_listener.cc',
    931                 'supplicant/mock_supplicant_eap_state_handler.cc',
    932                 'supplicant/mock_supplicant_interface_proxy.cc',
    933                 'supplicant/mock_supplicant_network_proxy.cc',
    934                 'supplicant/mock_supplicant_process_proxy.cc',
    935                 'supplicant/supplicant_eap_state_handler_unittest.cc',
    936                 'supplicant/wpa_supplicant_unittest.cc',
    937               ],
    938             }],
    939             ['USE_wimax == 1', {
    940               'sources': [
    941                 'wimax/mock_wimax.cc',
    942                 'wimax/mock_wimax_device_proxy.cc',
    943                 'wimax/mock_wimax_manager_proxy.cc',
    944                 'wimax/mock_wimax_network_proxy.cc',
    945                 'wimax/mock_wimax_provider.cc',
    946                 'wimax/mock_wimax_service.cc',
    947                 'wimax/wimax_provider_unittest.cc',
    948                 'wimax/wimax_service_unittest.cc',
    949                 'wimax/wimax_unittest.cc',
    950               ],
    951             }],
    952             ['USE_wired_8021x == 1', {
    953               'sources': [
    954                 'ethernet/ethernet_eap_provider_unittest.cc',
    955                 'ethernet/ethernet_eap_service_unittest.cc',
    956                 'ethernet/mock_ethernet_eap_provider.cc',
    957               ],
    958             }],
    959           ],
    960         },
    961         {
    962           'target_name': 'shill_setup_wifi',
    963           'type': 'executable',
    964           'variables': {
    965             'deps': [
    966               'libshill-client',
    967             ],
    968           },
    969           'sources': [
    970             'setup_wifi/main.cc'
    971           ],
    972         },
    973       ],
    974     }],
    975   ],
    976 }
    977