• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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("account_iam_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 = \"AccountIAMFwk\"",
35    "LOG_DOMAIN = 0xD001B00",
36  ]
37}
38
39config("account_iam_innerkits_public_config") {
40  visibility = [ ":*" ]
41
42  include_dirs = [
43    "${account_iam_interfaces_native_path}/include",
44    "${common_path}/utils/include",
45    "${innerkits_common}/include",
46  ]
47}
48
49ohos_shared_library("account_iam_innerkits") {
50  branch_protector_ret = "pac_ret"
51
52  sanitize = {
53    cfi = true
54    cfi_cross_dso = true
55    debug = false
56  }
57
58  sources = [
59    "${account_iam_framework_path}/src/account_iam_callback_service.cpp",
60    "${account_iam_framework_path}/src/account_iam_callback_stub.cpp",
61    "${account_iam_framework_path}/src/account_iam_client.cpp",
62    "${account_iam_framework_path}/src/account_iam_mgr_proxy.cpp",
63  ]
64
65  configs = [
66    ":account_iam_innnerkits_config",
67    "${account_coverage_config_path}:coverage_flags",
68  ]
69
70  public_configs = [ ":account_iam_innerkits_public_config" ]
71
72  deps = [
73    "${common_path}:libaccount_common",
74    "${domain_account_framework_path}:domain_account_innerkits",
75    "${innerkits_native_path}:libaccountkits",
76    "${os_account_innerkits_native_path}:os_account_innerkits",
77  ]
78
79  external_deps = [
80    "access_token:libaccesstoken_sdk",
81    "c_utils:utils",
82    "hilog:libhilog",
83    "ipc:ipc_single",
84    "samgr:samgr_proxy",
85  ]
86
87  if (ohos_indep_compiler_enable) {
88    external_deps += [ "ability_base:want" ]
89  }
90
91  cflags_cc = []
92  if (has_pin_auth_part) {
93    cflags_cc += [ "-DHAS_PIN_AUTH_PART" ]
94    external_deps += [ "pin_auth:pinauth_framework" ]
95  }
96
97  if (has_user_auth_part) {
98    cflags_cc += [ "-DHAS_USER_AUTH_PART" ]
99    external_deps += [ "user_auth_framework:userauth_client" ]
100  }
101
102  innerapi_tags = [ "platformsdk_indirect" ]
103  subsystem_name = "account"
104  part_name = "os_account"
105}
106