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 safwk_lite_feature_enable_abilityms = true 19 safwk_lite_feature_enable_bundlems = true 20 safwk_lite_feature_enable_dtbschedmgr = true 21} 22 23if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 24 lite_component("safwk_lite") { 25 features = [ ":foundation" ] 26 } 27 28 # feature: foundation 29 executable("foundation") { 30 cflags = [ "-Wall" ] 31 cflags_cc = cflags 32 33 sources = [ "src/main.c" ] 34 35 include_dirs = [ 36 "//commonlibrary/utils_lite/include", 37 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 38 ] 39 40 ldflags = [ 41 "-lstdc++", 42 "-Wl,-Map=foundation.map", 43 ] 44 45 deps = [ 46 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 47 "//base/security/permission_lite/services/ipc_auth:ipc_auth_target", 48 "//base/security/permission_lite/services/pms:pms_target", 49 "//foundation/systemabilitymgr/samgr_lite/samgr_server:server", 50 ] 51 if (enable_timertask == true) { 52 deps += [ "//base/update/dupdate/services/timertask_lite:timertask" ] 53 } 54 if (safwk_lite_feature_enable_abilityms == true) { 55 deps += [ "${aafwk_lite_path}/services/abilitymgr_lite:abilityms" ] 56 } 57 if (safwk_lite_feature_enable_bundlems == true) { 58 deps += [ "${appexecfwk_lite_path}/services/bundlemgr_lite:bundlems" ] 59 } 60 if (board_name != "hispark_aries") { 61 if (safwk_lite_feature_enable_dtbschedmgr == true) { 62 deps += [ "//foundation/ability/dmsfwk_lite:dtbschedmgr" ] 63 } 64 } 65 } 66} 67