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