1# Copyright (c) 2021-2022 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("app_account_innnerkits_config") {
18  visibility = [ ":*" ]
19
20  cflags = []
21  if (target_cpu == "arm") {
22    cflags += [ "-DBINDER_IPC_32BIT" ]
23  }
24
25  cflags += [ "-pipe" ]
26  cflags_cc = [
27    "-Wdate-time",
28    "-Wformat=2",
29    "-Wfloat-equal",
30    "-Wshadow",
31  ]
32
33  defines = [
34    "ACCOUNT_LOG_TAG = \"AppAccountFwk\"",
35    "LOG_DOMAIN = 0xD001B00",
36  ]
37}
38
39config("app_account_innerkits_public_config") {
40  visibility = [ ":*" ]
41
42  include_dirs = [
43    "${app_account_core_path}/include",
44    "${app_account_extension_path}/include",
45    "${app_account_interfaces_native_path}/include",
46    "${os_account_path}/interfaces/innerkits/appaccount/native/include",
47    "${account_napi_common_path}/include",
48    "${app_account_kits_path}/include",
49    "${os_account_path}/frameworks/common/include",
50    "include",
51    "${common_path}/utils/include",
52    "${innerkits_common}/include",
53  ]
54}
55
56ohos_shared_library("app_account_innerkits") {
57  branch_protector_ret = "pac_ret"
58
59  sanitize = {
60    cfi = true
61    cfi_cross_dso = true
62    debug = false
63  }
64
65  sources = [
66    "src/app_account.cpp",
67    "src/app_account_authenticator_callback_proxy.cpp",
68    "src/app_account_authenticator_callback_stub.cpp",
69    "src/app_account_authenticator_stub.cpp",
70    "src/app_account_authorization_extension_callback_client.cpp",
71    "src/app_account_authorization_extension_callback_proxy.cpp",
72    "src/app_account_authorization_extension_callback_service.cpp",
73    "src/app_account_authorization_extension_callback_stub.cpp",
74    "src/app_account_authorization_extension_service.cpp",
75    "src/app_account_authorization_extension_stub.cpp",
76    "src/app_account_common.cpp",
77    "src/app_account_death_recipient.cpp",
78    "src/app_account_event_listener.cpp",
79    "src/app_account_event_stub.cpp",
80    "src/app_account_info.cpp",
81    "src/app_account_manager.cpp",
82    "src/app_account_proxy.cpp",
83    "src/app_account_subscribe_info.cpp",
84    "src/app_account_subscriber.cpp",
85  ]
86
87  configs = [ ":app_account_innnerkits_config" ]
88
89  public_configs = [ ":app_account_innerkits_public_config" ]
90
91  use_exceptions = true
92
93  if (!use_clang_coverage) {
94    version_script = "libapp_account_innerkits.map"
95  }
96
97  deps = [
98    "${common_path}:libaccount_common",
99    "${innerkits_native_path}:libaccountkits",
100  ]
101
102  external_deps = [
103    "ability_base:want",
104    "ability_runtime:ability_context_native",
105    "ability_runtime:ability_manager",
106    "ability_runtime:abilitykit_native",
107    "ability_runtime:app_context",
108    "ability_runtime:runtime",
109    "ability_runtime:service_extension",
110    "ability_runtime:ui_extension",
111    "c_utils:utils",
112    "hilog:libhilog",
113    "ipc:ipc_napi",
114    "ipc:ipc_single",
115    "napi:ace_napi",
116    "samgr:samgr_proxy",
117  ]
118
119  innerapi_tags = [ "platformsdk" ]
120  subsystem_name = "account"
121  part_name = "os_account"
122}
123