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") 15import("../wlan.gni") 16 17if (defined(ohos_lite)) { 18 ohos_shared_library("wifi_driver_client") { 19 output_extension = "z.so" 20 sources = [ "src/wifi_driver_client.c" ] 21 sources += [ 22 "src/sbuf/sbuf_cmd_adapter.c", 23 "src/sbuf/sbuf_common_adapter.c", 24 "src/sbuf/sbuf_event_adapter.c", 25 "src/sbuf/sbuf_wpa_cmd_adapter.c", 26 ] 27 28 include_dirs = [ "include" ] 29 30 deps = [ "//third_party/bounds_checking_function:libsec_shared" ] 31 32 external_deps = [ "hdf_core:libhdf_utils" ] 33 defines = [ "__USER__" ] 34 35 cflags = [ 36 "-Wall", 37 "-Wextra", 38 "-Werror", 39 "-fsigned-char", 40 "-fno-common", 41 "-fno-strict-aliasing", 42 "-Wno-format", 43 "-Wno-format-extra-args", 44 ] 45 46 subsystem_name = "hdf" 47 part_name = "drivers_peripheral_wlan" 48 install_images = [ "system" ] 49 } 50} else { 51 CLIENT_ROOT_DIR = "./.." 52 sources = [ 53 "src/sbuf/sbuf_common_adapter.c", 54 "src/sbuf/sbuf_wpa_cmd_adapter.c", 55 "src/wifi_driver_client.c", 56 ] 57 58 ohos_shared_library("wifi_driver_client") { 59 if (drivers_peripheral_wlan_feature_enable_HDF_NL80211) { 60 sources += [ 61 "src/sbuf/sbuf_cmd_adapter.c", 62 "src/sbuf/sbuf_event_adapter.c", 63 ] 64 65 include_dirs = [ 66 "include", 67 "$CLIENT_ROOT_DIR/interfaces/include", 68 ] 69 70 external_deps = [ 71 "c_utils:utils", 72 "hdf_core:libhdf_utils", 73 "hilog:libhilog", 74 ] 75 defines = [ "__OHOS__USER__" ] 76 77 cflags = [ 78 "-Wall", 79 "-Wextra", 80 "-Werror", 81 "-fsigned-char", 82 "-fno-common", 83 "-fno-strict-aliasing", 84 ] 85 86 install_images = [ chipset_base_dir ] 87 subsystem_name = "hdf" 88 part_name = "drivers_peripheral_wlan" 89 } else { 90 sources += [ 91 "src/netlink/netlink_cmd_adapter.c", 92 "src/netlink/netlink_event_adapter.c", 93 "src/sbuf/sbuf_event_adapter.c", 94 ] 95 96 include_dirs = [ 97 "include", 98 "$CLIENT_ROOT_DIR/interfaces/include", 99 "//third_party/libnl/libnl-3.7.0/include", 100 "$root_out_dir/include", 101 "$root_out_dir/lib", 102 ] 103 104 deps = [ "//third_party/libnl:libnl_share" ] 105 external_deps = [ 106 "c_utils:utils", 107 "hdf_core:libhdf_host", 108 "hdf_core:libhdf_utils", 109 "hilog:libhilog", 110 "init:libbegetutil", 111 ] 112 113 defines = [ "__OHOS__USER__" ] 114 115 cflags = [ 116 "-Wall", 117 "-Wextra", 118 "-Werror", 119 "-fsigned-char", 120 "-fno-common", 121 "-fno-strict-aliasing", 122 ] 123 124 install_images = [ chipset_base_dir ] 125 subsystem_name = "hdf" 126 part_name = "drivers_peripheral_wlan" 127 } 128 } 129} 130