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("//base/account/os_account/os_account.gni") 15import("//build/ohos.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 sources = [ 31 "${ability_runtime_path}/tools/aa/src/shell_command.cpp", 32 "src/account_command.cpp", 33 "src/main.cpp", 34 ] 35 36 public_configs = [ 37 "${ability_runtime_path}/tools/aa:ability_command_config", 38 ":tools_acm_config", 39 ] 40 41 cflags = [] 42 if (target_cpu == "arm") { 43 cflags += [ "-DBINDER_IPC_32BIT" ] 44 } 45 if (os_account_multiple_active_accounts) { 46 cflags += [ "-DENABLE_MULTIPLE_ACTIVE_ACCOUNTS" ] 47 } 48 cflags += [ "-pipe" ] 49 cflags_cc = [ 50 "-Wdate-time", 51 "-Wformat=2", 52 "-Wfloat-equal", 53 "-Wshadow", 54 ] 55 56 deps = [ "${os_account_core_path}:os_account_core" ] 57 58 external_deps = [ 59 "c_utils:utils", 60 "hiviewdfx_hilog_native:libhilog", 61 ] 62 part_name = "os_account" 63} 64 65ohos_executable("acm") { 66 deps = [ ":tools_acm_source_set" ] 67 68 configs = [ "${account_coverage_config_path}:coverage_flags" ] 69 70 install_enable = true 71 72 subsystem_name = "account" 73 part_name = "os_account" 74} 75 76group("tools_acm") { 77 deps = [ ":acm" ] 78} 79