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("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17ohos_source_set("tools_atm_source_set") { 18 include_dirs = [ 19 "include", 20 "//base/security/access_token/frameworks/common/include", 21 "${ability_runtime_path}/tools/aa/include", 22 "//base/security/access_token/interfaces/innerkits/accesstoken/main/cpp/include", 23 "//base/security/access_token/interfaces/innerkits/privacy/include", 24 "${ability_runtime_services_path}/common/include", 25 ] 26 27 sources = [ 28 "${ability_runtime_path}/tools/aa/src/shell_command.cpp", 29 "src/atm_command.cpp", 30 "src/atm_receiver_impl.cpp", 31 "src/main.cpp", 32 "src/to_string.cpp", 33 ] 34 35 deps = [ 36 "${ability_runtime_path}/tools/aa:aa", 37 "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk", 38 "//base/security/access_token/interfaces/innerkits/privacy:libprivacy_sdk", 39 ] 40 41 cflags = [ "-DHILOG_ENABLE" ] 42 43 if (target_cpu == "arm") { 44 cflags += [ "-DBINDER_IPC_32BIT" ] 45 } 46 47 external_deps = [ 48 "c_utils:utils", 49 "hiviewdfx_hilog_native:libhilog", 50 ] 51 52 if (is_asan) { 53 external_deps += [ 54 "bundle_framework:appexecfwk_core", 55 "ipc:ipc_core", 56 ] 57 } else { 58 include_dirs += [ 59 "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_core/include/bundlemgr", 60 "//foundation/communication/ipc/interfaces/innerkits/ipc_core/include", 61 ] 62 } 63 64 subsystem_name = "security" 65 part_name = "access_token" 66} 67 68ohos_executable("atm") { 69 deps = [ ":tools_atm_source_set" ] 70 71 install_enable = true 72 subsystem_name = "security" 73 part_name = "access_token" 74} 75