1fc0b0055Sopenharmony_ci# Copyright (c) 2022 Huawei Device Co., Ltd. 2fc0b0055Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3fc0b0055Sopenharmony_ci# you may not use this file except in compliance with the License. 4fc0b0055Sopenharmony_ci# You may obtain a copy of the License at 5fc0b0055Sopenharmony_ci# 6fc0b0055Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7fc0b0055Sopenharmony_ci# 8fc0b0055Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9fc0b0055Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10fc0b0055Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11fc0b0055Sopenharmony_ci# See the License for the specific language governing permissions and 12fc0b0055Sopenharmony_ci# limitations under the License. 13fc0b0055Sopenharmony_ci 14fc0b0055Sopenharmony_ciimport("//build/ohos.gni") 15fc0b0055Sopenharmony_ciimport("../../access_token.gni") 16fc0b0055Sopenharmony_ci 17fc0b0055Sopenharmony_ciohos_executable("atm") { 18fc0b0055Sopenharmony_ci install_enable = true 19fc0b0055Sopenharmony_ci subsystem_name = "security" 20fc0b0055Sopenharmony_ci part_name = "access_token" 21fc0b0055Sopenharmony_ci 22fc0b0055Sopenharmony_ci include_dirs = [ 23fc0b0055Sopenharmony_ci "${access_token_path}/interfaces/inner_api/privacy/include", 24fc0b0055Sopenharmony_ci "include", 25fc0b0055Sopenharmony_ci ] 26fc0b0055Sopenharmony_ci 27fc0b0055Sopenharmony_ci sources = [ 28fc0b0055Sopenharmony_ci "src/atm_command.cpp", 29fc0b0055Sopenharmony_ci "src/main.cpp", 30fc0b0055Sopenharmony_ci "src/to_string.cpp", 31fc0b0055Sopenharmony_ci ] 32fc0b0055Sopenharmony_ci 33fc0b0055Sopenharmony_ci deps = [ 34fc0b0055Sopenharmony_ci "${access_token_path}/frameworks/common:accesstoken_common_cxx", 35fc0b0055Sopenharmony_ci "${access_token_path}/frameworks/inner_api/privacy:libprivacy_sdk", 36fc0b0055Sopenharmony_ci "${access_token_path}/interfaces/innerkits/accesstoken:libaccesstoken_sdk", 37fc0b0055Sopenharmony_ci ] 38fc0b0055Sopenharmony_ci 39fc0b0055Sopenharmony_ci cflags = [] 40fc0b0055Sopenharmony_ci 41fc0b0055Sopenharmony_ci if (build_variant == "user") { 42fc0b0055Sopenharmony_ci cflags_cc = [ "-DATM_BUILD_VARIANT_USER_ENABLE" ] 43fc0b0055Sopenharmony_ci } 44fc0b0055Sopenharmony_ci 45fc0b0055Sopenharmony_ci if (target_cpu == "arm") { 46fc0b0055Sopenharmony_ci cflags += [ "-DBINDER_IPC_32BIT" ] 47fc0b0055Sopenharmony_ci } 48fc0b0055Sopenharmony_ci 49fc0b0055Sopenharmony_ci external_deps = [ 50fc0b0055Sopenharmony_ci "c_utils:utils", 51fc0b0055Sopenharmony_ci "hilog:libhilog", 52fc0b0055Sopenharmony_ci "ipc:ipc_single", 53fc0b0055Sopenharmony_ci ] 54fc0b0055Sopenharmony_ci} 55