• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa.gni")
16
17if (is_standard_system) {
18  ohos_shared_library("libwpa_interface_service_1.0") {
19    include_dirs = [
20      "./service_common",
21      "../../client/include",
22      "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard",
23      "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src",
24      "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils",
25      "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant",
26      "//third_party/wpa_supplicant/wpa_supplicant-2.9_standard/wpa_supplicant_lib",
27    ]
28    sources = [
29      "service_common/wpa_common_cmd.c",
30      "service_common/wpa_p2p_cmd.c",
31      "wpa_interface_service.c",
32    ]
33
34    deps = [ "../../client:wpa_hdi_client" ]
35
36    defines = [ "__OHOS__USER__" ]
37
38    cflags = [
39      "-Wall",
40      "-Wextra",
41      "-Werror",
42      "-fsigned-char",
43      "-fno-common",
44      "-fno-strict-aliasing",
45      "-DCONFIG_CTRL_IFACE",
46      "-DCONFIG_P2P",
47      "-DCONFIG_WEP",
48      "-DCONFIG_WPS",
49    ]
50
51    external_deps = [
52      "c_utils:utils",
53      "drivers_interface_wlan:libwpa_stub_1.0",
54      "hdf_core:libhdf_host",
55      "hdf_core:libhdf_utils",
56      "hilog:libhilog",
57      "wpa_supplicant:wpa",
58    ]
59
60    install_images = [ chipset_base_dir ]
61    subsystem_name = "hdf"
62    part_name = "drivers_peripheral_wlan"
63  }
64
65  ohos_shared_library("libwpa_hdi_c_device") {
66    include_dirs = [ "./service_common" ]
67
68    sources = [ "wpa_interface_drivers.c" ]
69
70    deps = [ ":libwpa_interface_service_1.0" ]
71
72    cflags = [
73      "-Wall",
74      "-Wextra",
75      "-Werror",
76      "-fsigned-char",
77      "-fno-common",
78      "-fno-strict-aliasing",
79    ]
80
81    external_deps = [
82      "c_utils:utils",
83      "drivers_interface_wlan:libwpa_stub_1.0",
84      "hdf_core:libhdf_host",
85      "hdf_core:libhdf_ipc_adapter",
86      "hdf_core:libhdf_utils",
87      "hdf_core:libhdi",
88      "hilog:libhilog",
89    ]
90
91    shlib_type = "hdi"
92    install_images = [ chipset_base_dir ]
93    subsystem_name = "hdf"
94    part_name = "drivers_peripheral_wlan"
95  }
96} else {
97  ohos_shared_library("libwpa_interface_service_1.0") {
98    include_dirs = []
99    sources = []
100
101    install_images = [ chipset_base_dir ]
102    subsystem_name = "hdf"
103    part_name = "drivers_peripheral_wlan"
104  }
105
106  ohos_shared_library("libwpa_hdi_c_device") {
107    include_dirs = []
108    sources = []
109
110    install_images = [ chipset_base_dir ]
111    subsystem_name = "hdf"
112    part_name = "drivers_peripheral_wlan"
113  }
114}
115
116group("hdi_wpa_service") {
117  deps = [
118    ":libwpa_hdi_c_device",
119    ":libwpa_interface_service_1.0",
120  ]
121}
122