# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//build/ohos.gni") import("../../updateengine.gni") import("../ab_update/ab_update.gni") ohos_prebuilt_etc("updater_sa.rc") { if (use_musl) { source = "etc/updater_sa.cfg" } else { source = "etc/updater_sa.rc" } relative_install_dir = "init" part_name = "$updateengine_part_name" } ohos_shared_library("$updateengine_library_name") { defines = [ "DUAL_ADAPTER", "UPDATE_SERVICE", ] sources = [ "$updateengine_root_path/services/callback/src/update_callback.cpp", "$updateengine_root_path/services/callback/src/update_callback_proxy.cpp", "$updateengine_root_path/services/callback/src/update_callback_stub.cpp", "$updateengine_root_path/services/engine/src/progress_thread.cpp", "$updateengine_root_path/services/engine/src/update_helper.cpp", "$updateengine_root_path/services/engine/src/update_service.cpp", "$updateengine_root_path/services/engine/src/update_service_stub.cpp", ] sources += ab_update_src include_dirs = [ "$updateengine_root_path/interfaces/inner_api/include", "$updateengine_root_path/services/callback/include", "$updateengine_root_path/services/engine/include", "//base/update/updater/interfaces/kits/include", "//foundation/systemabilitymgr/safwk/services/safwk/include", "//third_party/bounds_checking_function/include", "//third_party/cJSON", "//third_party/curl/include", "//third_party/openssl/include", "//utils/system/safwk/native/include", ] include_dirs += ab_update_include deps = [ "//base/update/updater/interfaces/kits/packages:libpackageExt", # "package/package.h" "//base/update/updater/interfaces/kits/updaterkits:libupdaterkits", # "updaterkits/updaterkits.h" "//third_party/bounds_checking_function:libsec_shared", "//third_party/cJSON:cjson", "//third_party/curl:curl_shared", "//third_party/openssl:libcrypto_shared", "//third_party/openssl:libssl_shared", ] deps += ab_update_internal_deps external_deps = [ "access_token:libaccesstoken_sdk", "c_utils:utils", # sptr "hisysevent_native:libhisysevent", "hiviewdfx_hilog_native:libhilog", "init:libbegetutil", "ipc:ipc_core", "safwk:system_ability_fwk", ] part_name = "$updateengine_part_name" cflags = [ "-fPIC", "-Os", "-Werror", ] }