• 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}
19
20import("//foundation/distributedhardware/devicemanager/devicemanager.gni")
21
22if (defined(ohos_lite)) {
23  if (ohos_kernel_type == "liteos_m") {
24    static_library("devicemanagerservice_mini") {
25      include_dirs = [
26        "include",
27        "include/ability",
28        "include/softbus",
29        "include/requestauth",
30        "include/auth",
31        "include/timer",
32        "include/message",
33        "${utils_path}/include/cipher",
34        "${utils_path}/include/log",
35        "${utils_path}/include",
36        "${common_path}/include",
37        "${innerkits_path_small}/native_cpp/include",
38        "${innerkits_path_small}/native_cpp/include/notify",
39        "include/dispatch",
40      ]
41
42      include_dirs += [
43        "//base/security/deviceauth/interfaces/innerkits",
44        "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
45        "//utils/native/lite/include",
46        "//utils/system/safwk/native/include",
47        "//third_party/json/include",
48        "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
49        "//third_party/bounds_checking_function/include",
50        "//foundation/communication/ipc_lite/interfaces/kits",
51        "//foundation/communication/dsoftbus/interfaces/kits/bus_center",
52        "//foundation/communication/dsoftbus/interfaces/kits/common",
53        "//foundation/communication/dsoftbus/interfaces/kits/discovery",
54        "//foundation/communication/dsoftbus/interfaces/kits/transport",
55        "//foundation/communication/dsoftbus/interfaces/inner_kits/transport",
56        "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
57      ]
58
59      sources = [
60        "src/ability/lite/dm_ability_manager.cpp",
61        "src/auth/hichain_connector.cpp",
62        "src/dispatch/command_dispatch.cpp",
63        "src/dispatch/message_processing.cpp",
64        "src/dispatch/server_init.cpp",
65        "src/dispatch/server_stub.cpp",
66        "src/message/msg_codec.cpp",
67        "src/message/msg_head.cpp",
68        "src/message/msg_request_auth.cpp",
69        "src/message/msg_response_auth.cpp",
70        "src/message/msg_sync_group.cpp",
71        "src/requestauth/auth_manager.cpp",
72        "src/requestauth/request_session.cpp",
73        "src/requestauth/response_session.cpp",
74        "src/softbus/softbus_adapter.cpp",
75        "src/softbus/softbus_session.cpp",
76        "src/timer/dm_timer.cpp",
77      ]
78
79      defines = [
80        "LITE_DEVICE",
81        "HI_LOG_ENABLE",
82        "DH_LOG_TAG=\"devicemanagerservice\"",
83        "LOG_DOMAIN=0xD004100",
84      ]
85
86      ldflags = dm_ldflags
87
88      deps = [
89        "${innerkits_path_small}/native_cpp:devicemanagersdk_mini",
90        "${utils_path}:devicemanagerutils_mini",
91        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_static",
92        "//base/security/deviceauth/services:deviceauth",
93        "//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
94        "//foundation/communication/dsoftbus/sdk:softbus_client",
95        "//foundation/distributedschedule/samgr_lite/samgr",
96        "//third_party/bounds_checking_function:libsec_static",
97        "//third_party/mbedtls",
98        "//utils/native/lite:utils",
99      ]
100    }
101  } else {
102    executable("devicemanagerservice") {
103      include_dirs = [
104        "include",
105        "include/ability",
106        "include/softbus",
107        "include/requestauth",
108        "include/auth",
109        "include/ipc",
110        "include/timer",
111        "include/message",
112        "include/ipc/lite",
113        "${utils_path}/include/cipher",
114        "${utils_path}/include/log",
115        "${utils_path}/include/ipc/lite",
116        "${utils_path}/include",
117        "${common_path}/include/ipc",
118        "${common_path}/include/ipc/model",
119        "${common_path}/include",
120        "${innerkits_path}/native_cpp/include",
121        "${innerkits_path}/native_cpp/include/ipc/lite",
122      ]
123
124      include_dirs += [
125        "//base/security/deviceauth/interfaces/innerkits",
126        "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include",
127        "//utils/native/lite/include",
128        "//utils/system/safwk/native/include",
129        "//third_party/json/include",
130        "//base/hiviewdfx/hilog_lite/interfaces/native/innerkits/hilog",
131        "//third_party/bounds_checking_function/include",
132        "//foundation/communication/ipc_lite/interfaces/kits",
133        "//foundation/communication/dsoftbus/interfaces/kits/bus_center",
134        "//foundation/communication/dsoftbus/interfaces/kits/common",
135        "//foundation/communication/dsoftbus/interfaces/kits/discovery",
136        "//foundation/communication/dsoftbus/interfaces/kits/transport",
137        "//foundation/communication/dsoftbus/interfaces/inner_kits/transport",
138        "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr",
139      ]
140
141      sources = [
142        "src/ability/lite/dm_ability_manager.cpp",
143        "src/auth/hichain_connector.cpp",
144        "src/ipc/ipc_server_adapter.cpp",
145        "src/ipc/ipc_server_listener_adapter.cpp",
146        "src/ipc/lite/ipc_cmd_parser.cpp",
147        "src/ipc/lite/ipc_server_listener.cpp",
148        "src/ipc/lite/ipc_server_listenermgr.cpp",
149        "src/ipc/lite/ipc_server_main.cpp",
150        "src/ipc/lite/ipc_server_stub.cpp",
151        "src/message/msg_codec.cpp",
152        "src/message/msg_head.cpp",
153        "src/message/msg_request_auth.cpp",
154        "src/message/msg_response_auth.cpp",
155        "src/message/msg_sync_group.cpp",
156        "src/requestauth/auth_manager.cpp",
157        "src/requestauth/request_session.cpp",
158        "src/requestauth/response_session.cpp",
159        "src/softbus/softbus_adapter.cpp",
160        "src/softbus/softbus_session.cpp",
161        "src/timer/dm_timer.cpp",
162      ]
163
164      defines = [
165        "LITE_DEVICE",
166        "HI_LOG_ENABLE",
167        "DH_LOG_TAG=\"devicemanagerservice\"",
168        "LOG_DOMAIN=0xD004100",
169      ]
170
171      ldflags = dm_ldflags
172
173      deps = [
174        "${innerkits_path}/native_cpp:devicemanagersdk",
175        "${utils_path}:devicemanagerutils",
176        "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
177        "//base/security/deviceauth/services:deviceauth_sdk",
178        "//base/startup/syspara_lite/frameworks/parameter/src:sysparam",
179        "//foundation/communication/dsoftbus/sdk:softbus_client",
180        "//foundation/communication/ipc_lite:liteipc_adapter",
181        "//foundation/distributedschedule/samgr_lite/samgr:samgr",
182        "//third_party/bounds_checking_function:libsec_shared",
183        "//third_party/mbedtls:mbedtls_shared",
184        "//utils/native/lite:utils",
185      ]
186    }
187  }
188} else {
189  ohos_shared_library("devicemanagerservice") {
190    include_dirs = [
191      "//utils/native/base/include",
192      "//utils/system/safwk/native/include",
193      "include",
194      "include/ability",
195      "include/softbus",
196      "include/requestauth",
197      "include/auth",
198      "include/ipc",
199      "include/message",
200      "include/timer",
201      "include/ipc/standard",
202      "${utils_path}/include/cipher",
203      "${utils_path}/include/log",
204      "${utils_path}/include",
205      "${utils_path}/include/ipc/standard",
206      "${common_path}/include",
207      "${common_path}/include/ipc",
208      "${common_path}/include/ipc/model",
209      "${innerkits_path}/native_cpp/include",
210      "${innerkits_path}/native_cpp/include/ipc/standard",
211      "//base/security/deviceauth/interfaces/innerkits",
212      "//base/startup/syspara_lite/adapter/native/syspara/include",
213      "//third_party/json/include",
214    ]
215
216    sources = [
217      "src/ability/standard/dm_ability_manager.cpp",
218      "src/auth/hichain_connector.cpp",
219      "src/ipc/ipc_server_adapter.cpp",
220      "src/ipc/ipc_server_listener_adapter.cpp",
221      "src/ipc/standard/ipc_cmd_parser.cpp",
222      "src/ipc/standard/ipc_server_client_proxy.cpp",
223      "src/ipc/standard/ipc_server_listener.cpp",
224      "src/ipc/standard/ipc_server_stub.cpp",
225      "src/message/msg_codec.cpp",
226      "src/message/msg_head.cpp",
227      "src/message/msg_request_auth.cpp",
228      "src/message/msg_response_auth.cpp",
229      "src/message/msg_sync_group.cpp",
230      "src/requestauth/auth_manager.cpp",
231      "src/requestauth/request_session.cpp",
232      "src/requestauth/response_session.cpp",
233      "src/softbus/softbus_adapter.cpp",
234      "src/softbus/softbus_session.cpp",
235      "src/timer/dm_timer.cpp",
236    ]
237
238    deps = [
239      "${innerkits_path}/native_cpp:devicemanagersdk",
240      "${utils_path}:devicemanagerutils",
241      "//base/security/deviceauth/services:deviceauth_sdk",
242      "//foundation/aafwk/standard/interfaces/innerkits/ability_manager:ability_manager",
243      "//foundation/aafwk/standard/interfaces/innerkits/want:want",
244      "//foundation/aafwk/standard/services/abilitymgr:abilityms",
245      "//utils/native/base:utils",
246    ]
247
248    defines = [
249      "HI_LOG_ENABLE",
250      "DH_LOG_TAG=\"devicemanagerservice\"",
251      "LOG_DOMAIN=0xD004100",
252    ]
253
254    external_deps = [
255      "appexecfwk_standard:appexecfwk_base",
256      "appexecfwk_standard:appexecfwk_core",
257      "appexecfwk_standard:libeventhandler",
258      "dsoftbus_standard:softbus_client",
259      "hiviewdfx_hilog_native:libhilog",
260      "ipc:ipc_core",
261      "safwk:system_ability_fwk",
262      "samgr_standard:samgr_proxy",
263      "startup_l2:syspara",
264    ]
265
266    subsystem_name = "distributedhardware"
267
268    part_name = "device_manager_base"
269  }
270}
271