1# Copyright (c) 2021 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 14if (defined(ohos_lite)) { 15 import("//build/lite/config/component/lite_component.gni") 16} else { 17 import("//build/ohos.gni") 18} 19 20if (defined(ohos_lite)) { 21 FWK_ROOT_DIR = "//drivers/framework" 22 23 shared_library("wifi_driver_client") { 24 output_name = "wifi_driver_client" 25 sources = [ "src/wifi_driver_client.c" ] 26 27 sources += [ 28 "src/sbuf/sbuf_cmd_adapter.c", 29 "src/sbuf/sbuf_event_adapter.c", 30 ] 31 32 include_dirs = [ 33 "include", 34 "$FWK_ROOT_DIR/include/osal", 35 "$FWK_ROOT_DIR/include", 36 "$FWK_ROOT_DIR/include/utils", 37 "$FWK_ROOT_DIR/core/shared/include", 38 "$FWK_ROOT_DIR/ability/sbuf/include", 39 "$FWK_ROOT_DIR/include/core", 40 "//drivers/adapter/uhdf/posix/include", 41 "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits", 42 ] 43 44 deps = [ 45 "//drivers/adapter/uhdf/posix:hdf_posix_osal", 46 "//third_party/bounds_checking_function:libsec_shared", 47 ] 48 49 defines = [ "__USER__" ] 50 51 cflags = [ 52 "-Wall", 53 "-Wextra", 54 "-Werror", 55 "-fsigned-char", 56 "-fno-common", 57 "-fno-strict-aliasing", 58 "-Wno-format", 59 "-Wno-format-extra-args", 60 ] 61 } 62 63 lite_component("hdi_wifi") { 64 features = [ ":wifi_driver_client" ] 65 } 66} else { 67 CLIENT_ROOT_DIR = "//drivers/peripheral/wlan" 68 69 ohos_shared_library("wifi_driver_client") { 70 sources = [ "$CLIENT_ROOT_DIR/client/src/wifi_driver_client.c" ] 71 72 sources += [ 73 "$CLIENT_ROOT_DIR/client/src/sbuf/sbuf_cmd_adapter.c", 74 "$CLIENT_ROOT_DIR/client/src/sbuf/sbuf_event_adapter.c", 75 ] 76 77 include_dirs = [ 78 "$CLIENT_ROOT_DIR/client/include", 79 "$CLIENT_ROOT_DIR/interfaces/include", 80 "//third_party/bounds_checking_function/include", 81 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 82 ] 83 84 deps = [ 85 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 86 "//drivers/adapter/uhdf2/osal:libhdf_utils", 87 "//utils/native/base:utils", 88 ] 89 90 defines = [ "__OHOS__USER__" ] 91 92 cflags = [ 93 "-Wall", 94 "-Wextra", 95 "-Werror", 96 "-fsigned-char", 97 "-fno-common", 98 "-fno-strict-aliasing", 99 ] 100 101 subsystem_name = "hdf" 102 install_images = [ "system" ] 103 } 104} 105