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 14if (ohos_kernel_type == "liteos_m") { 15 static_library("hota") { 16 sources = [ 17 "//base/update/ota_lite/frameworks/source/updater/hota_updater.c", 18 "//base/update/ota_lite/frameworks/source/verify/app_rsa.c", 19 "//base/update/ota_lite/frameworks/source/verify/app_sha256.c", 20 "//base/update/ota_lite/frameworks/source/verify/hota_verify.c", 21 ] 22 include_dirs = [ 23 "//base/update/ota_lite/interfaces/kits", 24 "//base/update/ota_lite/hals", 25 "//base/update/ota_lite/frameworks/test/dload", 26 "//base/update/ota_lite/frameworks/source/verify", 27 "//utils/native/lite/include", 28 "//kernel/liteos_m/kal/cmsis", 29 "//base/startup/syspara_lite/interfaces/kits", 30 "//third_party/bounds_checking_function/include", 31 "$ohos_third_party_dir/mbedtls/include", 32 "$ohos_third_party_dir/lwip_sack/include", 33 ] 34 cflags = [ "-Wno-unused-variable" ] 35 deps = [ "//base/startup/syspara_lite/frameworks/parameter/src:sysparam" ] 36 deps += [ "$ohos_board_adapter_dir/hals/update:hal_update_static" ] 37 } 38} else { 39 shared_library("hota") { 40 sources = [ 41 "//base/update/ota_lite/frameworks/source/updater/hota_updater.c", 42 "//base/update/ota_lite/frameworks/source/verify/app_rsa.c", 43 "//base/update/ota_lite/frameworks/source/verify/app_sha256.c", 44 "//base/update/ota_lite/frameworks/source/verify/hota_verify.c", 45 ] 46 include_dirs = [ 47 "//base/update/ota_lite/interfaces/kits", 48 "//base/update/ota_lite/hals", 49 "//base/update/ota_lite/frameworks/test/dload", 50 "//base/update/ota_lite/frameworks/source/verify", 51 "//utils/native/lite/include", 52 "//kernel/liteos_m/kal/cmsis", 53 "//base/startup/syspara_lite/interfaces/kits", 54 "//third_party/bounds_checking_function/include", 55 "$ohos_third_party_dir/mbedtls/include", 56 "$ohos_third_party_dir/lwip_sack/include", 57 ] 58 cflags = [ 59 "-Wno-unused-variable", 60 "-DDYNAMIC_LOAD_HAL", 61 ] 62 deps = [ "//base/startup/syspara_lite/frameworks/parameter/src:sysparam" ] 63 ldflags = [ "-lhal_update" ] 64 deps += [ "$ohos_board_adapter_dir/update:hal_update" ] 65 } 66} 67