Home | History | Annotate | Download | only in wificond
      1 # Copyright (C) 2016 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 LOCAL_PATH := $(call my-dir)
     16 wificond_cpp_flags := -Wall -Werror -Wno-unused-parameter
     17 wificond_parent_dir := $(LOCAL_PATH)/../
     18 wificond_includes := \
     19     $(wificond_parent_dir)
     20 
     21 
     22 ###
     23 ### wificond daemon.
     24 ###
     25 include $(CLEAR_VARS)
     26 LOCAL_MODULE := wificond
     27 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
     28 LOCAL_INIT_RC := wificond.rc
     29 LOCAL_C_INCLUDES := $(wificond_includes)
     30 LOCAL_SRC_FILES := \
     31     main.cpp
     32 LOCAL_SHARED_LIBRARIES := \
     33     android.hardware.wifi.offload (a] 1.0 \
     34     libbinder \
     35     libbase \
     36     libcutils \
     37     libhidlbase \
     38     libhidltransport \
     39     libminijail \
     40     libutils \
     41     libwifi-system \
     42     libwifi-system-iface
     43 LOCAL_STATIC_LIBRARIES := \
     44     libwificond
     45 include $(BUILD_EXECUTABLE)
     46 
     47 ###
     48 ### wificond static library
     49 ###
     50 include $(CLEAR_VARS)
     51 LOCAL_MODULE := libwificond
     52 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
     53 LOCAL_C_INCLUDES := $(wificond_includes)
     54 LOCAL_SRC_FILES := \
     55     ap_interface_binder.cpp \
     56     ap_interface_impl.cpp \
     57     client_interface_binder.cpp \
     58     client_interface_impl.cpp \
     59     logging_utils.cpp \
     60     scanning/channel_settings.cpp \
     61     scanning/hidden_network.cpp \
     62     scanning/offload_scan_callback_interface_impl.cpp \
     63     scanning/pno_network.cpp \
     64     scanning/pno_settings.cpp \
     65     scanning/radio_chain_info.cpp \
     66     scanning/scan_result.cpp \
     67     scanning/offload/scan_stats.cpp \
     68     scanning/single_scan_settings.cpp \
     69     scanning/scan_utils.cpp \
     70     scanning/scanner_impl.cpp \
     71     scanning/offload/offload_scan_manager.cpp \
     72     scanning/offload/offload_callback.cpp \
     73     scanning/offload/offload_service_utils.cpp \
     74     scanning/offload/offload_scan_utils.cpp \
     75     server.cpp
     76 LOCAL_SHARED_LIBRARIES := \
     77     android.hardware.wifi.offload (a] 1.0 \
     78     libbase \
     79     libutils \
     80     libhidlbase \
     81     libhidltransport \
     82     libwifi-system \
     83     libwifi-system-iface
     84 LOCAL_WHOLE_STATIC_LIBRARIES := \
     85     libwificond_ipc \
     86     libwificond_nl \
     87     libwificond_event_loop
     88 include $(BUILD_STATIC_LIBRARY)
     89 
     90 ###
     91 ### wificond netlink library
     92 ###
     93 include $(CLEAR_VARS)
     94 LOCAL_MODULE := libwificond_nl
     95 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
     96 LOCAL_C_INCLUDES := $(wificond_includes)
     97 LOCAL_SRC_FILES := \
     98     net/mlme_event.cpp \
     99     net/netlink_manager.cpp \
    100     net/netlink_utils.cpp \
    101     net/nl80211_attribute.cpp \
    102     net/nl80211_packet.cpp
    103 LOCAL_SHARED_LIBRARIES := \
    104     libbase
    105 include $(BUILD_STATIC_LIBRARY)
    106 
    107 ###
    108 ### wificond event loop library
    109 ###
    110 include $(CLEAR_VARS)
    111 LOCAL_MODULE := libwificond_event_loop
    112 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
    113 LOCAL_C_INCLUDES := $(wificond_includes)
    114 LOCAL_SRC_FILES := \
    115     looper_backed_event_loop.cpp
    116 LOCAL_WHOLE_STATIC_LIBRARIES := \
    117     liblog \
    118     libbase \
    119     libutils
    120 include $(BUILD_STATIC_LIBRARY)
    121 
    122 ###
    123 ### wificond IPC interface library
    124 ###
    125 include $(CLEAR_VARS)
    126 LOCAL_MODULE := libwificond_ipc
    127 LOCAL_AIDL_INCLUDES += $(LOCAL_PATH)/aidl
    128 LOCAL_C_INCLUDES := $(wificond_includes)
    129 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
    130 LOCAL_SRC_FILES := \
    131     ipc_constants.cpp \
    132     aidl/android/net/wifi/IApInterface.aidl \
    133     aidl/android/net/wifi/IApInterfaceEventCallback.aidl \
    134     aidl/android/net/wifi/IClientInterface.aidl \
    135     aidl/android/net/wifi/IInterfaceEventCallback.aidl \
    136     aidl/android/net/wifi/IPnoScanEvent.aidl \
    137     aidl/android/net/wifi/IScanEvent.aidl \
    138     aidl/android/net/wifi/IWificond.aidl \
    139     aidl/android/net/wifi/IWifiScannerImpl.aidl \
    140     scanning/channel_settings.cpp \
    141     scanning/hidden_network.cpp \
    142     scanning/pno_network.cpp \
    143     scanning/pno_settings.cpp \
    144     scanning/radio_chain_info.cpp \
    145     scanning/scan_result.cpp \
    146     scanning/single_scan_settings.cpp
    147 LOCAL_SHARED_LIBRARIES := \
    148     libbinder
    149 include $(BUILD_STATIC_LIBRARY)
    150 
    151 ###
    152 ### test util library
    153 ###
    154 include $(CLEAR_VARS)
    155 LOCAL_MODULE := libwificond_test_utils
    156 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
    157 LOCAL_C_INCLUDES := $(wificond_includes)
    158 LOCAL_SRC_FILES := \
    159     tests/integration/binder_dispatcher.cpp \
    160     tests/integration/process_utils.cpp \
    161     tests/shell_utils.cpp
    162 LOCAL_SHARED_LIBRARIES := \
    163     libbase
    164 LOCAL_WHOLE_STATIC_LIBRARIES := \
    165     libwificond_ipc \
    166     libwificond_event_loop
    167 include $(BUILD_STATIC_LIBRARY)
    168 
    169 ###
    170 ### wificond unit tests.
    171 ###
    172 include $(CLEAR_VARS)
    173 LOCAL_MODULE := wificond_unit_test
    174 LOCAL_COMPATIBILITY_SUITE := device-tests
    175 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
    176 LOCAL_C_INCLUDES := $(wificond_includes)
    177 LOCAL_SRC_FILES := \
    178     tests/ap_interface_impl_unittest.cpp \
    179     tests/client_interface_impl_unittest.cpp \
    180     tests/looper_backed_event_loop_unittest.cpp \
    181     tests/main.cpp \
    182     tests/mock_client_interface_impl.cpp \
    183     tests/mock_netlink_manager.cpp \
    184     tests/mock_netlink_utils.cpp \
    185     tests/mock_offload.cpp \
    186     tests/mock_offload_callback_handlers.cpp \
    187     tests/mock_offload_scan_callback_interface.cpp \
    188     tests/mock_offload_scan_callback_interface_impl.cpp \
    189     tests/mock_offload_scan_manager.cpp \
    190     tests/mock_offload_service_utils.cpp \
    191     tests/mock_scan_utils.cpp \
    192     tests/netlink_manager_unittest.cpp \
    193     tests/netlink_utils_unittest.cpp \
    194     tests/nl80211_attribute_unittest.cpp \
    195     tests/nl80211_packet_unittest.cpp \
    196     tests/offload_callback_test.cpp \
    197     tests/offload_hal_test_constants.cpp \
    198     tests/offload_scan_manager_test.cpp \
    199     tests/offload_scan_utils_test.cpp \
    200     tests/offload_test_utils.cpp \
    201     tests/scanner_unittest.cpp \
    202     tests/scan_result_unittest.cpp \
    203     tests/scan_settings_unittest.cpp \
    204     tests/scan_stats_unittest.cpp \
    205     tests/scan_utils_unittest.cpp \
    206     tests/server_unittest.cpp
    207 LOCAL_STATIC_LIBRARIES := \
    208     libgmock \
    209     libgtest \
    210     libwifi-system-test \
    211     libwifi-system-iface-test \
    212     libwificond \
    213     libwificond_nl
    214 LOCAL_SHARED_LIBRARIES := \
    215     android.hardware.wifi.offload (a] 1.0 \
    216     libbase \
    217     libbinder \
    218     libcutils \
    219     libhidltransport \
    220     libhidlbase \
    221     liblog \
    222     libutils \
    223     libwifi-system \
    224     libwifi-system-iface
    225 include $(BUILD_NATIVE_TEST)
    226 
    227 ###
    228 ### wificond device integration tests.
    229 ###
    230 include $(CLEAR_VARS)
    231 LOCAL_MODULE := wificond_integration_test
    232 LOCAL_CPPFLAGS := $(wificond_cpp_flags)
    233 LOCAL_C_INCLUDES := $(wificond_includes)
    234 LOCAL_SRC_FILES := \
    235     tests/integration/ap_interface_test.cpp \
    236     tests/integration/client_interface_test.cpp \
    237     tests/integration/life_cycle_test.cpp \
    238     tests/integration/scanner_test.cpp \
    239     tests/integration/service_test.cpp \
    240     tests/main.cpp \
    241     tests/shell_unittest.cpp
    242 LOCAL_SHARED_LIBRARIES := \
    243     libbase \
    244     libbinder \
    245     libcutils \
    246     libutils \
    247     libwifi-system \
    248     libwifi-system-iface
    249 LOCAL_STATIC_LIBRARIES := \
    250     libgmock \
    251     libwificond_ipc \
    252     libwificond_test_utils
    253 include $(BUILD_NATIVE_TEST)
    254