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
17LOCAL_PATH := $(call my-dir)
18
19# Common variables
20# ========================================================
21
22# Definitions applying to all targets built from C++ source files.
23# Be sure to $(eval) this last.
24define shill_cpp_common
25  LOCAL_CPP_EXTENSION := .cc
26  LOCAL_CLANG := true
27  LOCAL_CFLAGS := \
28      -Wextra \
29      -Werror \
30      -Wno-unused-parameter \
31      -DRUNDIR=\"/data/misc/shill\" \
32      -DSHIMDIR=\"/system/lib/shill/shims\" \
33      -DDISABLE_CELLULAR \
34      -DDISABLE_VPN \
35      -DDISABLE_WAKE_ON_WIFI \
36      -DDISABLE_WIMAX \
37      -DENABLE_CHROMEOS_DBUS \
38      -DENABLE_JSON_STORE
39  ifeq ($(SHILL_USE_BINDER), true)
40    LOCAL_CFLAGS += -DENABLE_BINDER
41  endif # SHILL_USE_BINDER
42  ifneq ($(SHILL_USE_WIFI), true)
43    LOCAL_CFLAGS += -DDISABLE_WIFI
44  endif
45  ifneq ($(SHILL_USE_DHCPV6), true)
46    LOCAL_CFLAGS += -DDISABLE_DHCPV6
47  endif
48  ifneq ($(SHILL_USE_PPPOE), true)
49    LOCAL_CFLAGS += -DDISABLE_PPPOE
50  endif
51  ifneq ($(SHILL_USE_WIRED_8021X), true)
52    LOCAL_CFLAGS += -DDISABLE_WIRED_8021X
53  endif
54  # The following flags ensure that shill builds with the same compiler
55  # warnings disabled in CrOS and Android.
56  LOCAL_CFLAGS +=  \
57      -Wmultichar \
58      -Wunused
59endef
60
61shill_parent_dir := $(LOCAL_PATH)/../
62
63shill_c_includes := \
64    $(shill_parent_dir) \
65    external/gtest/include/
66
67shill_shared_libraries := \
68    libbrillo \
69    libchrome \
70    libdbus
71
72shill_cpp_flags := \
73    -fno-strict-aliasing \
74    -Woverloaded-virtual \
75    -Wno-missing-field-initializers  # for LAZY_INSTANCE_INITIALIZER
76
77# libshill-net (shared library)
78# ========================================================
79include $(CLEAR_VARS)
80LOCAL_MODULE := libshill-net
81LOCAL_MODULE_CLASS := SHARED_LIBRARIES
82LOCAL_CPPFLAGS := $(shill_cpp_flags)
83LOCAL_SHARED_LIBRARIES := $(shill_shared_libraries)
84LOCAL_C_INCLUDES := $(shill_c_includes)
85LOCAL_SRC_FILES := \
86    net/attribute_list.cc \
87    net/byte_string.cc \
88    net/control_netlink_attribute.cc \
89    net/event_history.cc \
90    net/generic_netlink_message.cc \
91    net/io_handler_factory.cc \
92    net/io_handler_factory_container.cc \
93    net/io_input_handler.cc \
94    net/io_ready_handler.cc \
95    net/ip_address.cc \
96    net/netlink_attribute.cc \
97    net/netlink_manager.cc \
98    net/netlink_message.cc \
99    net/netlink_packet.cc \
100    net/netlink_socket.cc \
101    net/nl80211_attribute.cc \
102    net/nl80211_message.cc \
103    net/rtnl_handler.cc \
104    net/rtnl_listener.cc \
105    net/rtnl_message.cc \
106    net/shill_time.cc \
107    net/sockets.cc
108$(eval $(shill_cpp_common))
109include $(BUILD_SHARED_LIBRARY)
110
111# libshill-client (shared library)
112# ========================================================
113include $(CLEAR_VARS)
114LOCAL_MODULE := libshill-client
115LOCAL_DBUS_PROXY_PREFIX := shill
116# TODO(samueltan): do not build these dbus-xml files when shill is using
117# its Binder interface. All of shill's D-Bus clients will have to accommodate
118# to this change.
119LOCAL_SRC_FILES := \
120    dbus_bindings/dbus-service-config.json \
121    dbus_bindings/org.chromium.flimflam.Device.dbus-xml \
122    dbus_bindings/org.chromium.flimflam.IPConfig.dbus-xml \
123    dbus_bindings/org.chromium.flimflam.Manager.dbus-xml \
124    dbus_bindings/org.chromium.flimflam.Profile.dbus-xml \
125    dbus_bindings/org.chromium.flimflam.Service.dbus-xml \
126    dbus_bindings/org.chromium.flimflam.Task.dbus-xml \
127    dbus_bindings/org.chromium.flimflam.ThirdPartyVpn.dbus-xml
128ifeq ($(SHILL_USE_BINDER), true)
129LOCAL_AIDL_INCLUDES := \
130    system/connectivity/shill/binder \
131    frameworks/native/aidl/binder
132LOCAL_SHARED_LIBRARIES := libbinder libutils
133LOCAL_SRC_FILES += \
134    binder/android/system/connectivity/shill/IDevice.aidl \
135    binder/android/system/connectivity/shill/IManager.aidl \
136    binder/android/system/connectivity/shill/IService.aidl \
137    binder/android/system/connectivity/shill/IPropertyChangedCallback.aidl
138endif # SHILL_USE_BINDER
139LOCAL_EXPORT_C_INCLUDE_DIRS := external/cros/system_api/
140include $(BUILD_SHARED_LIBRARY)
141
142# supplicant-proxies (static library)
143# ========================================================
144include $(CLEAR_VARS)
145LOCAL_MODULE := supplicant-proxies
146LOCAL_DBUS_PROXY_PREFIX := supplicant
147LOCAL_SRC_FILES := \
148    dbus_bindings/supplicant-bss.dbus-xml \
149    dbus_bindings/supplicant-interface.dbus-xml \
150    dbus_bindings/supplicant-network.dbus-xml \
151    dbus_bindings/supplicant-process.dbus-xml
152include $(BUILD_STATIC_LIBRARY)
153
154# dhcpcd-proxies (static library)
155# ========================================================
156include $(CLEAR_VARS)
157LOCAL_MODULE := dhcpcd-proxies
158LOCAL_DBUS_PROXY_PREFIX := dhcpcd
159LOCAL_SRC_FILES := dbus_bindings/dhcpcd.dbus-xml
160include $(BUILD_STATIC_LIBRARY)
161
162# libshill (static library)
163# ========================================================
164include $(CLEAR_VARS)
165LOCAL_MODULE := libshill
166LOCAL_MODULE_CLASS := STATIC_LIBRARIES
167LOCAL_CPPFLAGS := $(shill_cpp_flags) -Wno-sign-compare
168LOCAL_STATIC_LIBRARIES := \
169    supplicant-proxies \
170    dhcpcd-proxies
171LOCAL_SHARED_LIBRARIES := \
172    $(shill_shared_libraries) \
173    libshill-net \
174    libcares \
175    libmetrics \
176    libprotobuf-cpp-lite \
177    libminijail \
178    libfirewalld-client
179proto_header_dir := $(call local-generated-sources-dir)/proto/$(shill_parent_dir)
180LOCAL_C_INCLUDES := \
181    $(shill_c_includes) \
182    $(proto_header_dir) \
183    external/cros/system_api/
184LOCAL_SRC_FILES := \
185    shims/protos/crypto_util.proto \
186    json_store.cc \
187    active_link_monitor.cc \
188    arp_client.cc \
189    arp_packet.cc \
190    async_connection.cc \
191    certificate_file.cc \
192    connection.cc \
193    connection_diagnostics.cc \
194    connection_health_checker.cc \
195    connection_info.cc \
196    connection_info_reader.cc \
197    connection_tester.cc \
198    connectivity_trial.cc \
199    crypto_rot47.cc \
200    crypto_util_proxy.cc \
201    daemon_task.cc \
202    dbus/chromeos_dbus_service_watcher.cc \
203    dbus/chromeos_dhcpcd_listener.cc \
204    dbus/chromeos_dhcpcd_proxy.cc \
205    dbus/chromeos_firewalld_proxy.cc \
206    default_profile.cc \
207    device.cc \
208    device_claimer.cc \
209    device_info.cc \
210    dhcp_properties.cc \
211    dhcp/dhcp_config.cc \
212    dhcp/dhcp_provider.cc \
213    dhcp/dhcpv4_config.cc \
214    dns_client.cc \
215    dns_client_factory.cc \
216    dns_server_proxy.cc \
217    dns_server_proxy_factory.cc \
218    dns_server_tester.cc \
219    ephemeral_profile.cc \
220    error.cc \
221    ethernet/ethernet.cc \
222    ethernet/ethernet_service.cc \
223    ethernet/ethernet_temporary_service.cc \
224    ethernet/virtio_ethernet.cc \
225    event_dispatcher.cc \
226    external_task.cc \
227    file_io.cc \
228    file_reader.cc \
229    geolocation_info.cc \
230    hook_table.cc \
231    http_proxy.cc \
232    http_request.cc \
233    http_url.cc \
234    icmp.cc \
235    icmp_session.cc \
236    icmp_session_factory.cc \
237    ip_address_store.cc \
238    ipconfig.cc \
239    key_value_store.cc \
240    link_monitor.cc \
241    logging.cc \
242    manager.cc \
243    metrics.cc \
244    passive_link_monitor.cc \
245    pending_activation_store.cc \
246    portal_detector.cc \
247    power_manager.cc \
248    power_manager_proxy_stub.cc \
249    ppp_daemon.cc \
250    ppp_device.cc \
251    ppp_device_factory.cc \
252    pppoe/pppoe_service.cc \
253    process_manager.cc \
254    profile.cc \
255    property_store.cc \
256    resolver.cc \
257    result_aggregator.cc \
258    routing_table.cc \
259    rpc_task.cc \
260    scope_logger.cc \
261    scoped_umask.cc \
262    service.cc \
263    service_property_change_notifier.cc \
264    shill_ares.cc \
265    shill_config.cc \
266    shill_daemon.cc \
267    shill_test_config.cc \
268    socket_info.cc \
269    socket_info_reader.cc \
270    static_ip_parameters.cc \
271    store_factory.cc \
272    technology.cc \
273    tethering.cc \
274    traffic_monitor.cc \
275    upstart/upstart.cc \
276    upstart/upstart_proxy_stub.cc \
277    virtual_device.cc \
278    vpn/vpn_driver.cc \
279    vpn/vpn_provider.cc \
280    vpn/vpn_service.cc
281ifeq ($(SHILL_USE_BINDER), true)
282LOCAL_AIDL_INCLUDES := \
283    system/connectivity/shill/binder \
284    frameworks/native/aidl/binder
285LOCAL_SHARED_LIBRARIES += libbinder libbinderwrapper libutils libbrillo-binder
286LOCAL_SRC_FILES += \
287    adaptor_stub.cc \
288    binder/android/system/connectivity/shill/IDevice.aidl \
289    binder/android/system/connectivity/shill/IManager.aidl \
290    binder/android/system/connectivity/shill/IPropertyChangedCallback.aidl \
291    binder/android/system/connectivity/shill/IService.aidl \
292    binder/binder_adaptor.cc \
293    binder/binder_control.cc \
294    binder/device_binder_adaptor.cc \
295    binder/manager_binder_adaptor.cc \
296    binder/service_binder_adaptor.cc \
297    ipconfig_adaptor_stub.cc \
298    profile_adaptor_stub.cc \
299    rpc_task_adaptor_stub.cc \
300    third_party_vpn_adaptor_stub.cc
301else
302LOCAL_SRC_FILES += \
303    dbus/chromeos_dbus_adaptor.cc \
304    dbus/chromeos_dbus_control.cc \
305    dbus/chromeos_device_dbus_adaptor.cc \
306    dbus/chromeos_ipconfig_dbus_adaptor.cc \
307    dbus/chromeos_manager_dbus_adaptor.cc \
308    dbus/chromeos_profile_dbus_adaptor.cc \
309    dbus/chromeos_rpc_task_dbus_adaptor.cc \
310    dbus/chromeos_service_dbus_adaptor.cc \
311    dbus/chromeos_third_party_vpn_dbus_adaptor.cc \
312    dbus/dbus_service_watcher_factory.cc \
313    dbus_bindings/org.chromium.flimflam.Device.dbus-xml \
314    dbus_bindings/org.chromium.flimflam.IPConfig.dbus-xml \
315    dbus_bindings/org.chromium.flimflam.Manager.dbus-xml \
316    dbus_bindings/org.chromium.flimflam.Profile.dbus-xml \
317    dbus_bindings/org.chromium.flimflam.Service.dbus-xml \
318    dbus_bindings/org.chromium.flimflam.Task.dbus-xml \
319    dbus_bindings/org.chromium.flimflam.ThirdPartyVpn.dbus-xml
320endif # SHILL_USE_BINDER
321ifeq ($(SHILL_USE_WIFI), true)
322LOCAL_SRC_FILES += \
323    wifi/callback80211_metrics.cc \
324    wifi/mac80211_monitor.cc \
325    wifi/scan_session.cc \
326    wifi/tdls_manager.cc \
327    wifi/wake_on_wifi.cc \
328    wifi/wifi.cc \
329    wifi/wifi_endpoint.cc \
330    wifi/wifi_provider.cc \
331    wifi/wifi_service.cc
332endif
333ifeq ($(SHILL_USE_WIRED_8021X), true)
334LOCAL_SRC_FILES += \
335    ethernet/ethernet_eap_provider.cc \
336    ethernet/ethernet_eap_service.cc
337endif
338ifeq ($(SHILL_USE_DHCPV6), true)
339LOCAL_SRC_FILES += dhcp/dhcpv6_config.cc
340endif
341ifneq (,$(filter true, $(SHILL_USE_WIRED_8021X) $(SHILL_USE_WIFI)))
342LOCAL_SRC_FILES += \
343    dbus/chromeos_supplicant_bss_proxy.cc \
344    dbus/chromeos_supplicant_interface_proxy.cc \
345    dbus/chromeos_supplicant_network_proxy.cc \
346    dbus/chromeos_supplicant_process_proxy.cc \
347    supplicant/supplicant_eap_state_handler.cc \
348    supplicant/wpa_supplicant.cc \
349    eap_credentials.cc \
350    eap_listener.cc
351endif
352ifdef BRILLO
353LOCAL_SHARED_LIBRARIES += libhardware
354LOCAL_C_INCLUDES += device/generic/brillo/wifi_driver_hal/include
355LOCAL_SRC_FILES += wifi/wifi_driver_hal.cc
356endif # BRILLO
357$(eval $(shill_cpp_common))
358include $(BUILD_STATIC_LIBRARY)
359
360# shill
361# ========================================================
362include $(CLEAR_VARS)
363LOCAL_MODULE := shill
364LOCAL_CPPFLAGS := $(shill_cpp_flags)
365LOCAL_SHARED_LIBRARIES := \
366    $(shill_shared_libraries) \
367    libbrillo-minijail \
368    libminijail \
369    libcares \
370    libbrillo-dbus \
371    libchrome-dbus \
372    libshill-net \
373    libmetrics \
374    libprotobuf-cpp-lite
375ifeq ($(SHILL_USE_BINDER), true)
376LOCAL_SHARED_LIBRARIES += libbinder libbinderwrapper libutils libbrillo-binder
377endif # SHILL_USE_BINDER
378ifdef BRILLO
379LOCAL_SHARED_LIBRARIES += libhardware
380LOCAL_REQUIRED_MODULES := $(WIFI_DRIVER_HAL_MODULE)
381endif # BRILLO
382LOCAL_STATIC_LIBRARIES := libshill
383LOCAL_C_INCLUDES := $(shill_c_includes)
384LOCAL_SRC_FILES := shill_main.cc
385LOCAL_INIT_RC := shill.rc
386$(eval $(shill_cpp_common))
387include $(BUILD_EXECUTABLE)
388
389# shill_test (native test)
390# ========================================================
391include $(CLEAR_VARS)
392LOCAL_MODULE := shill_test
393LOCAL_MODULE_CLASS := EXECUTABLES
394ifdef BRILLO
395LOCAL_MODULE_TAGS := eng
396endif # BRILLO
397LOCAL_CPPFLAGS := $(shill_cpp_flags) -Wno-sign-compare -Wno-return-stack-address
398LOCAL_SHARED_LIBRARIES := \
399    $(shill_shared_libraries) \
400    libshill-net \
401    libminijail \
402    libmetrics \
403    libcares \
404    libbrillo-minijail \
405    libbrillo-dbus \
406    libchrome-dbus \
407    libprotobuf-cpp-lite
408LOCAL_STATIC_LIBRARIES := libshill libgmock libchrome_test_helpers
409proto_header_dir := $(call local-generated-sources-dir)/proto/$(shill_parent_dir)
410LOCAL_C_INCLUDES := \
411    $(shill_c_includes) \
412    $(proto_header_dir) \
413    external/cros/system_api/
414LOCAL_SRC_FILES := \
415    shims/protos/crypto_util.proto \
416    active_link_monitor_unittest.cc \
417    arp_client_test_helper.cc \
418    arp_client_unittest.cc \
419    arp_packet_unittest.cc \
420    async_connection_unittest.cc \
421    certificate_file_unittest.cc \
422    connection_diagnostics_unittest.cc \
423    connection_health_checker_unittest.cc \
424    connection_info_reader_unittest.cc \
425    connection_info_unittest.cc \
426    connection_tester_unittest.cc \
427    connection_unittest.cc \
428    connectivity_trial_unittest.cc \
429    crypto_rot47_unittest.cc \
430    crypto_util_proxy_unittest.cc \
431    daemon_task_unittest.cc \
432    default_profile_unittest.cc \
433    device_claimer_unittest.cc \
434    device_info_unittest.cc \
435    device_unittest.cc \
436    dhcp/dhcp_config_unittest.cc \
437    dhcp/dhcp_provider_unittest.cc \
438    dhcp/dhcpv4_config_unittest.cc \
439    dhcp/mock_dhcp_config.cc \
440    dhcp/mock_dhcp_provider.cc \
441    dhcp/mock_dhcp_proxy.cc \
442    dhcp_properties_unittest.cc \
443    dns_client_unittest.cc \
444    dns_server_tester_unittest.cc \
445    error_unittest.cc \
446    ethernet/ethernet_service_unittest.cc \
447    ethernet/ethernet_unittest.cc \
448    ethernet/mock_ethernet.cc \
449    ethernet/mock_ethernet_service.cc \
450    external_task_unittest.cc \
451    fake_store.cc \
452    file_reader_unittest.cc \
453    hook_table_unittest.cc \
454    http_proxy_unittest.cc \
455    http_request_unittest.cc \
456    http_url_unittest.cc \
457    icmp_unittest.cc \
458    icmp_session_unittest.cc \
459    ip_address_store_unittest.cc \
460    ipconfig_unittest.cc \
461    key_value_store_unittest.cc \
462    link_monitor_unittest.cc \
463    manager_unittest.cc \
464    metrics_unittest.cc \
465    mock_active_link_monitor.cc \
466    mock_adaptors.cc \
467    mock_ares.cc \
468    mock_arp_client.cc \
469    mock_async_connection.cc \
470    mock_certificate_file.cc \
471    mock_connection.cc \
472    mock_connection_health_checker.cc \
473    mock_connection_info_reader.cc \
474    mock_connectivity_trial.cc \
475    mock_control.cc \
476    mock_crypto_util_proxy.cc \
477    mock_device.cc \
478    mock_device_claimer.cc \
479    mock_device_info.cc \
480    mock_dhcp_properties.cc \
481    mock_dns_client.cc \
482    mock_dns_client_factory.cc \
483    mock_dns_server_proxy.cc \
484    mock_dns_server_proxy_factory.cc \
485    mock_dns_server_tester.cc \
486    mock_event_dispatcher.cc \
487    mock_external_task.cc \
488    mock_http_request.cc \
489    mock_icmp.cc \
490    mock_icmp_session.cc \
491    mock_icmp_session_factory.cc \
492    mock_ip_address_store.cc \
493    mock_ipconfig.cc \
494    mock_link_monitor.cc \
495    mock_log.cc \
496    mock_log_unittest.cc \
497    mock_manager.cc \
498    mock_metrics.cc \
499    mock_passive_link_monitor.cc \
500    mock_pending_activation_store.cc \
501    mock_portal_detector.cc \
502    mock_power_manager.cc \
503    mock_power_manager_proxy.cc \
504    mock_ppp_device.cc \
505    mock_ppp_device_factory.cc \
506    mock_process_manager.cc \
507    mock_profile.cc \
508    mock_property_store.cc \
509    mock_resolver.cc \
510    mock_routing_table.cc \
511    mock_service.cc \
512    mock_socket_info_reader.cc \
513    mock_store.cc \
514    mock_traffic_monitor.cc \
515    mock_virtual_device.cc \
516    net/attribute_list_unittest.cc \
517    net/byte_string_unittest.cc \
518    net/event_history_unittest.cc \
519    net/ip_address_unittest.cc \
520    net/netlink_attribute_unittest.cc \
521    net/rtnl_handler_unittest.cc \
522    net/rtnl_listener_unittest.cc \
523    net/rtnl_message_unittest.cc \
524    net/shill_time_unittest.cc \
525    nice_mock_control.cc \
526    passive_link_monitor_unittest.cc \
527    pending_activation_store_unittest.cc \
528    portal_detector_unittest.cc \
529    power_manager_unittest.cc \
530    ppp_daemon_unittest.cc \
531    ppp_device_unittest.cc \
532    pppoe/pppoe_service_unittest.cc \
533    process_manager_unittest.cc \
534    profile_unittest.cc \
535    property_accessor_unittest.cc \
536    property_observer_unittest.cc \
537    property_store_unittest.cc \
538    resolver_unittest.cc \
539    result_aggregator_unittest.cc \
540    routing_table_unittest.cc \
541    rpc_task_unittest.cc \
542    scope_logger_unittest.cc \
543    service_property_change_test.cc \
544    service_under_test.cc \
545    service_unittest.cc \
546    socket_info_reader_unittest.cc \
547    socket_info_unittest.cc \
548    static_ip_parameters_unittest.cc \
549    technology_unittest.cc \
550    testrunner.cc \
551    traffic_monitor_unittest.cc \
552    upstart/mock_upstart.cc \
553    upstart/mock_upstart_proxy.cc \
554    upstart/upstart_unittest.cc \
555    virtual_device_unittest.cc \
556    vpn/mock_vpn_provider.cc \
557    json_store_unittest.cc
558ifeq ($(SHILL_USE_BINDER), true)
559LOCAL_SHARED_LIBRARIES += libbinder libbinderwrapper libutils libbrillo-binder
560else
561LOCAL_STATIC_LIBRARIES += libchrome_dbus_test_helpers
562LOCAL_SRC_FILES += \
563    dbus/chromeos_dbus_adaptor_unittest.cc \
564    dbus/chromeos_manager_dbus_adaptor_unittest.cc
565endif # SHILL_USE_BINDER
566ifeq ($(SHILL_USE_WIFI), true)
567LOCAL_SRC_FILES += \
568    net/netlink_manager_unittest.cc \
569    net/netlink_message_unittest.cc \
570    net/netlink_packet_unittest.cc \
571    net/netlink_socket_unittest.cc \
572    net/nl80211_attribute_unittest.cc \
573    supplicant/mock_supplicant_bss_proxy.cc \
574    wifi/callback80211_metrics_unittest.cc \
575    wifi/mac80211_monitor_unittest.cc \
576    wifi/mock_mac80211_monitor.cc \
577    wifi/mock_scan_session.cc \
578    wifi/mock_tdls_manager.cc \
579    wifi/mock_wake_on_wifi.cc \
580    wifi/mock_wifi.cc \
581    wifi/mock_wifi_provider.cc \
582    wifi/mock_wifi_service.cc \
583    wifi/scan_session_unittest.cc \
584    wifi/tdls_manager_unittest.cc \
585    wifi/wake_on_wifi_unittest.cc \
586    wifi/wifi_endpoint_unittest.cc \
587    wifi/wifi_provider_unittest.cc \
588    wifi/wifi_service_unittest.cc \
589    wifi/wifi_unittest.cc
590endif
591ifeq ($(SHILL_USE_DHCPV6), true)
592LOCAL_SRC_FILES += dhcp/dhcpv6_config_unittest.cc
593endif
594ifeq ($(SHILL_USE_WIRED_8021X), true)
595LOCAL_SRC_FILES += \
596    ethernet/ethernet_eap_provider_unittest.cc \
597    ethernet/ethernet_eap_service_unittest.cc \
598    ethernet/mock_ethernet_eap_provider.cc
599endif
600ifneq (,$(filter true, $(SHILL_USE_WIRED_8021X) $(SHILL_USE_WIFI)))
601LOCAL_SRC_FILES += \
602    supplicant/mock_supplicant_eap_state_handler.cc \
603    supplicant/mock_supplicant_interface_proxy.cc \
604    supplicant/mock_supplicant_network_proxy.cc \
605    supplicant/mock_supplicant_process_proxy.cc \
606    supplicant/supplicant_eap_state_handler_unittest.cc \
607    supplicant/wpa_supplicant_unittest.cc \
608    eap_credentials_unittest.cc \
609    eap_listener_unittest.cc \
610    mock_eap_credentials.cc \
611    mock_eap_listener.cc
612endif
613ifdef BRILLO
614LOCAL_SHARED_LIBRARIES += libhardware
615endif # BRILLO
616$(eval $(shill_cpp_common))
617include $(BUILD_NATIVE_TEST)
618
619# helper scripts
620# ========================================================
621include $(CLEAR_VARS)
622LOCAL_MODULE_TAGS := eng tests
623LOCAL_PREBUILT_EXECUTABLES := \
624    bin/wpa_debug \
625    bin/ff_debug
626include $(BUILD_MULTI_PREBUILT)
627
628# The following  two targets use the shill D-Bus API, which we do not expose
629# if we are using Binder.
630ifneq ($(SHILL_USE_BINDER), true)
631
632# setup_wifi
633# ========================================================
634include $(CLEAR_VARS)
635# The module name can't be the same of a directory in the source code.
636LOCAL_MODULE := shill_setup_wifi
637LOCAL_CPPFLAGS := $(shill_cpp_flags)
638LOCAL_SHARED_LIBRARIES := \
639    $(shill_shared_libraries) \
640    libshill-client \
641    libbrillo-dbus \
642    libchrome-dbus
643LOCAL_C_INCLUDES := $(shill_c_includes)
644LOCAL_SRC_FILES := setup_wifi/main.cc
645$(eval $(shill_cpp_common))
646include $(BUILD_EXECUTABLE)
647
648# test-rpc-proxy
649# ========================================================
650include $(CLEAR_VARS)
651LOCAL_MODULE := shill-test-rpc-proxy
652LOCAL_MODULE_TAGS := eng tests
653LOCAL_CPPFLAGS := $(shill_cpp_flags)
654LOCAL_SHARED_LIBRARIES := \
655    $(shill_shared_libraries) \
656    libshill-client \
657    libbrillo-dbus \
658    libchrome-dbus \
659    libxmlrpc++
660LOCAL_C_INCLUDES := \
661    $(shill_c_includes) \
662    external/cros/system_api/dbus \
663    external/xmlrpcpp/src
664$(eval $(shill_cpp_common))
665LOCAL_SRC_FILES := $(call all-cpp-files-under,test-rpc-proxy)
666include $(BUILD_EXECUTABLE)
667
668endif # SHILL_USE_BINDER
669
670