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 = false # Enable boundary san detection 51 cfi_cross_dso = true # Cross-SO CFI Checks 52 integer_overflow = false # Enable integer overflow detection 53 ubsan = false # Enable some Ubsan options 54 cfi_vcall_icall_only = true 55 debug = false 56 } 57 include_dirs = [ "include" ] 58 sources = [ "src/hostapd_client.c" ] 59 public_configs = [ ":hostapd_hdi_client_public_config" ] 60 61 external_deps = [ 62 "c_utils:utils", 63 "hdf_core:libhdf_utils", 64 "hilog:libhilog", 65 ] 66 defines = [ "__OHOS__USER__" ] 67 68 cflags = [ 69 "-Wall", 70 "-Wextra", 71 "-Werror", 72 "-fsigned-char", 73 "-fno-common", 74 "-fno-strict-aliasing", 75 ] 76 cflags += [ 77 "-fdata-sections", 78 "-ffunction-sections", 79 "-Os", 80 "-fno-merge-all-constants", 81 ] 82 ldflags = [ 83 "-Wl,--exclude-libs=ALL", 84 "-Wl,--gc-sections", 85 ] 86 install_images = [ chipset_base_dir ] 87 subsystem_name = "hdf" 88 part_name = "drivers_peripheral_wlan" 89 } 90} 91