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("osaccountinterface_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "${common_path}/include",
21    "${domain_account_framework_path}/include",
22    "${domain_account_interfaces_native_path}/include",
23    "${innerkits_native_path}/include",
24    "${innerkits_path}/include",
25    "${os_account_core_path}/include",
26    "${os_account_interfaces_native_path}/include",
27    "${innerkits_common}/include",
28  ]
29  cflags = []
30  if (target_cpu == "arm") {
31    cflags += [ "-DBINDER_IPC_32BIT" ]
32  }
33  cflags += [ "-pipe" ]
34}
35
36ohos_shared_library("os_account_innerkits") {
37  branch_protector_ret = "pac_ret"
38
39  sanitize = {
40    cfi = true
41    cfi_cross_dso = true
42    debug = false
43  }
44
45  sources = [
46    "${domain_account_framework_path}/src/domain_account_callback_proxy.cpp",
47    "${domain_account_framework_path}/src/domain_account_callback_service.cpp",
48    "${domain_account_framework_path}/src/domain_account_callback_stub.cpp",
49    "${domain_account_framework_path}/src/domain_account_client.cpp",
50    "${domain_account_framework_path}/src/domain_account_common.cpp",
51    "${domain_account_framework_path}/src/domain_account_proxy.cpp",
52    "${domain_account_framework_path}/src/domain_account_status_listener_manager.cpp",
53    "${os_account_core_path}/src/os_account.cpp",
54    "${os_account_core_path}/src/os_account_death_recipient.cpp",
55    "${os_account_core_path}/src/os_account_event_listener.cpp",
56    "${os_account_core_path}/src/os_account_event_stub.cpp",
57    "${os_account_core_path}/src/os_account_proxy.cpp",
58    "src/os_account_info.cpp",
59    "src/os_account_manager.cpp",
60    "src/os_account_subscribe_info.cpp",
61    "src/os_account_subscriber.cpp",
62  ]
63
64  defines = [
65    "ACCOUNT_LOG_TAG = \"OsAccountNativeFwk\"",
66    "LOG_DOMAIN = 0xD001B00",
67  ]
68
69  configs = [ ":osaccountinterface_config" ]
70
71  public_configs = [ ":osaccountinterface_config" ]
72
73  use_exceptions = true
74
75  deps = [
76    "${common_path}:libaccount_common",
77    "${domain_account_framework_path}:domain_account_innerkits",
78    "${innerkits_native_path}:libaccountkits",
79  ]
80
81  if (!use_clang_coverage) {
82    version_script = "libos_account_innerkits.map"
83  }
84
85  external_deps = [
86    "ability_base:want",
87    "c_utils:utils",
88    "hilog:libhilog",
89    "ipc:ipc_single",
90    "samgr:samgr_proxy",
91  ]
92  innerapi_tags = [
93    "platformsdk",
94    "sasdk",
95  ]
96  subsystem_name = "account"
97  part_name = "os_account"
98}
99