• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//base/update/updateservice/updateengine.gni")
15import("//build/ohos.gni")
16import("$updateengine_root_path/services/core/ability/log/log.gni")
17
18ohos_prebuilt_etc("updater_sa.rc") {
19  source = "etc/updater_sa.rc"
20  relative_install_dir = "init"
21  part_name = "$updateengine_part_name"
22  subsystem_name = "updater"
23}
24
25config("updateengine_inner_library_native_config") {
26  include_dirs = [
27    "$updateengine_root_path/interfaces/inner_api/include",
28    "$updateengine_root_path/interfaces/inner_api/common/include",
29    "$updateengine_root_path/services/core/ability/define/include",
30    "$updateengine_root_path/services/core/ability/log/include",
31    "$updateengine_root_path/services/core/ability/utils/include",
32
33    "//third_party/json/include",
34  ]
35}
36
37ohos_shared_library("$updateengine_inner_library_name") {
38  sanitize = {
39    cfi = true
40    cfi_cross_dso = true
41    debug = false
42  }
43  branch_protector_ret = "pac_ret"
44
45  defines = [ "DUAL_ADAPTER" ]
46  if (!ability_ability_runtime_enable) {
47    defines += [ "ABILITY_RUNTIME_INNER_ENABLE" ]
48  }
49  sources = [
50    "$updateengine_root_path/interfaces/inner_api/common/src/load_sa_service.cpp",
51    "$updateengine_root_path/interfaces/inner_api/engine/update_service_kits_impl.cpp",
52    "$updateengine_root_path/interfaces/inner_api/engine/update_service_proxy.cpp",
53    "$updateengine_root_path/services/callback/src/update_callback.cpp",
54    "$updateengine_root_path/services/callback/src/update_callback_stub.cpp",
55    "$updateengine_root_path/services/core/ability/log/src/update_log.cpp",
56    "$updateengine_root_path/services/engine/src/message_parcel_helper.cpp",
57    "$updateengine_root_path/services/engine/src/update_helper.cpp",
58  ]
59
60  include_dirs = [
61    "$updateengine_root_path/interfaces/inner_api/common/include",
62    "$updateengine_root_path/interfaces/inner_api/include",
63    "$updateengine_root_path/services/callback/include",
64    "$updateengine_root_path/services/engine/include",
65
66    "$updateengine_root_path/services/core/ability/define/include",
67    "$updateengine_root_path/services/core/ability/utils/include",
68
69    "//third_party/json/include",
70    "//third_party/bounds_checking_function/include",  # secure method
71  ]
72
73  public_configs = [ ":updateengine_inner_library_native_config" ]
74
75  deps = [
76    "$updateengine_root_path/interfaces/inner_api/modulemgr:update_module_mgr",
77    "//third_party/bounds_checking_function:libsec_static",
78    "//third_party/json:nlohmann_json_static",
79  ]
80
81  external_deps = [
82    "c_utils:utils",  # sptr
83    "hilog:libhilog",
84    "ipc:ipc_core",
85    "safwk:system_ability_fwk",
86    "samgr:samgr_proxy",
87  ]
88
89  if (ability_ability_runtime_enable) {
90    external_deps += [ "ability_runtime:ability_manager" ]
91  }
92  part_name = "$updateengine_part_name"
93  subsystem_name = "updater"
94}
95