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("//base/powermgr/battery_statistics/batterystats.gni") 15import("//build/ohos.gni") 16 17ohos_executable("statistics") { 18 include_dirs = [ 19 "include", 20 "//foundation/aafwk/standard/tools/aa/include", 21 "${batterystats_interfaces_path}/include", 22 ] 23 24 sources = [ 25 "//foundation/aafwk/standard/tools/aa/src/shell_command.cpp", 26 "src/main.cpp", 27 "src/statistics_shell_command.cpp", 28 ] 29 30 deps = [ 31 "${batterystats_interfaces_path}/innerkits:batterystats_client", 32 "//base/powermgr/battery_statistics/services:batterystats_service", 33 "//utils/native/base:utils", 34 ] 35 36 cflags = [] 37 if (target_cpu == "arm") { 38 cflags += [ "-DBINDER_IPC_32BIT" ] 39 } 40 41 configs = [ 42 "//foundation/aafwk/standard/tools/aa:ability_command_config", 43 "//foundation/aafwk/standard/services/common:common_config", 44 "${batterystats_utils_path}:batterystats_utils_config", 45 ] 46 47 external_deps = [ 48 "ability_base:base", 49 "ability_base:want", 50 "bundle_framework:appexecfwk_base", 51 "bundle_framework:appexecfwk_core", 52 "ces_standard:cesfwk_innerkits", 53 "eventhandler:libeventhandler", 54 "hiviewdfx_hilog_native:libhilog", 55 "ipc:ipc_core", 56 "safwk:system_ability_fwk", 57 "samgr_standard:samgr_proxy", 58 ] 59 60 part_name = "battery_statistics_native" 61} 62