1cb69b360Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 2cb69b360Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 3cb69b360Sopenharmony_ci# you may not use this file except in compliance with the License. 4cb69b360Sopenharmony_ci# You may obtain a copy of the License at 5cb69b360Sopenharmony_ci# 6cb69b360Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 7cb69b360Sopenharmony_ci# 8cb69b360Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 9cb69b360Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 10cb69b360Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11cb69b360Sopenharmony_ci# See the License for the specific language governing permissions and 12cb69b360Sopenharmony_ci# limitations under the License. 13cb69b360Sopenharmony_ci 14cb69b360Sopenharmony_ciimport("//base/powermgr/powermgr_lite/powermgr.gni") 15cb69b360Sopenharmony_ciimport("//build/lite/config/component/lite_component.gni") 16cb69b360Sopenharmony_ci 17cb69b360Sopenharmony_ciconfig("powermgr_utils_public_config") { 18cb69b360Sopenharmony_ci include_dirs = [ "include" ] 19cb69b360Sopenharmony_ci} 20cb69b360Sopenharmony_ci 21cb69b360Sopenharmony_ciutils_sources = [ 22cb69b360Sopenharmony_ci "src/power_mgr_time_util.c", 23cb69b360Sopenharmony_ci "src/power_mgr_timer_util.c", 24cb69b360Sopenharmony_ci] 25cb69b360Sopenharmony_ci 26cb69b360Sopenharmony_ciif (is_liteos_m) { 27cb69b360Sopenharmony_ci static_library("powermgr_utils") { 28cb69b360Sopenharmony_ci sources = utils_sources 29cb69b360Sopenharmony_ci 30cb69b360Sopenharmony_ci public_configs = [ ":powermgr_utils_public_config" ] 31cb69b360Sopenharmony_ci 32cb69b360Sopenharmony_ci include_dirs = [ 33cb69b360Sopenharmony_ci "${powermgr_frameworks_path}/include", 34cb69b360Sopenharmony_ci "//base/hiviewdfx/hilog_lite/interfaces/native/kits/hilog_lite", 35cb69b360Sopenharmony_ci ] 36cb69b360Sopenharmony_ci 37cb69b360Sopenharmony_ci deps = [ 38cb69b360Sopenharmony_ci "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 39cb69b360Sopenharmony_ci "//kernel/liteos_m/kernel:kernel", 40cb69b360Sopenharmony_ci ] 41cb69b360Sopenharmony_ci } 42cb69b360Sopenharmony_ci} else { 43cb69b360Sopenharmony_ci source_set("powermgr_utils") { 44cb69b360Sopenharmony_ci cflags = [ "-fPIC" ] 45cb69b360Sopenharmony_ci cflags_cc = cflags 46cb69b360Sopenharmony_ci 47cb69b360Sopenharmony_ci sources = utils_sources 48cb69b360Sopenharmony_ci 49cb69b360Sopenharmony_ci public_configs = [ ":powermgr_utils_public_config" ] 50cb69b360Sopenharmony_ci include_dirs = [ "${powermgr_frameworks_path}/include" ] 51cb69b360Sopenharmony_ci 52cb69b360Sopenharmony_ci deps = [ "//foundation/systemabilitymgr/samgr_lite/samgr:samgr" ] 53cb69b360Sopenharmony_ci } 54cb69b360Sopenharmony_ci} 55