1# Copyright (c) 2021-2023 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15 16ohos_shared_library("libwlan_interface_service_1.3") { 17 branch_protector_ret = "pac_ret" 18 sanitize = { 19 cfi = true # Enable/disable control flow integrity detection 20 boundary_sanitize = true # Enable boundary san detection 21 cfi_cross_dso = true # Cross-SO CFI Checks 22 integer_overflow = true # Enable integer overflow detection 23 ubsan = true # Enable some Ubsan options 24 debug = false 25 } 26 include_dirs = [ 27 "../interfaces/include", 28 "../client/include", 29 "../hal/include", 30 "./service_common", 31 "./service_extend", 32 ] 33 sources = [ 34 "service_common/wlan_common_cmd.c", 35 "wlan_interface_service.c", 36 ] 37 38 deps = [ 39 "../hal:wifi_hal", 40 "service_extend:libwlan_service_extend", 41 ] 42 external_deps = [ "drivers_interface_wlan:libwlan_stub_1.3" ] 43 44 defines = [ "__OHOS__USER__" ] 45 46 cflags = [ 47 "-Wall", 48 "-Wextra", 49 "-Werror", 50 "-fsigned-char", 51 "-fno-common", 52 "-fno-strict-aliasing", 53 ] 54 55 if (is_standard_system) { 56 external_deps += [ 57 "c_utils:utils", 58 "hdf_core:libhdf_host", 59 "hdf_core:libhdf_utils", 60 "hilog:libhilog", 61 ] 62 } else { 63 external_deps += [ "hilog:libhilog" ] 64 } 65 66 install_images = [ chipset_base_dir ] 67 subsystem_name = "hdf" 68 part_name = "drivers_peripheral_wlan" 69} 70 71ohos_shared_library("libwifi_hdi_c_device") { 72 branch_protector_ret = "pac_ret" 73 sanitize = { 74 cfi = true # Enable/disable control flow integrity detection 75 boundary_sanitize = true # Enable boundary san detection 76 cfi_cross_dso = true # Cross-SO CFI Checks 77 integer_overflow = true # Enable integer overflow detection 78 ubsan = true # Enable some Ubsan options 79 debug = false 80 } 81 include_dirs = [ 82 "../interfaces/include", 83 "../client/include", 84 "../hal/include", 85 "./service_extend", 86 ] 87 88 sources = [ "wlan_interface_drivers.c" ] 89 90 deps = [ 91 ":libwlan_interface_service_1.3", 92 "service_extend:libwlan_service_extend", 93 ] 94 external_deps = [ "drivers_interface_wlan:libwlan_stub_1.3" ] 95 96 cflags = [ 97 "-Wall", 98 "-Wextra", 99 "-Werror", 100 "-fsigned-char", 101 "-fno-common", 102 "-fno-strict-aliasing", 103 ] 104 105 if (is_standard_system) { 106 external_deps += [ 107 "c_utils:utils", 108 "hdf_core:libhdf_host", 109 "hdf_core:libhdf_ipc_adapter", 110 "hdf_core:libhdf_utils", 111 "hdf_core:libhdi", 112 "hilog:libhilog", 113 ] 114 } else { 115 external_deps += [ "hilog:libhilog" ] 116 } 117 118 shlib_type = "hdi" 119 install_images = [ chipset_base_dir ] 120 subsystem_name = "hdf" 121 part_name = "drivers_peripheral_wlan" 122} 123 124group("hdi_wlan_service") { 125 deps = [ 126 ":libwifi_hdi_c_device", 127 ":libwlan_interface_service_1.3", 128 ] 129} 130