1# Copyright (c) 2022-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") 15import("../../../../hdf_core/adapter/uhdf2/uhdf.gni") 16import("../../wlan.gni") 17 18HDI_SERVICE_ROOT_DIR = "../.." 19 20ohos_shared_library("libwlan_service_extend") { 21 branch_protector_ret = "pac_ret" 22 sanitize = { 23 cfi = true # Enable/disable control flow integrity detection 24 boundary_sanitize = true # Enable boundary san detection 25 cfi_cross_dso = true # Cross-SO CFI Checks 26 integer_overflow = true # Enable integer overflow detection 27 ubsan = true # Enable some Ubsan options 28 debug = false 29 } 30 include_dirs = [ 31 "$HDI_SERVICE_ROOT_DIR/interfaces/include", 32 "$HDI_SERVICE_ROOT_DIR/client/include", 33 "$HDI_SERVICE_ROOT_DIR/hal/include", 34 "$HDI_SERVICE_ROOT_DIR/hdi_service/service_common", 35 "$HDI_SERVICE_ROOT_DIR/hdi_service/service_extend", 36 ] 37 sources = [] 38 39 if (drivers_peripheral_wlan_feature_enable_HDF_WLAN_EXTEND_VDI) { 40 sources += [ "service_extend_vdi/wlan_extend_cmd.c" ] 41 } else { 42 sources += [ "service_extend_direct/wlan_extend_cmd.c" ] 43 } 44 45 deps = [ "$HDI_SERVICE_ROOT_DIR/hal:wifi_hal" ] 46 47 external_deps = [ "drivers_interface_wlan:wlan_idl_headers" ] 48 49 defines = [ "__OHOS__USER__" ] 50 51 cflags = [ 52 "-Wall", 53 "-Wextra", 54 "-Werror", 55 "-fsigned-char", 56 "-fno-common", 57 "-fno-strict-aliasing", 58 "-fstack-protector-all", 59 ] 60 61 if (is_standard_system) { 62 external_deps += [ 63 "c_utils:utils", 64 "hdf_core:libhdf_host", 65 "hdf_core:libhdf_ipc_adapter", 66 "hdf_core:libhdf_utils", 67 "hilog:libhilog", 68 ] 69 } else { 70 external_deps += [ "hilog:libhilog" ] 71 } 72 73 install_images = [ chipset_base_dir ] 74 subsystem_name = "hdf" 75 part_name = "drivers_peripheral_wlan" 76} 77