1# Copyright (c) 2020 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/lite/config/component/lite_component.gni") 15 16declare_args() { 17 enable_timertask = false 18} 19 20if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 21 lite_component("safwk_lite") { 22 features = [ ":foundation" ] 23 } 24 25 # feature: foundation 26 executable("foundation") { 27 cflags = [ "-Wall" ] 28 cflags_cc = cflags 29 30 sources = [ "src/main.c" ] 31 32 include_dirs = [ 33 "//utils/native/lite/include", 34 "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", 35 ] 36 37 ldflags = [ 38 "-lstdc++", 39 "-Wl,-Map=foundation.map", 40 ] 41 42 deps = [ 43 "//foundation/distributedschedule/samgr_lite/samgr_server:server", 44 "${aafwk_lite_path}/services/abilitymgr_lite:abilityms", 45 "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems", 46 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 47 "//base/powermgr/powermgr_lite:powermgr_lite", 48 "//base/powermgr/battery_lite:batterymgr_lite", 49 "//base/security/permission/services/permission_lite/ipc_auth:ipc_auth_target", 50 "//base/security/permission/services/permission_lite/pms:pms_target", 51 ] 52 if (enable_timertask == true) { 53 deps += [ "//base/update/dupdate/services/timertask_lite:timertask" ] 54 } 55 if (board_name != "hispark_aries") { 56 deps += [ "//foundation/distributedschedule/dmsfwk_lite:dtbschedmgr" ] 57 } 58 } 59} 60