• 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("./../../../../usbmgr.gni")
15
16config("usbnapi_private_config") {
17  include_dirs = [
18    "./../../../../../../../foundation/arkui/napi/native_engine",
19    "./../../../../../../../foundation/arkui/napi/interfaces/kits",
20    "//third_party/node/src",
21    "${usb_manager_path}/interfaces/kits/js/napi/include",
22    "${usb_manager_path}/interfaces/innerkits/native/include",
23  ]
24}
25
26ohos_shared_library("usb") {
27  sanitize = {
28    integer_overflow = true
29    ubsan = true
30    boundary_sanitize = true
31  }
32
33  sources = [
34    "${utils_path}/native/src/usb_napi_errors.cpp",
35    "src/napi_util.cpp",
36    "src/usb_info.cpp",
37    "src/usb_middle.cpp",
38  ]
39  configs = [
40    "${utils_path}:utils_config",
41    ":usbnapi_private_config",
42  ]
43  deps = [
44    "${usb_manager_path}/interfaces/innerkits:usbsrv_client",
45    "//third_party/bounds_checking_function:libsec_shared",
46    "//third_party/jsoncpp:jsoncpp",
47  ]
48  external_deps = [
49    "drivers_interface_usb:usb_idl_headers",
50    "hilog:libhilog",
51    "napi:ace_napi",
52  ]
53
54  relative_install_dir = "module"
55
56  subsystem_name = "usb"
57  part_name = "usb_manager"
58}
59
60ohos_shared_library("usbmanager") {
61  sanitize = {
62    integer_overflow = true
63    ubsan = true
64    boundary_sanitize = true
65  }
66
67  sources = [
68    "${utils_path}/native/src/usb_napi_errors.cpp",
69    "src/napi_util.cpp",
70    "src/usb_info.cpp",
71    "src/usbmanager_middle.cpp",
72  ]
73  configs = [
74    "${utils_path}:utils_config",
75    ":usbnapi_private_config",
76  ]
77  deps = [
78    "${usb_manager_path}/interfaces/innerkits:usbsrv_client",
79    "//third_party/bounds_checking_function:libsec_shared",
80    "//third_party/jsoncpp:jsoncpp",
81  ]
82  external_deps = [
83    "drivers_interface_usb:usb_idl_headers",
84    "hilog:libhilog",
85    "napi:ace_napi",
86  ]
87
88  relative_install_dir = "module"
89
90  subsystem_name = "usb"
91  part_name = "usb_manager"
92}
93