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("//build/ohos.gni") 15import("./../uhdf.gni") 16 17hdf_framework_path = "./../../../framework" 18hdf_interfaces_path = "./../../../interfaces" 19 20config("lib_utils_pub_config") { 21 visibility = [ ":*" ] 22 23 include_dirs = [ 24 "$hdf_interfaces_path/inner_api/osal/shared", 25 "$hdf_interfaces_path/inner_api/osal/uhdf", 26 "$hdf_interfaces_path/inner_api/utils", 27 "$hdf_interfaces_path/inner_api/core", 28 ] 29} 30if (defined(ohos_lite)) { 31 group("libpub_utils") { 32 deps = [] 33 } 34} else { 35 ohos_shared_library("libpub_utils") { 36 branch_protector_ret = "pac_ret" 37 include_dirs = [ 38 "$hdf_framework_path/utils/include", 39 "$hdf_uhdf_path/utils/include", 40 ] 41 public_configs = [ ":lib_utils_pub_config" ] 42 sources = [ 43 "$hdf_framework_path/support/posix/src/osal_mem.c", 44 "$hdf_framework_path/support/posix/src/osal_time.c", 45 "$hdf_framework_path/utils/src/hdf_cstring.c", 46 "$hdf_framework_path/utils/src/hdf_sbuf.c", 47 "$hdf_framework_path/utils/src/hdf_sbuf_impl_raw.c", 48 "$hdf_uhdf_path/utils/src/hdf_xcollie.cpp", 49 ] 50 51 external_deps = [ 52 "c_utils:utils", 53 "hilog:libhilog", 54 ] 55 defines = [] 56 if (hicollie_enabled) { 57 public_external_deps = [ "hicollie:libhicollie" ] 58 defines += [ "HDFHICOLLIE_ENABLE" ] 59 } 60 61 install_images = [ 62 system_base_dir, 63 "updater", 64 ] 65 innerapi_tags = [ 66 "chipsetsdk", 67 "platformsdk_indirect", 68 ] 69 70 subsystem_name = "hdf" 71 part_name = "hdf_core" 72 } 73} 74