1# Copyright (c) 2021-2024 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("//build/ohos_var.gni")
16import("//foundation/deviceprofile/device_info_manager/deviceprofile.gni")
17
18config("distributed_device_profile_sdk_config") {
19  visibility = [ ":*" ]
20  include_dirs = [
21    "include",
22    "include/callback",
23    "${device_profile_common}/include/constants",
24    "${device_profile_common}/include/interfaces",
25    "${device_profile_common}/include/utils",
26    "${device_profile_path}/radar/include",
27  ]
28}
29
30ohos_shared_library("distributed_device_profile_sdk") {
31  branch_protector_ret = "pac_ret"
32
33  cflags = [
34    "-fstack-protector-strong",
35    "-D_FORTIFY_SOURCE=2",
36    "-O2",
37  ]
38
39  cflags_cc = cflags
40
41  sanitize = {
42    boundary_sanitize = true
43    integer_overflow = true
44    ubsan = true
45    debug = false
46  }
47
48  install_enable = true
49
50  sources = [
51    "src/callback/device_profile_load_callback.cpp",
52    "src/distributed_device_profile_client.cpp",
53    "src/distributed_device_profile_proxy.cpp",
54  ]
55
56  public_configs = [ ":distributed_device_profile_sdk_config" ]
57
58  deps = [
59    "${device_profile_common}:distributed_device_profile_common",
60    "${device_profile_path}/radar:device_profile_radar",
61  ]
62
63  external_deps = [
64    "cJSON:cjson",
65    "c_utils:utils",
66    "eventhandler:libeventhandler",
67    "hilog:libhilog",
68    "ipc:ipc_core",
69    "relational_store:native_rdb",
70    "samgr:samgr_proxy",
71  ]
72
73  part_name = "device_info_manager"
74  subsystem_name = "deviceprofile"
75}
76