• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2024 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/config/components/hdi/hdi.gni")
15import("//build/ohos.gni")
16import("./../usb.gni")
17
18ohos_shared_library("libusb_adapter") {
19  sanitize = {
20    integer_overflow = true
21    ubsan = true
22    boundary_sanitize = true
23    cfi = true
24    cfi_cross_dso = true
25    debug = false
26  }
27
28  include_dirs = [
29    "./include",
30    "${usb_driver_path}/utils/include",
31  ]
32
33  sources = [ "src/libusb_adapter.cpp" ]
34  version_script = "libusb_adapter.map"
35
36  shlib_type = "hdi"
37
38  if (is_standard_system) {
39    external_deps = [
40      "access_token:libaccesstoken_sdk",
41      "drivers_interface_usb:libusb_stub_1.2",
42      "hdf_core:libhdf_host",
43      "hdf_core:libhdf_utils",
44      "hdf_core:libhdi",
45      "hilog:libhilog",
46      "hisysevent:libhisysevent",
47      "hitrace:hitrace_meter",
48      "ipc:ipc_single",
49      "libusb:libusb",
50      "drivers_interface_usb:libusb_stub_2.0",
51    ]
52    if (usb_c_utils_enable) {
53      external_deps += [ "c_utils:utils" ]
54    }
55  } else {
56    external_deps = [
57      "drivers_interface_usb:libusb_stub_1.2",
58      "hilog:libhilog",
59    ]
60  }
61
62  install_images = [ chipset_base_dir ]
63  innerapi_tags = [ "passthrough_indirect" ]
64  subsystem_name = "hdf"
65  part_name = "drivers_peripheral_usb"
66}
67