• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("tools_acm_config") {
18  include_dirs = [
19    "${ability_runtime_path}/services/common/include",
20    "include",
21  ]
22
23  defines = [
24    "ACCOUNT_LOG_TAG = \"AccountTool\"",
25    "LOG_DOMAIN = 0xD001B00",
26  ]
27}
28
29ohos_source_set("tools_acm_source_set") {
30  branch_protector_ret = "pac_ret"
31
32  sanitize = {
33    cfi = true
34    cfi_cross_dso = true
35    debug = false
36  }
37
38  sources = [
39    "${ability_runtime_path}/tools/aa/src/shell_command.cpp",
40    "${os_account_path}/frameworks/domain_account/src/domain_account_common.cpp",
41    "src/account_command.cpp",
42    "src/main.cpp",
43  ]
44
45  public_configs = [
46    "${ability_runtime_path}/tools/aa:ability_command_config",
47    ":tools_acm_config",
48  ]
49
50  cflags = []
51  if (target_cpu == "arm") {
52    cflags += [ "-DBINDER_IPC_32BIT" ]
53  }
54  if (os_account_multiple_active_accounts) {
55    cflags += [ "-DENABLE_MULTIPLE_ACTIVE_ACCOUNTS" ]
56  }
57  if (os_account_support_deactivate_main_os_account) {
58    cflags += [ "-DSUPPROT_STOP_MAIN_OS_ACCOUNT" ]
59  }
60  cflags += [ "-pipe" ]
61  cflags_cc = [
62    "-Wdate-time",
63    "-Wformat=2",
64    "-Wfloat-equal",
65    "-Wshadow",
66  ]
67
68  deps = [
69    "${common_path}:libaccount_common",
70    "${os_account_core_path}:os_account_core",
71  ]
72
73  external_deps = [
74    "ability_base:want",
75    "c_utils:utils",
76    "hilog:libhilog",
77  ]
78  subsystem_name = "account"
79  part_name = "os_account"
80}
81
82ohos_executable("acm") {
83  branch_protector_ret = "pac_ret"
84
85  sanitize = {
86    cfi = true
87    cfi_cross_dso = true
88    debug = false
89  }
90
91  deps = [ ":tools_acm_source_set" ]
92
93  external_deps = [ "hilog:libhilog" ]
94
95  configs = [ "${account_coverage_config_path}:coverage_flags" ]
96
97  install_enable = true
98
99  subsystem_name = "account"
100  part_name = "os_account"
101}
102
103group("tools_acm") {
104  deps = [ ":acm" ]
105}
106