1# Copyright (c) 2022-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("./../../../../../hdf_core/adapter/uhdf2/uhdf.gni") 16import("./../../../usb.gni") 17 18ohos_shared_library("libusbfn_mtp_interface_service_1.0") { 19 sources = [ "src/usbfn_mtp_impl.cpp" ] 20 21 include_dirs = [ 22 "./../../../interfaces/ddk/device", 23 "./../../../interfaces/ddk/common", 24 "${usb_driver_path}/gadget/function/include", 25 "${usb_driver_path}/gadget/function/mtp/include", 26 ] 27 28 deps = [ "${usb_driver_path}/ddk:libusb_ddk_device" ] 29 30 external_deps = [ 31 "c_utils:utils", 32 "drivers_interface_usb:usbfn_mtp_idl_headers", 33 "hdf_core:libhdf_host", 34 "hdf_core:libhdf_utils", 35 "hilog:libhilog", 36 "ipc:ipc_single", 37 ] 38 39 install_images = [ chipset_base_dir ] 40 subsystem_name = "hdf" 41 part_name = "drivers_peripheral_usb" 42} 43 44ohos_shared_library("libusbfn_mtp_driver") { 45 sources = [ "src/usbfn_mtp_interface_driver.cpp" ] 46 47 include_dirs = [ 48 "./../../../interfaces/ddk/device", 49 "./../../../interfaces/ddk/common", 50 "${usb_driver_path}/gadget/function/include", 51 "${usb_driver_path}/gadget/function/mtp/include", 52 ] 53 54 deps = [] 55 56 external_deps = [ 57 "c_utils:utils", 58 "drivers_interface_usb:libusbfn_mtp_stub_1.0", 59 "hdf_core:libhdf_host", 60 "hdf_core:libhdf_ipc_adapter", 61 "hdf_core:libhdf_utils", 62 "hdf_core:libhdi", 63 "hilog:libhilog", 64 "ipc:ipc_single", 65 ] 66 67 shlib_type = "hdi" 68 install_images = [ chipset_base_dir ] 69 subsystem_name = "hdf" 70 part_name = "drivers_peripheral_usb" 71} 72 73group("hdi_usbfn_mtp_service") { 74 deps = [ 75 ":libusbfn_mtp_driver", 76 ":libusbfn_mtp_interface_service_1.0", 77 ] 78} 79