• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-2022 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/hdf_core/adapter/uhdf2/uhdf.gni")
16
17ohos_executable("hdf_devmgr") {
18  defines = [ "__USER__" ]
19  include_dirs = [
20    "//commonlibrary/c_utils/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/devmgr_uevent.c",
58    "src/devsvc_manager_stub.c",
59    "src/driver_installer_full.c",
60    "src/servstat_listener_holder.c",
61  ]
62
63  deps = [
64    "$hdf_uhdf_path/ipc:libhdf_ipc_adapter",
65    "$hdf_uhdf_path/utils:libhdf_utils",
66  ]
67
68  external_deps = [
69    "c_utils:utils",
70    "hiviewdfx_hilog_native:libhilog",
71    "init:libbegetutil",
72  ]
73
74  if (build_selinux) {
75    external_deps += [ "selinux:libservice_checker" ]
76    cflags = [ "-DWITH_SELINUX" ]
77  }
78
79  install_enable = true
80  install_images = [ chipset_base_dir ]
81  subsystem_name = "hdf"
82  part_name = "hdf_core"
83}
84
85ohos_prebuilt_etc("hdf_devmgr.cfg") {
86  source = "hdf_devmgr.cfg"
87  relative_install_dir = "init"
88  install_images = [ chipset_base_dir ]
89  subsystem_name = "hdf"
90  part_name = "hdf_core"
91}
92
93ohos_prebuilt_etc("hdf_pnp.cfg") {
94  source = "hdf_pnp.cfg"
95  relative_install_dir = "hdfconfig"
96  install_images = [ chipset_base_dir ]
97  subsystem_name = "hdf"
98  part_name = "hdf_core"
99}
100