1# Copyright (c) 2021-2023 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("../../../os_account.gni")
16
17config("public_account_config") {
18  include_dirs = [
19    "include",
20    "${common_path}/include",
21    "${common_path}/utils/include",
22    "${innerkits_common}/include",
23    "${innerkits_path}/include",
24  ]
25}
26
27config("accountkits_config") {
28  defines = [
29    "ACCOUNT_LOG_TAG = \"DistributedAccountFwk\"",
30    "LOG_DOMAIN = 0xD001B00",
31  ]
32}
33
34ohos_shared_library("libaccountkits") {
35  branch_protector_ret = "pac_ret"
36
37  sanitize = {
38    cfi = true
39    cfi_cross_dso = true
40    debug = false
41    blocklist = "./cfi_blocklist.txt"
42  }
43
44  sources = [
45    "src/account_info_parcel.cpp",
46    "src/account_proxy.cpp",
47    "src/distributed_account_event_proxy.cpp",
48    "src/distributed_account_event_service.cpp",
49    "src/distributed_account_event_stub.cpp",
50    "src/distributed_account_subscribe_callback.cpp",
51    "src/ohos_account_kits.cpp",
52    "src/ohos_account_kits_impl.cpp",
53    "src/system_ability_status_change_listener.cpp",
54  ]
55
56  cflags = [ "-pipe" ]
57  cflags_cc = [
58    "-Wdate-time",
59    "-Wformat=2",
60    "-Wfloat-equal",
61    "-Wshadow",
62  ]
63
64  configs = [ ":accountkits_config" ]
65
66  public_configs = [ ":public_account_config" ]
67
68  if (!use_clang_coverage) {
69    version_script = "libohos_account_innerkits.map"
70  }
71
72  deps = [ "${common_path}:libaccount_common" ]
73
74  external_deps = [
75    "ability_base:want",
76    "c_utils:utils",
77    "hilog:libhilog",
78    "ipc:ipc_single",
79    "samgr:samgr_proxy",
80  ]
81  public_external_deps = [ "json:nlohmann_json_static" ]
82  innerapi_tags = [ "platformsdk" ]
83  subsystem_name = "account"
84  part_name = "os_account"
85}
86