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. 13import("//build/lite/config/component/lite_component.gni") 14import("//build/lite/config/subsystem/aafwk/config.gni") 15 16lite_component("appspawn_lite") { 17 features = [ ":appspawn" ] 18} 19 20# feature: appspawn 21executable("appspawn") { 22 sources = [ 23 "../common/appspawn_server.c", 24 "../common/appspawn_trace.cpp", 25 "appspawn_message.c", 26 "appspawn_process.c", 27 "appspawn_service.c", 28 "main.c", 29 ] 30 31 ldflags = [ 32 "-lstdc++", 33 "-ldl", 34 ] 35 36 cflags = [ 37 "-Wall", 38 "-Wno-format", 39 "-Wno-format-extra-args", 40 ] 41 42 defines = [ 43 "_GNU_SOURCE", 44 "OHOS_LITE", 45 ] 46 47 include_dirs = [ 48 ".", 49 "../common", 50 "//base/startup/appspawn/interfaces/innerkits/include", 51 "//base/startup/appspawn/util/include", 52 "//base/startup/init/interfaces/innerkits/include", 53 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/samgr", 54 "//foundation/systemabilitymgr/samgr_lite/interfaces/kits/registry", 55 "${aafwk_lite_path}/interfaces/inner_api/abilitymgr_lite", 56 "//third_party/bounds_checking_function/include/", 57 "//third_party/cJSON", 58 "//commonlibrary/utils_lite/include", 59 ] 60 61 deps = [ 62 "${aafwk_lite_path}/frameworks/ability_lite:aafwk_abilitykit_lite", 63 "//base/startup/init/interfaces/innerkits:libbegetutil", 64 "//build/lite/config/component/cJSON:cjson_shared", 65 "//foundation/communication/ipc/interfaces/innerkits/c/ipc:ipc_single", 66 "//foundation/distributeddatamgr/kv_store/interfaces/inner_api/kv_store:kv_store", 67 "//foundation/systemabilitymgr/samgr_lite/samgr:samgr", 68 "//third_party/bounds_checking_function:libsec_shared", 69 ] 70 71 if (enable_ohos_appexecfwk_feature_ability == true) { 72 deps += [ 73 "//foundation/arkui/ace_engine_lite/frameworks:ace_lite", 74 "//foundation/arkui/ui_lite:ui_lite", 75 "//foundation/graphic/graphic_utils_lite:utils_lite", 76 "//foundation/graphic/surface_lite:surface_lite", 77 ] 78 } 79 80 if (ohos_kernel_type == "liteos_a") { 81 deps += [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared" ] 82 } 83 84 if (ohos_kernel_type == "linux") { 85 defines += [ "__LINUX__" ] 86 } 87} 88 89if (ohos_build_type == "debug") { 90 group("unittest") { 91 deps = 92 [ "//base/startup/appspawn/test/unittest/app_spawn_lite_test:unittest" ] 93 } 94} 95