131c75014Sopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 231c75014Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 331c75014Sopenharmony_ci# you may not use this file except in compliance with the License. 431c75014Sopenharmony_ci# You may obtain a copy of the License at 531c75014Sopenharmony_ci# 631c75014Sopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 731c75014Sopenharmony_ci# 831c75014Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software 931c75014Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 1031c75014Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1131c75014Sopenharmony_ci# See the License for the specific language governing permissions and 1231c75014Sopenharmony_ci# limitations under the License. 1331c75014Sopenharmony_ci 1431c75014Sopenharmony_ciif (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { 1531c75014Sopenharmony_ci executable("checksum") { 1631c75014Sopenharmony_ci sources = [ "src/main.c" ] 1731c75014Sopenharmony_ci 1831c75014Sopenharmony_ci deps = [ 1931c75014Sopenharmony_ci ":checksum_static", 2031c75014Sopenharmony_ci "//third_party/bounds_checking_function:libsec_shared", 2131c75014Sopenharmony_ci ] 2231c75014Sopenharmony_ci } 2331c75014Sopenharmony_ci 2431c75014Sopenharmony_ci static_library("checksum_static") { 2531c75014Sopenharmony_ci sources = [ 2631c75014Sopenharmony_ci "src/checksum_file.c", 2731c75014Sopenharmony_ci "src/checksum_sha256.c", 2831c75014Sopenharmony_ci ] 2931c75014Sopenharmony_ci 3031c75014Sopenharmony_ci include_dirs = [ 3131c75014Sopenharmony_ci "include", 3231c75014Sopenharmony_ci "//third_party/bounds_checking_function/include", 3331c75014Sopenharmony_ci ] 3431c75014Sopenharmony_ci 3531c75014Sopenharmony_ci public = [ 3631c75014Sopenharmony_ci "include/checksum_file.h", 3731c75014Sopenharmony_ci "include/checksum_sha256.h", 3831c75014Sopenharmony_ci ] 3931c75014Sopenharmony_ci 4031c75014Sopenharmony_ci cflags = [ "-Wno-error" ] 4131c75014Sopenharmony_ci } 4231c75014Sopenharmony_ci} 43