1# Copyright (c) 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 16config("hostapd_hdi_client_public_config") { 17 include_dirs = [ "include" ] 18} 19 20if (defined(ohos_lite)) { 21 ohos_shared_library("hostapd_hdi_client") { 22 output_extension = "z.so" 23 sources = [ "src/hostapd_client.c" ] 24 25 include_dirs = [ "include" ] 26 27 external_deps = [ "hdf_core:libhdf_utils" ] 28 defines = [ "__USER__" ] 29 30 cflags = [ 31 "-Wall", 32 "-Wextra", 33 "-Werror", 34 "-fsigned-char", 35 "-fno-common", 36 "-fno-strict-aliasing", 37 "-Wno-format", 38 "-Wno-format-extra-args", 39 ] 40 41 subsystem_name = "hdf" 42 part_name = "drivers_peripheral_wlan" 43 install_images = [ "system" ] 44 } 45} else { 46 ohos_shared_library("hostapd_hdi_client") { 47 branch_protector_ret = "pac_ret" 48 sanitize = { 49 cfi = true # Enable/disable control flow integrity detection 50 boundary_sanitize = true # Enable boundary san detection 51 cfi_cross_dso = true # Cross-SO CFI Checks 52 integer_overflow = true # Enable integer overflow detection 53 ubsan = true # Enable some Ubsan options 54 debug = false 55 } 56 include_dirs = [ "include" ] 57 sources = [ "src/hostapd_client.c" ] 58 public_configs = [ ":hostapd_hdi_client_public_config" ] 59 60 external_deps = [ 61 "c_utils:utils", 62 "hdf_core:libhdf_utils", 63 "hilog:libhilog", 64 ] 65 defines = [ "__OHOS__USER__" ] 66 67 cflags = [ 68 "-Wall", 69 "-Wextra", 70 "-Werror", 71 "-fsigned-char", 72 "-fno-common", 73 "-fno-strict-aliasing", 74 ] 75 76 install_images = [ chipset_base_dir ] 77 subsystem_name = "hdf" 78 part_name = "drivers_peripheral_wlan" 79 } 80} 81