• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2025 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("libscsi_peripheral_ddk_service_1.0") {
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  branch_protector_ret = "pac_ret"
28
29  sources = [ "src/scsi_ddk_service.cpp" ]
30  include_dirs = [
31    "include",
32    "${usb_driver_path}/ddk/host/include",
33    "${usb_driver_path}/ddk_service/common/include",
34    "${usb_driver_path}/hdf_usb/include",
35    "${usb_driver_path}/utils/include",
36  ]
37
38  if (is_standard_system) {
39    sources += [ "src/scsi_linux_adapter.cpp" ]
40  } else if (defined(ohos_lite)) {
41    sources += [ "src/scsi_liteos_adapter.cpp" ]
42  }
43
44  deps = [
45    "${usb_driver_path}/ddk:libusb_pnp_manager",
46    "${usb_driver_path}/ddk_service/common:libusb_ddk_service_common",
47  ]
48
49  external_deps = [
50    "access_token:libaccesstoken_sdk",
51    "c_utils:utils",
52    "drivers_interface_usb:libscsi_ddk_proxy_1.0",
53    "hdf_core:libhdf_utils",
54    "hilog:libhilog",
55    "ipc:ipc_single",
56  ]
57
58  install_images = [ chipset_base_dir ]
59  subsystem_name = "hdf"
60  part_name = "drivers_peripheral_usb"
61}
62
63ohos_shared_library("libscsi_ddk_driver") {
64  sanitize = {
65    integer_overflow = true
66    ubsan = true
67    boundary_sanitize = true
68    cfi = true
69    cfi_cross_dso = true
70    debug = false
71  }
72  branch_protector_ret = "pac_ret"
73
74  sources = [ "src/scsi_ddk_driver.cpp" ]
75
76  include_dirs = [
77    "include/",
78    "${usb_driver_path}/utils/include",
79  ]
80
81  deps = []
82
83  external_deps = [
84    "c_utils:utils",
85    "drivers_interface_usb:libscsi_ddk_stub_1.0",
86    "hdf_core:libhdf_host",
87    "hdf_core:libhdf_ipc_adapter",
88    "hdf_core:libhdf_utils",
89    "hdf_core:libhdi",
90    "hilog:libhilog",
91    "ipc:ipc_single",
92  ]
93
94  shlib_type = "hdi"
95  install_images = [ chipset_base_dir ]
96  subsystem_name = "hdf"
97  part_name = "drivers_peripheral_usb"
98}
99
100group("scsi_ddk_target") {
101  deps = [
102    ":libscsi_ddk_driver",
103    ":libscsi_peripheral_ddk_service_1.0",
104  ]
105}
106