1# Copyright (c) 2021-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("./../uhdf.gni") 16 17hdf_framework_path = "./../../../framework" 18hdf_interfaces_path = "./../../../interfaces" 19hdf_uhdf_path = "./.." 20 21ohos_executable("hdf_devmgr") { 22 defines = [ "__USER__" ] 23 include_dirs = [ 24 "$hdf_framework_path/core/manager/include", 25 "$hdf_framework_path/core/common/include/manager/", 26 "$hdf_framework_path/core/host/include", 27 "$hdf_framework_path/core/shared/include", 28 "$hdf_framework_path/utils/include", 29 "$hdf_uhdf_path/include/host", 30 "$hdf_uhdf_path/shared/include", 31 "$hdf_uhdf_path/manager/include", 32 "$hdf_uhdf_path/host/include", 33 "$hdf_uhdf_path/security/include", 34 "$hdf_uhdf_path/utils/include", 35 "include", 36 "$hdf_interfaces_path/inner_api/core", 37 "$hdf_interfaces_path/inner_api/host/shared", 38 "$hdf_interfaces_path/inner_api/host/uhdf", 39 ] 40 41 sources = [ 42 "$hdf_framework_path/core/common/src/hdf_attribute.c", 43 "$hdf_framework_path/core/manager/src/devhost_service_clnt.c", 44 "$hdf_framework_path/core/manager/src/device_token_clnt.c", 45 "$hdf_framework_path/core/manager/src/devmgr_service.c", 46 "$hdf_framework_path/core/manager/src/devsvc_manager.c", 47 "$hdf_framework_path/core/manager/src/hdf_driver_installer.c", 48 "$hdf_framework_path/core/manager/src/hdf_host_info.c", 49 "$hdf_framework_path/core/shared/src/hdf_device_info.c", 50 "$hdf_framework_path/core/shared/src/hdf_object_manager.c", 51 "$hdf_framework_path/core/shared/src/hdf_service_record.c", 52 "$hdf_uhdf_path/shared/src/dev_attribute_serialize.c", 53 "$hdf_uhdf_path/shared/src/hcb_config_entry.c", 54 "device_manager.c", 55 "src/devhost_service_proxy.c", 56 "src/device_token_proxy.c", 57 "src/devmgr_dump.c", 58 "src/devmgr_object_config.c", 59 "src/devmgr_query_device.c", 60 "src/devmgr_service_full.c", 61 "src/devmgr_service_stub.c", 62 "src/devmgr_uevent.c", 63 "src/devsvc_manager_stub.c", 64 "src/driver_installer_full.c", 65 "src/servstat_listener_holder.c", 66 ] 67 68 deps = [ 69 "../ipc:libhdf_ipc_adapter", 70 "../utils:libhdf_utils", 71 ] 72 73 external_deps = [ 74 "c_utils:utils", 75 "hilog:libhilog", 76 "init:libbegetutil", 77 ] 78 79 if (build_selinux) { 80 external_deps += [ "selinux_adapter:libservice_checker" ] 81 cflags = [ "-DWITH_SELINUX" ] 82 } 83 84 install_enable = true 85 install_images = [ chipset_base_dir ] 86 subsystem_name = "hdf" 87 part_name = "hdf_core" 88} 89 90ohos_prebuilt_etc("hdf_devmgr.cfg") { 91 source = "hdf_devmgr.cfg" 92 relative_install_dir = "init" 93 install_images = [ chipset_base_dir ] 94 subsystem_name = "hdf" 95 part_name = "hdf_core" 96} 97 98ohos_prebuilt_etc("hdf_pnp.cfg") { 99 source = "hdf_pnp.cfg" 100 relative_install_dir = "hdfconfig" 101 install_images = [ chipset_base_dir ] 102 subsystem_name = "hdf" 103 part_name = "hdf_core" 104} 105