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/powermgr/battery_lite/batterymgr.gni") 15import("//build/lite/config/component/lite_component.gni") 16 17local_include_dirs = [] 18local_deps = [] 19local_sources = [] 20 21if (battery_mini_system) { 22 local_include_dirs += [ 23 "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 24 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 25 "//base/powermgr/battery_lite/services/src/small:battery_feature_impl", 26 ] 27 local_deps += 28 [ "//base/powermgr/battery_lite/services/src/mini:battery_feature_impl" ] 29} else { 30 local_include_dirs += [ "${batterymgr_frameworks_path}/include" ] 31 local_deps += [ 32 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 33 "//base/powermgr/battery_lite/services/src/small:battery_feature_impl", 34 ] 35} 36 37lite_library("batteryservice") { 38 target_type = battery_library_type 39 40 sources = [ 41 "src/battery_device.c", 42 "src/battery_manage_feature.c", 43 "src/battery_manage_service.c", 44 ] 45 sources += local_sources 46 47 include_dirs = [ 48 "include", 49 "${batterymgr_kits_path}", 50 "${batterymgr_frameworks_path}/include", 51 "${batterymgr_frameworks_path}/include/${battery_system_type}", 52 "${batterymgr_services_path}/include", 53 "${batterymgr_services_path}/include/${battery_system_type}", 54 "//commonlibrary/utils_lite/include", 55 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 56 "//foundation/communication/ipc/interfaces/innerkits/c/ipc/include", 57 ] 58 include_dirs += local_include_dirs 59 60 deps = [ 61 "${batterymgr_utils_path}:powermgr_utils", 62 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 63 "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 64 ] 65 deps += local_deps 66} 67