• 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("//base/account/os_account/os_account.gni")
15import("//build/ohos.gni")
16
17config("account_iam_innnerkits_config") {
18  visibility = [ ":*" ]
19
20  include_dirs = [
21    "${account_iam_interfaces_native_path}/include",
22    "${innerkits_path}/include",
23  ]
24
25  cflags = []
26  if (target_cpu == "arm") {
27    cflags += [ "-DBINDER_IPC_32BIT" ]
28  }
29
30  cflags += [ "-pipe" ]
31  cflags_cc = [
32    "-Wdate-time",
33    "-Wformat=2",
34    "-Wfloat-equal",
35    "-Wshadow",
36  ]
37
38  if (has_pin_auth_part) {
39    cflags_cc += [ "-DHAS_PIN_AUTH_PART" ]
40  }
41
42  if (has_user_auth_part) {
43    cflags_cc += [ "-DHAS_USER_AUTH_PART" ]
44  }
45
46  defines = [
47    "ACCOUNT_LOG_TAG = \"AccountIAMFwk\"",
48    "LOG_DOMAIN = 0xD001B00",
49  ]
50}
51
52config("account_iam_innerkits_public_config") {
53  visibility = [ ":*" ]
54
55  include_dirs = [
56    "${account_iam_interfaces_native_path}/include",
57    "${innerkits_native_path}/include",
58    "//base/useriam/pin_auth/frameworks/ipc/common_defines",
59    "//base/useriam/pin_auth/frameworks/ipc/inc",
60    "//base/useriam/pin_auth/interfaces/inner_api",
61    "//base/useriam/user_auth_framework/interfaces/inner_api",
62  ]
63}
64
65ohos_shared_library("account_iam_innerkits") {
66  sources = [
67    "${account_iam_framework_path}/src/account_iam_callback_service.cpp",
68    "${account_iam_framework_path}/src/account_iam_callback_stub.cpp",
69    "${account_iam_framework_path}/src/account_iam_client.cpp",
70    "${account_iam_framework_path}/src/account_iam_mgr_proxy.cpp",
71  ]
72
73  configs = [
74    ":account_iam_innnerkits_config",
75    "${account_coverage_config_path}:coverage_flags",
76  ]
77
78  public_configs = [ ":account_iam_innerkits_public_config" ]
79
80  deps = [
81    "${domain_account_framework_path}:domain_account_innerkits",
82    "${innerkits_native_path}:libaccountkits",
83    "${os_account_innerkits_native_path}:os_account_innerkits",
84    "//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
85  ]
86
87  if (has_pin_auth_part) {
88    deps += [ "//base/useriam/pin_auth/frameworks:pinauth_framework" ]
89  }
90
91  if (has_user_auth_part) {
92    deps += [ "//base/useriam/user_auth_framework/frameworks/native/client:userauth_client" ]
93  }
94
95  external_deps = [
96    "access_token:libaccesstoken_sdk",
97    "c_utils:utils",
98    "hiviewdfx_hilog_native:libhilog",
99    "ipc:ipc_core",
100    "samgr:samgr_proxy",
101  ]
102
103  subsystem_name = "account"
104  part_name = "os_account"
105}
106