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("../extdevmgr.gni") 15 16ohos_shared_library("driver_extension_manager") { 17 install_enable = true 18 sources = [ 19 "${ext_mgr_path}/services/native/driver_extension_manager/src/driver_ext_mgr_types.cpp", 20 "native/driver_extension_manager/src/driver_ext_mgr.cpp", 21 "native/driver_extension_manager/src/event_config.cpp", 22 "native/driver_extension_manager/src/ext_permission_manager.cpp", 23 ] 24 25 include_dirs = [ 26 "${ext_mgr_path}/services/native/driver_extension_manager/include", 27 "${ext_mgr_path}/interfaces/ddk/usb/", 28 "${ext_mgr_path}/interfaces/innerkits/", 29 "${ext_mgr_path}/services/native/driver_extension_manager/include/drivers_hisysevent", 30 "${ext_mgr_path}/services/native/driver_extension_manager/include/drivers_pkg_manager", 31 "${ext_mgr_path}/services/native/driver_extension_manager/include/device_manager", 32 "${ext_mgr_path}/services/native/driver_extension_manager/include/bus_extension/core", 33 "${ext_mgr_path}/services/native/driver_extension_manager/include/bus_extension/usb", 34 "${ext_mgr_path}/services/native/driver_extension_manager/include/device_notification", 35 ] 36 configs = [ "${utils_path}:utils_config" ] 37 deps = [ 38 "${ext_mgr_path}/interfaces/innerkits:external_device_manager_stub", 39 "${ext_mgr_path}/services/native/driver_extension_manager/profile:peripheral_fault_notifier_config", 40 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_fault_icon", 41 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_locale_path", 42 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_base", 43 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_bo_CN", 44 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_ug", 45 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_CN", 46 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_HK", 47 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_TW", 48 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zz_ZX", 49 "${ext_mgr_path}/services/native/driver_extension_manager/src/bus_extension/core:driver_extension_bus_core", 50 "${ext_mgr_path}/services/native/driver_extension_manager/src/device_manager:driver_extension_device_manager", 51 "${ext_mgr_path}/services/native/driver_extension_manager/src/device_notification:notification_peripheral", 52 "${ext_mgr_path}/services/native/driver_extension_manager/src/drivers_hisysevent:report_sys_event", 53 "${ext_mgr_path}/services/native/driver_extension_manager/src/drivers_pkg_manager:drivers_pkg_manager", 54 ] 55 external_deps = [ 56 "ability_runtime:ability_manager", 57 "access_token:libaccesstoken_sdk", 58 "access_token:libtokenid_sdk", 59 "bundle_framework:appexecfwk_base", 60 "bundle_framework:appexecfwk_core", 61 "bundle_framework:libappexecfwk_common", 62 "cJSON:cjson", 63 "c_utils:utils", 64 "distributed_notification_service:ans_innerkits", 65 "hilog:libhilog", 66 "hisysevent:libhisysevent", 67 "i18n:intl_util", 68 "ipc:ipc_core", 69 "safwk:system_ability_fwk", 70 "samgr:samgr_proxy", 71 ] 72 cflags_cc = [ 73 "-fno-asynchronous-unwind-tables", 74 "-fno-unwind-tables", 75 "-Os", 76 ] 77 78 sanitize = { 79 cfi = true 80 cfi_cross_dso = true 81 cfi_no_nvcall = true 82 cfi_vcall_icall_only = true 83 debug = false 84 } 85 86 shlib_type = "sa" 87 subsystem_name = "hdf" 88 part_name = "external_device_manager" 89} 90 91################################################################################################################ 92 93config("driver_extension_manager_test_public_config") { 94 include_dirs = [ 95 "${ext_mgr_path}/services/native/driver_extension_manager/include", 96 "${ext_mgr_path}/interfaces/ddk/usb/", 97 "${ext_mgr_path}/interfaces/innerkits/", 98 "${ext_mgr_path}/utils/include/", 99 "${ext_mgr_path}/services/native/driver_extension_manager/include/drivers_pkg_manager", 100 ] 101} 102 103ohos_static_library("driver_extension_manager_test") { 104 sources = [ 105 "${ext_mgr_path}/services/native/driver_extension_manager/src/driver_ext_mgr_types.cpp", 106 "native/driver_extension_manager/src/driver_ext_mgr.cpp", 107 "native/driver_extension_manager/src/event_config.cpp", 108 "native/driver_extension_manager/src/ext_permission_manager.cpp", 109 ] 110 111 public_configs = [ ":driver_extension_manager_test_public_config" ] 112 113 include_dirs = [ 114 "${ext_mgr_path}/interfaces/ddk/usb/", 115 "${ext_mgr_path}/services/native/driver_extension_manager/include/device_manager", 116 "${ext_mgr_path}/services/native/driver_extension_manager/include/drivers_hisysevent", 117 "${ext_mgr_path}/services/native/driver_extension_manager/include/bus_extension/core", 118 "${ext_mgr_path}/services/native/driver_extension_manager/include/device_notification", 119 ] 120 121 configs = [ "${utils_path}:utils_config" ] 122 deps = [ 123 "${ext_mgr_path}/interfaces/innerkits:external_device_manager_stub", 124 "${ext_mgr_path}/services/native/driver_extension_manager/profile:peripheral_fault_notifier_config", 125 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_fault_icon", 126 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_locale_path", 127 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_base", 128 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_bo_CN", 129 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_ug", 130 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_CN", 131 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_HK", 132 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zh_TW", 133 "${ext_mgr_path}/services/native/driver_extension_manager/resources:peripheral_notification_zz_ZX", 134 "${ext_mgr_path}/services/native/driver_extension_manager/src/bus_extension/core:driver_extension_bus_core", 135 "${ext_mgr_path}/services/native/driver_extension_manager/src/device_manager:driver_extension_device_manager", 136 "${ext_mgr_path}/services/native/driver_extension_manager/src/device_notification:notification_peripheral", 137 "${ext_mgr_path}/services/native/driver_extension_manager/src/drivers_hisysevent:report_sys_event", 138 "${ext_mgr_path}/services/native/driver_extension_manager/src/drivers_pkg_manager:drivers_pkg_manager", 139 ] 140 external_deps = [ 141 "ability_runtime:ability_manager", 142 "access_token:libaccesstoken_sdk", 143 "access_token:libtokenid_sdk", 144 "bundle_framework:appexecfwk_base", 145 "bundle_framework:appexecfwk_core", 146 "bundle_framework:libappexecfwk_common", 147 "cJSON:cjson", 148 "c_utils:utils", 149 "distributed_notification_service:ans_innerkits", 150 "hilog:libhilog", 151 "i18n:intl_util", 152 "ipc:ipc_core", 153 "safwk:system_ability_fwk", 154 "samgr:samgr_proxy", 155 ] 156 157 subsystem_name = "hdf" 158 part_name = "external_device_manager" 159} 160