• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
14if (defined(ohos_lite)) {
15  import("//build/lite/config/component/lite_component.gni")
16} else {
17  import("//build/ohos.gni")
18}
19import("//foundation/distributedhardware/devicemanager/devicemanager.gni")
20
21if (defined(ohos_lite)) {
22  if (ohos_kernel_type == "liteos_m") {
23    static_library("devicemanagersdk_mini") {
24      include_dirs = [
25        "include",
26        "include/notify",
27        "${utils_path}/include/log",
28        "${common_path}/include",
29        "//foundation/distributedhardware/devicemanager/services/devicemanagerservice/include/dispatch",
30      ]
31      include_dirs += [
32        "//utils/native/lite/include",
33        "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
34        "//third_party/bounds_checking_function/include",
35        "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
36        "//third_party/json/include",
37      ]
38
39      sources = [
40        "src/device_manager.cpp",
41        "src/device_manager_impl.cpp",
42        "src/notify/device_manager_notify.cpp",
43      ]
44
45      defines = [
46        "LITE_DEVICE",
47        "HI_LOG_ENABLE",
48        "DH_LOG_TAG=\"devicemanagerkit\"",
49        "LOG_DOMAIN=0xD004100",
50      ]
51
52      deps = [
53        "${utils_path}:devicemanagerutils_mini",
54        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
55        "//foundation/distributedschedule/samgr_lite/samgr",
56        "//third_party/bounds_checking_function:libsec_static",
57        "//utils/native/lite:utils",
58      ]
59    }
60  } else {
61    shared_library("devicemanagersdk") {
62      include_dirs = [
63        "include",
64        "include/ipc",
65        "include/ipc/lite",
66        "include/notify",
67        "${utils_path}/include/log",
68        "${utils_path}/include/ipc/lite",
69        "${common_path}/include/ipc",
70        "${common_path}/include/ipc/model",
71        "${common_path}/include",
72      ]
73      include_dirs += [
74        "//utils/native/lite/include",
75        "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
76        "//third_party/bounds_checking_function/include",
77        "//foundation/communication/ipc_lite/interfaces/kits",
78        "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
79        "//third_party/json/include",
80      ]
81
82      sources = [
83        "src/device_manager.cpp",
84        "src/device_manager_impl.cpp",
85        "src/ipc/ipc_client_proxy.cpp",
86        "src/ipc/lite/ipc_client_manager.cpp",
87        "src/ipc/lite/ipc_client_server_proxy.cpp",
88        "src/ipc/lite/ipc_client_stub.cpp",
89        "src/ipc/lite/ipc_cmd_parser.cpp",
90        "src/notify/device_manager_notify.cpp",
91      ]
92
93      defines = [
94        "LITE_DEVICE",
95        "HI_LOG_ENABLE",
96        "DH_LOG_TAG=\"devicemanagerkit\"",
97        "LOG_DOMAIN=0xD004100",
98      ]
99
100      deps = [
101        "${utils_path}:devicemanagerutils",
102        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
103        "//foundation/communication/ipc_lite:liteipc_adapter",
104        "//foundation/distributedschedule/samgr_lite/samgr:samgr",
105        "//third_party/bounds_checking_function:libsec_shared",
106        "//utils/native/lite:utils",
107      ]
108    }
109  }
110} else {
111  ohos_shared_library("devicemanagersdk") {
112    include_dirs = [
113      "//utils/native/base/include",
114      "//utils/system/safwk/native/include",
115      "include",
116      "include/ipc/standard",
117      "include/ipc",
118      "include/notify",
119      "${utils_path}/include/log",
120      "${common_path}/include/ipc",
121      "${common_path}/include/ipc/model",
122      "${utils_path}/include/ipc/standard",
123      "${common_path}/include",
124      "//third_party/json/include",
125    ]
126
127    sources = [
128      "src/device_manager.cpp",
129      "src/device_manager_impl.cpp",
130      "src/ipc/ipc_client_proxy.cpp",
131      "src/ipc/standard/ipc_client_manager.cpp",
132      "src/ipc/standard/ipc_client_server_proxy.cpp",
133      "src/ipc/standard/ipc_client_stub.cpp",
134      "src/ipc/standard/ipc_cmd_parser.cpp",
135      "src/notify/device_manager_notify.cpp",
136    ]
137
138    deps = [
139      "${utils_path}:devicemanagerutils",
140      "//utils/native/base:utils",
141    ]
142
143    defines = [
144      "HI_LOG_ENABLE",
145      "DH_LOG_TAG=\"devicemanagerkit\"",
146      "LOG_DOMAIN=0xD004100",
147    ]
148
149    external_deps = [
150      "appexecfwk_standard:appexecfwk_base",
151      "appexecfwk_standard:appexecfwk_core",
152      "hiviewdfx_hilog_native:libhilog",
153      "ipc:ipc_core",
154      "safwk:system_ability_fwk",
155      "samgr_standard:samgr_proxy",
156    ]
157
158    subsystem_name = "distributedhardware"
159
160    part_name = "device_manager_base"
161  }
162}
163