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") 15 16ohos_source_set("tools_atm_source_set") { 17 include_dirs = [ 18 "//base/security/access_token/tools/accesstoken/include", 19 "//base/security/access_token/frameworks/common/include", 20 "//foundation/aafwk/standard/tools/aa/include", 21 "//base/security/access_token/interfaces/innerkits/accesstoken/main/cpp/include", 22 "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core/include/bundlemgr", 23 "//foundation/aafwk/standard/services/common/include", 24 ] 25 26 sources = [ 27 "//foundation/aafwk/standard/tools/aa/src/shell_command.cpp", 28 "src/atm_command.cpp", 29 "src/atm_receiver_impl.cpp", 30 "src/main.cpp", 31 ] 32 33 deps = [ 34 "//base/security/access_token/interfaces/innerkits/accesstoken:libaccesstoken_sdk", 35 "//foundation/aafwk/standard/tools/aa:aa", 36 "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core", 37 "//utils/native/base:utils", 38 ] 39 40 cflags = [ "-DHILOG_ENABLE" ] 41 42 if (target_cpu == "arm") { 43 cflags += [ "-DBINDER_IPC_32BIT" ] 44 } 45 46 external_deps = [ 47 "hiviewdfx_hilog_native:libhilog", 48 "ipc:ipc_core", 49 ] 50 51 subsystem_name = "security" 52 part_name = "access_token" 53} 54 55ohos_executable("atm") { 56 deps = [ ":tools_atm_source_set" ] 57 58 install_enable = true 59 subsystem_name = "security" 60 part_name = "access_token" 61} 62