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