1# Copyright (c) 2023-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("./../input.gni") 17 18ohos_shared_library("libhid_ddk_service_1.1") { 19 sources = [ 20 "src/ddk_sysfs_dev_node.cpp", 21 "src/hid_ddk_permission.cpp", 22 "src/hid_ddk_service.cpp", 23 ] 24 25 if (is_standard_system) { 26 sources += [ "src/hid_linux_adapter.cpp" ] 27 } else if (defined(ohos_lite)) { 28 sources += [ "src/hid_liteos_adapter.cpp" ] 29 } 30 include_dirs = [ 31 "include/", 32 "include/emit_event_manager/", 33 "${input_driver_path}/utils/include", 34 ] 35 36 deps = [ "${input_driver_path}/ddk_service/src/emit_event_manager:emit_event_manager" ] 37 38 external_deps = [ 39 "access_token:libaccesstoken_sdk", 40 "c_utils:utils", 41 "drivers_interface_input:libhid_ddk_proxy_1.0", 42 "drivers_interface_input:libhid_ddk_proxy_1.1", 43 "hdf_core:libhdf_utils", 44 "hilog:libhilog", 45 "ipc:ipc_single", 46 ] 47 48 install_images = [ chipset_base_dir ] 49 subsystem_name = "hdf" 50 part_name = "drivers_peripheral_input" 51} 52 53ohos_shared_library("libhid_ddk_driver") { 54 sources = [ "src/hid_ddk_driver.cpp" ] 55 56 include_dirs = [ 57 "include/", 58 "include/emit_event_manager/", 59 "${input_driver_path}/utils/include", 60 ] 61 62 deps = [ "${input_driver_path}/ddk_service/src/emit_event_manager:emit_event_manager" ] 63 64 external_deps = [ 65 "c_utils:utils", 66 "drivers_interface_input:libhid_ddk_stub_1.0", 67 "drivers_interface_input:libhid_ddk_stub_1.1", 68 "hdf_core:libhdf_host", 69 "hdf_core:libhdf_ipc_adapter", 70 "hdf_core:libhdf_utils", 71 "hdf_core:libhdi", 72 "hilog:libhilog", 73 "ipc:ipc_single", 74 ] 75 76 shlib_type = "hdi" 77 install_images = [ chipset_base_dir ] 78 subsystem_name = "hdf" 79 part_name = "drivers_peripheral_input" 80} 81 82group("hid_ddk_target") { 83 deps = [ 84 ":libhid_ddk_driver", 85 ":libhid_ddk_service_1.1", 86 ] 87} 88