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