# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa.gni") WPA_ROOT_DIR = "//third_party/wpa_supplicant" if (is_standard_system) { ohos_shared_library("libhostapd_interface_service_1.0") { branch_protector_ret = "pac_ret" sanitize = { cfi = true # Enable/disable control flow integrity detection boundary_sanitize = true # Enable boundary san detection cfi_cross_dso = true # Cross-SO CFI Checks integer_overflow = true # Enable integer overflow detection ubsan = true # Enable some Ubsan options debug = false } include_dirs = [ "./service_common", "../../client/include", "$WPA_ROOT_DIR/wpa_supplicant-2.9_standard/src", "$WPA_ROOT_DIR/wpa_supplicant-2.9_standard/hostapd", ] sources = [ "hostapd_interface_service.c", "service_common/hdi_hostapd_hal.c", "service_common/hostapd_common_cmd.c", ] deps = [ "../../client:hostapd_hdi_client" ] defines = [ "__OHOS__USER__" ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", "-DCONFIG_CTRL_IFACE", "-DCONFIG_WPS", ] external_deps = [ "c_utils:utils", "drivers_interface_wlan:libhostapd_stub_1.0", "hdf_core:libhdf_host", "hdf_core:libhdf_utils", "hilog:libhilog", "wpa_supplicant:wpa", "wpa_supplicant:wpa_client_vendor", ] install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_wlan" } ohos_shared_library("libhostapd_hdi_c_device") { branch_protector_ret = "pac_ret" sanitize = { cfi = true # Enable/disable control flow integrity detection boundary_sanitize = true # Enable boundary san detection cfi_cross_dso = true # Cross-SO CFI Checks integer_overflow = true # Enable integer overflow detection ubsan = true # Enable some Ubsan options debug = false } include_dirs = [ "./service_common" ] sources = [ "hostapd_interface_drivers.c" ] deps = [ ":libhostapd_interface_service_1.0" ] cflags = [ "-Wall", "-Wextra", "-Werror", "-fsigned-char", "-fno-common", "-fno-strict-aliasing", ] external_deps = [ "c_utils:utils", "drivers_interface_wlan:libhostapd_stub_1.0", "hdf_core:libhdf_host", "hdf_core:libhdf_ipc_adapter", "hdf_core:libhdf_utils", "hdf_core:libhdi", "hilog:libhilog", ] shlib_type = "hdi" install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_wlan" } } else { ohos_shared_library("libhostapd_interface_service_1.0") { branch_protector_ret = "pac_ret" sanitize = { cfi = true # Enable/disable control flow integrity detection boundary_sanitize = true # Enable boundary san detection cfi_cross_dso = true # Cross-SO CFI Checks integer_overflow = true # Enable integer overflow detection ubsan = true # Enable some Ubsan options debug = false } include_dirs = [] sources = [] install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_wlan" } ohos_shared_library("libhostapd_hdi_c_device") { branch_protector_ret = "pac_ret" sanitize = { cfi = true # Enable/disable control flow integrity detection boundary_sanitize = true # Enable boundary san detection cfi_cross_dso = true # Cross-SO CFI Checks integer_overflow = true # Enable integer overflow detection ubsan = true # Enable some Ubsan options debug = false } include_dirs = [] sources = [] install_images = [ chipset_base_dir ] subsystem_name = "hdf" part_name = "drivers_peripheral_wlan" } } group("hdi_hostapd_service") { deps = [ ":libhostapd_hdi_c_device", ":libhostapd_interface_service_1.0", ] }