• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14import("//build/ohos.gni")
15
16if (defined(ohos_lite)) {
17  ohos_shared_library("wifi_hal") {
18    sources = [
19      "src/wifi_hal.c",
20      "src/wifi_hal_ap_feature.c",
21      "src/wifi_hal_base_feature.c",
22      "src/wifi_hal_cmd.c",
23      "src/wifi_hal_sta_feature.c",
24      "src/wifi_hal_util.c",
25    ]
26
27    include_dirs = [
28      "include",
29      "//drivers/peripheral/wlan/interfaces/include",
30      "//drivers/peripheral/wlan/client/include",
31      "//third_party/bounds_checking_function/include",
32      "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
33    ]
34
35    deps = [
36      "//drivers/adapter/uhdf/posix:hdf_posix_osal",
37      "//third_party/bounds_checking_function:libsec_shared",
38    ]
39    external_deps = [ "device_driver_framework:libhdf_utils" ]
40    defines = [ "__USER__" ]
41
42    cflags = [
43      "-Wall",
44      "-Wextra",
45      "-Werror",
46      "-fsigned-char",
47      "-fno-common",
48      "-fno-strict-aliasing",
49      "-Wno-format",
50      "-Wno-format-extra-args",
51    ]
52    subsystem_name = "hdf"
53    part_name = "wlan_device_driver"
54  }
55} else {
56  HAL_ROOT_DIR = "//drivers/peripheral/wlan"
57
58  ohos_shared_library("wifi_hal") {
59    sources = [
60      "$HAL_ROOT_DIR/hal/src/wifi_hal.c",
61      "$HAL_ROOT_DIR/hal/src/wifi_hal_ap_feature.c",
62      "$HAL_ROOT_DIR/hal/src/wifi_hal_base_feature.c",
63      "$HAL_ROOT_DIR/hal/src/wifi_hal_cmd.c",
64      "$HAL_ROOT_DIR/hal/src/wifi_hal_sta_feature.c",
65      "$HAL_ROOT_DIR/hal/src/wifi_hal_util.c",
66    ]
67    include_dirs = [
68      "$HAL_ROOT_DIR/hal/include",
69      "$HAL_ROOT_DIR/interfaces/include",
70      "//third_party/bounds_checking_function/include",
71      "//drivers/peripheral/wlan/client/include",
72    ]
73    deps = [ "//drivers/peripheral/wlan/client:wifi_driver_client" ]
74    defines = [ "__OHOS__USER__" ]
75    cflags = [
76      "-Wall",
77      "-Wextra",
78      "-Werror",
79      "-fsigned-char",
80      "-fno-common",
81      "-fno-strict-aliasing",
82    ]
83    install_images = [ chipset_base_dir ]
84    subsystem_name = "hdf"
85    part_name = "wlan_device_driver"
86    if (is_standard_system) {
87      external_deps = [
88        "device_driver_framework:libhdf_utils",
89        "hiviewdfx_hilog_native:libhilog",
90        "utils_base:utils",
91      ]
92    } else {
93      external_deps = [ "hilog:libhilog" ]
94    }
95  }
96}
97