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