Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 1 | // Copyright (C) 2021 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 | package { |
| 16 | default_applicable_licenses: ["hardware_interfaces_license"], |
| 17 | } |
| 18 | |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 19 | soong_config_module_type { |
| 20 | name: "wifi_hal_cc_defaults", |
| 21 | module_type: "cc_defaults", |
| 22 | config_namespace: "wifi", |
| 23 | bool_variables: [ |
| 24 | "hidl_feature_aware", // WIFI_HIDL_FEATURE_AWARE |
| 25 | "hidl_feature_dual_interface", // WIFI_HIDL_FEATURE_DUAL_INTERFACE |
| 26 | "hidl_feature_disable_ap", // WIFI_HIDL_FEATURE_DISABLE_AP |
| 27 | "hidl_feature_disable_ap_mac_randomization", // WIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION |
| 28 | "avoid_iface_reset_mac_change", // WIFI_AVOID_IFACE_RESET_MAC_CHANGE |
| 29 | ], |
| 30 | value_variables: [ |
| 31 | "hal_interface_combinations", // WIFI_HAL_INTERFACE_COMBINATIONS |
| 32 | ], |
| 33 | properties: [ |
| 34 | "cppflags", |
| 35 | ], |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 36 | } |
| 37 | |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 38 | wifi_hal_cc_defaults { |
| 39 | name: "android.hardware.wifi@1.0-service-cppflags-defaults", |
| 40 | soong_config_variables: { |
| 41 | hidl_feature_aware: { |
| 42 | cppflags: ["-DWIFI_HIDL_FEATURE_AWARE"], |
| 43 | }, |
| 44 | hidl_feature_dual_interface: { |
| 45 | cppflags: ["-DWIFI_HIDL_FEATURE_DUAL_INTERFACE"], |
| 46 | }, |
| 47 | hidl_feature_disable_ap: { |
| 48 | cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP"], |
| 49 | }, |
| 50 | hidl_feature_disable_ap_mac_randomization: { |
| 51 | cppflags: ["-DWIFI_HIDL_FEATURE_DISABLE_AP_MAC_RANDOMIZATION"], |
| 52 | }, |
| 53 | avoid_iface_reset_mac_change: { |
| 54 | cppflags: ["-DWIFI_AVOID_IFACE_RESET_MAC_CHANGE"], |
| 55 | }, |
| 56 | hal_interface_combinations: { |
| 57 | cppflags: ["-DWIFI_HAL_INTERFACE_COMBINATIONS=%s"], |
| 58 | }, |
| 59 | }, |
| 60 | } |
| 61 | |
| 62 | cc_library_static { |
| 63 | name: "android.hardware.wifi@1.0-service-lib", |
| 64 | defaults: ["android.hardware.wifi@1.0-service-cppflags-defaults"], |
| 65 | proprietary: true, |
Jiyong Park | 46afe63 | 2022-08-12 13:40:26 +0900 | [diff] [blame] | 66 | compile_multilib: "first", |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 67 | cppflags: [ |
| 68 | "-Wall", |
| 69 | "-Werror", |
| 70 | "-Wextra", |
| 71 | ], |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 72 | // Allow implicit fallthroughs in wifi_legacy_hal.cpp until they are fixed. |
| 73 | cflags: ["-Wno-error=implicit-fallthrough"], |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 74 | srcs: [ |
| 75 | "hidl_struct_util.cpp", |
| 76 | "hidl_sync_util.cpp", |
| 77 | "ringbuffer.cpp", |
| 78 | "wifi.cpp", |
| 79 | "wifi_ap_iface.cpp", |
| 80 | "wifi_chip.cpp", |
| 81 | "wifi_feature_flags.cpp", |
| 82 | "wifi_iface_util.cpp", |
| 83 | "wifi_legacy_hal.cpp", |
| 84 | "wifi_legacy_hal_factory.cpp", |
| 85 | "wifi_legacy_hal_stubs.cpp", |
| 86 | "wifi_mode_controller.cpp", |
| 87 | "wifi_nan_iface.cpp", |
| 88 | "wifi_p2p_iface.cpp", |
| 89 | "wifi_rtt_controller.cpp", |
| 90 | "wifi_sta_iface.cpp", |
| 91 | "wifi_status_util.cpp", |
| 92 | ], |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 93 | |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 94 | shared_libs: [ |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 95 | "libbase", |
| 96 | "libcutils", |
| 97 | "libhidlbase", |
| 98 | "liblog", |
| 99 | "libnl", |
| 100 | "libutils", |
| 101 | "libwifi-hal", |
| 102 | "libwifi-system-iface", |
| 103 | "libxml2", |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 104 | "android.hardware.wifi@1.0", |
| 105 | "android.hardware.wifi@1.1", |
| 106 | "android.hardware.wifi@1.2", |
| 107 | "android.hardware.wifi@1.3", |
| 108 | "android.hardware.wifi@1.4", |
| 109 | "android.hardware.wifi@1.5", |
Ahmed ElArabawy | 0cf627a | 2022-01-18 18:07:54 -0800 | [diff] [blame] | 110 | "android.hardware.wifi@1.6", |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 111 | ], |
| 112 | |
| 113 | export_include_dirs: ["."], |
| 114 | } |
| 115 | |
| 116 | cc_binary { |
| 117 | name: "android.hardware.wifi@1.0-service", |
| 118 | vintf_fragments: ["android.hardware.wifi@1.0-service.xml"], |
| 119 | relative_install_path: "hw", |
| 120 | proprietary: true, |
| 121 | cppflags: [ |
| 122 | "-Wall", |
| 123 | "-Werror", |
| 124 | "-Wextra", |
| 125 | ], |
| 126 | srcs: ["service.cpp"], |
| 127 | shared_libs: [ |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 128 | "libbase", |
| 129 | "libcutils", |
| 130 | "libhidlbase", |
| 131 | "liblog", |
| 132 | "libnl", |
| 133 | "libutils", |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 134 | "libwifi-hal", |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 135 | "libwifi-system-iface", |
| 136 | "libxml2", |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 137 | "android.hardware.wifi@1.0", |
| 138 | "android.hardware.wifi@1.1", |
| 139 | "android.hardware.wifi@1.2", |
| 140 | "android.hardware.wifi@1.3", |
| 141 | "android.hardware.wifi@1.4", |
| 142 | "android.hardware.wifi@1.5", |
| 143 | "android.hardware.wifi@1.6", |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 144 | ], |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 145 | static_libs: ["android.hardware.wifi@1.0-service-lib"], |
| 146 | init_rc: ["android.hardware.wifi@1.0-service.rc"], |
| 147 | } |
| 148 | |
| 149 | cc_binary { |
| 150 | name: "android.hardware.wifi@1.0-service-lazy", |
| 151 | vintf_fragments: ["android.hardware.wifi@1.0-service.xml"], |
| 152 | overrides: ["android.hardware.wifi@1.0-service"], |
| 153 | cflags: ["-DLAZY_SERVICE"], |
| 154 | relative_install_path: "hw", |
| 155 | proprietary: true, |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 156 | cppflags: [ |
| 157 | "-Wall", |
| 158 | "-Werror", |
| 159 | "-Wextra", |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 160 | ], |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 161 | srcs: ["service.cpp"], |
| 162 | shared_libs: [ |
| 163 | "libbase", |
| 164 | "libcutils", |
| 165 | "libhidlbase", |
| 166 | "liblog", |
| 167 | "libnl", |
| 168 | "libutils", |
| 169 | "libwifi-hal", |
| 170 | "libwifi-system-iface", |
| 171 | "libxml2", |
| 172 | "android.hardware.wifi@1.0", |
| 173 | "android.hardware.wifi@1.1", |
| 174 | "android.hardware.wifi@1.2", |
| 175 | "android.hardware.wifi@1.3", |
| 176 | "android.hardware.wifi@1.4", |
| 177 | "android.hardware.wifi@1.5", |
| 178 | "android.hardware.wifi@1.6", |
| 179 | ], |
| 180 | static_libs: ["android.hardware.wifi@1.0-service-lib"], |
| 181 | init_rc: ["android.hardware.wifi@1.0-service-lazy.rc"], |
| 182 | } |
| 183 | |
| 184 | cc_test { |
| 185 | name: "android.hardware.wifi@1.0-service-tests", |
| 186 | proprietary: true, |
Jiyong Park | 46afe63 | 2022-08-12 13:40:26 +0900 | [diff] [blame] | 187 | compile_multilib: "first", |
Jooyung Han | 1e6cdac | 2022-07-22 17:39:41 +0900 | [diff] [blame] | 188 | cppflags: [ |
| 189 | "-Wall", |
| 190 | "-Werror", |
| 191 | "-Wextra", |
| 192 | ], |
| 193 | srcs: [ |
| 194 | "tests/hidl_struct_util_unit_tests.cpp", |
| 195 | "tests/main.cpp", |
| 196 | "tests/mock_interface_tool.cpp", |
| 197 | "tests/mock_wifi_feature_flags.cpp", |
| 198 | "tests/mock_wifi_iface_util.cpp", |
| 199 | "tests/mock_wifi_legacy_hal.cpp", |
| 200 | "tests/mock_wifi_mode_controller.cpp", |
| 201 | "tests/ringbuffer_unit_tests.cpp", |
| 202 | "tests/wifi_nan_iface_unit_tests.cpp", |
| 203 | "tests/wifi_chip_unit_tests.cpp", |
| 204 | "tests/wifi_iface_util_unit_tests.cpp", |
| 205 | ], |
| 206 | static_libs: [ |
| 207 | "libgmock", |
| 208 | "libgtest", |
| 209 | "android.hardware.wifi@1.0", |
| 210 | "android.hardware.wifi@1.1", |
| 211 | "android.hardware.wifi@1.2", |
| 212 | "android.hardware.wifi@1.3", |
| 213 | "android.hardware.wifi@1.4", |
| 214 | "android.hardware.wifi@1.5", |
| 215 | "android.hardware.wifi@1.6", |
| 216 | "android.hardware.wifi@1.0-service-lib", |
| 217 | ], |
| 218 | shared_libs: [ |
| 219 | "libbase", |
| 220 | "libcutils", |
| 221 | "libhidlbase", |
| 222 | "liblog", |
| 223 | "libnl", |
| 224 | "libutils", |
| 225 | "libwifi-hal", |
| 226 | "libwifi-system-iface", |
| 227 | ], |
Sundong Ahn | 80af4e4 | 2021-12-02 01:01:49 +0000 | [diff] [blame] | 228 | } |