• 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
16ohos_shared_library("libwlan_interface_service_1.3") {
17  branch_protector_ret = "pac_ret"
18  sanitize = {
19    cfi = true  # Enable/disable control flow integrity detection
20    boundary_sanitize = false  # Enable boundary san detection
21    cfi_cross_dso = true  # Cross-SO CFI Checks
22    integer_overflow = false  # Enable integer overflow detection
23    ubsan = false  # Enable some Ubsan options
24    cfi_vcall_icall_only = true
25    debug = false
26  }
27  include_dirs = [
28    "../interfaces/include",
29    "../client/include",
30    "../hal/include",
31    "./service_common",
32    "./service_extend",
33  ]
34  sources = [
35    "service_common/wlan_common_cmd.c",
36    "wlan_interface_service.c",
37  ]
38
39  deps = [
40    "../hal:wifi_hal",
41    "service_extend:libwlan_service_extend",
42  ]
43  external_deps = [ "drivers_interface_wlan:libwlan_stub_1.3" ]
44
45  defines = [ "__OHOS__USER__" ]
46
47  cflags = [
48    "-Wall",
49    "-Wextra",
50    "-Werror",
51    "-fsigned-char",
52    "-fno-common",
53    "-fno-strict-aliasing",
54  ]
55  cflags += [
56    "-fdata-sections",
57    "-ffunction-sections",
58    "-Os",
59    "-fno-merge-all-constants",
60  ]
61  ldflags = [
62    "-Wl,--exclude-libs=ALL",
63    "-Wl,--gc-sections",
64  ]
65  if (is_standard_system) {
66    external_deps += [
67      "c_utils:utils",
68      "hdf_core:libhdf_host",
69      "hdf_core:libhdf_utils",
70      "hilog:libhilog",
71    ]
72  } else {
73    external_deps += [ "hilog:libhilog" ]
74  }
75
76  install_images = [ chipset_base_dir ]
77  subsystem_name = "hdf"
78  version_script = "libwlan_interface_service.map"
79  part_name = "drivers_peripheral_wlan"
80}
81
82ohos_shared_library("libwifi_hdi_c_device") {
83  branch_protector_ret = "pac_ret"
84  sanitize = {
85    cfi = true  # Enable/disable control flow integrity detection
86    boundary_sanitize = false  # Enable boundary san detection
87    cfi_cross_dso = true  # Cross-SO CFI Checks
88    integer_overflow = false  # Enable integer overflow detection
89    ubsan = false  # Enable some Ubsan options
90    cfi_vcall_icall_only = true
91    debug = false
92  }
93  include_dirs = [
94    "../interfaces/include",
95    "../client/include",
96    "../hal/include",
97    "./service_extend",
98  ]
99
100  sources = [ "wlan_interface_drivers.c" ]
101
102  deps = [
103    ":libwlan_interface_service_1.3",
104    "service_extend:libwlan_service_extend",
105  ]
106  external_deps = [ "drivers_interface_wlan:libwlan_stub_1.3" ]
107
108  cflags = [
109    "-Wall",
110    "-Wextra",
111    "-Werror",
112    "-fsigned-char",
113    "-fno-common",
114    "-fno-strict-aliasing",
115  ]
116  cflags += [
117    "-fdata-sections",
118    "-ffunction-sections",
119    "-Os",
120    "-fno-merge-all-constants",
121  ]
122  ldflags = [
123    "-Wl,--exclude-libs=ALL",
124    "-Wl,--gc-sections",
125  ]
126  if (is_standard_system) {
127    external_deps += [
128      "c_utils:utils",
129      "hdf_core:libhdf_host",
130      "hdf_core:libhdf_ipc_adapter",
131      "hdf_core:libhdf_utils",
132      "hdf_core:libhdi",
133      "hilog:libhilog",
134    ]
135  } else {
136    external_deps += [ "hilog:libhilog" ]
137  }
138
139  shlib_type = "hdi"
140  install_images = [ chipset_base_dir ]
141  subsystem_name = "hdf"
142  part_name = "drivers_peripheral_wlan"
143}
144
145group("hdi_wlan_service") {
146  deps = [
147    ":libwifi_hdi_c_device",
148    ":libwlan_interface_service_1.3",
149  ]
150}
151