1# Copyright (c) 2023 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/sys_installer/sys_installer_default_cfg.gni") 15import("//build/ohos.gni") 16 17sys_installer_path = rebase_path("${sys_installer_absolutely_path}", ".") 18 19config("module_update_exported_header") { 20 visibility = [ ":*" ] 21 include_dirs = [ "${sys_installer_path}/services/module_update/include" ] 22} 23 24check_module_update_gen("check_module_update") { 25 include_dirs = [ "./include" ] 26 27 deps = [ "${sys_installer_path}/services/module_update/src:check_module_update_static" ] 28 output_name = "check_module_update_init" 29 external_deps = [ 30 "bounds_checking_function:libsec_shared", 31 "updater:libupdaterlog_shared", 32 ] 33 if (ohos_indep_compiler_enable) { 34 external_deps += [ "init:libbegetutil", ] 35 } 36 37 part_name = "sys_installer" 38 subsystem_name = "updater" 39} 40 41ohos_static_library("check_module_update_static") { 42 sources = [ "${sys_installer_path}/services/module_update/src/main.cpp" ] 43 44 include_dirs = [ "./include" ] 45 46 deps = [ 47 "${sys_installer_path}/services/module_update/src:module_update_static", 48 ] 49 50 public_configs = [ ":module_update_exported_header" ] 51 52 external_deps = [ 53 "bounds_checking_function:libsec_shared", 54 "c_utils:utils", 55 "ipc:ipc_single", 56 "updater:libupdaterlog_shared", 57 ] 58 59 part_name = "sys_installer" 60 subsystem_name = "updater" 61} 62 63ohos_static_library("module_update_static") { 64 sources = [ 65 "${sys_installer_path}/services/module_update/src/module_dm.cpp", 66 "${sys_installer_path}/services/module_update/src/module_file_repository.cpp", 67 "${sys_installer_path}/services/module_update/src/module_loop.cpp", 68 "${sys_installer_path}/services/module_update/src/module_update.cpp", 69 "${sys_installer_path}/services/module_update/src/module_update_task.cpp", 70 ] 71 72 public_configs = [ ":module_update_exported_header" ] 73 74 public_deps = 75 [ "${sys_installer_path}/services/module_update:module_update_utils" ] 76 77 external_deps = [ 78 "bounds_checking_function:libsec_shared", 79 "c_utils:utils", 80 "ipc:ipc_single", 81 "updater:libupdaterlog_shared", 82 ] 83 84 if (defined(global_parts_info.startup_hvb)) { 85 defines = [ "SUPPORT_HVB" ] 86 87 external_deps += [ 88 "hilog:libhilog", 89 "hvb:libhvb_static", 90 "init:libfsmanager_static_real", 91 ] 92 } 93 part_name = "sys_installer" 94 subsystem_name = "updater" 95} 96