1# Copyright (c) 2020-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("//build/ohos.gni") 15 16inner_api_relative_path = "./../../../interfaces/inner_api" 17 18config("hdf_osal_pub_config") { 19 visibility = [ ":*" ] 20 21 include_dirs = [ 22 "$inner_api_relative_path/osal/shared", 23 "$inner_api_relative_path/osal/uhdf", 24 "$inner_api_relative_path/utils", 25 ] 26} 27if (defined(ohos_lite)) { 28 ohos_shared_library("hdf_posix_osal") { 29 framework_core_relative_path = "./../../../framework/support/posix/src" 30 output_extension = "z.so" 31 32 public_configs = [ ":hdf_osal_pub_config" ] 33 34 sources = [ 35 "$framework_core_relative_path/osal_mem.c", 36 "$framework_core_relative_path/osal_mutex.c", 37 "$framework_core_relative_path/osal_sem.c", 38 "$framework_core_relative_path/osal_spinlock.c", 39 "$framework_core_relative_path/osal_thread.c", 40 "$framework_core_relative_path/osal_time.c", 41 ] 42 43 deps = [ 44 "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", 45 "//third_party/bounds_checking_function:libsec_shared", 46 ] 47 48 defines = [ "__USER__" ] 49 ldflags = [ "-lpthread" ] 50 51 # install_images = [ chipset_base_dir ] 52 subsystem_name = "hdf" 53 part_name = "hdf_core" 54 } 55} else { 56 group("hdf_posix_osal") { 57 deps = [] 58 } 59} 60