1# Copyright (c) 2022-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("//build/ohos_var.gni") 16import("../../distributedaudio.gni") 17 18config("daudio_common_pub_config") { 19 include_dirs = [ 20 "audiodata/include", 21 "audioeventcallback", 22 "audioparam", 23 "${common_path}/dfxutils/include", 24 "${common_path}/include", 25 ] 26} 27 28config("daudio_common_private_config") { 29 include_dirs = [ 30 "${common_path}/include", 31 "${common_path}/dfx_utils/include", 32 ] 33} 34 35ohos_shared_library("distributed_audio_utils") { 36 branch_protector_ret = "pac_ret" 37 sanitize = { 38 boundary_sanitize = true 39 cfi = true 40 cfi_cross_dso = true 41 debug = false 42 integer_overflow = true 43 ubsan = true 44 } 45 stack_protector_ret = true 46 configs = [ ":daudio_common_private_config" ] 47 48 public_configs = [ ":daudio_common_pub_config" ] 49 50 sources = [ 51 "${common_path}/dfx_utils/src/daudio_hisysevent.cpp", 52 "${common_path}/dfx_utils/src/daudio_hitrace.cpp", 53 "${common_path}/src/daudio_latency_test.cpp", 54 "${common_path}/src/daudio_util.cpp", 55 "audiodata/src/audio_data.cpp", 56 ] 57 58 external_deps = [ 59 "cJSON:cjson", 60 "c_utils:utils", 61 "distributed_hardware_fwk:distributedhardwareutils", 62 "dsoftbus:softbus_client", 63 "hilog:libhilog", 64 "hisysevent:libhisysevent", 65 "hitrace:hitrace_meter", 66 "init:libbegetutil", 67 ] 68 69 defines = [ 70 "HI_LOG_ENABLE", 71 "LOG_DOMAIN=0xD004130", 72 ] 73 74 subsystem_name = "distributedhardware" 75 76 part_name = "distributed_audio" 77} 78