• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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}/dfx_utils/src/daudio_radar.cpp",
54    "${common_path}/src/daudio_latency_test.cpp",
55    "${common_path}/src/daudio_ringbuffer.cpp",
56    "${common_path}/src/daudio_util.cpp",
57    "audiodata/src/audio_data.cpp",
58  ]
59
60  ldflags = [
61    "-fpie",
62    "-Wl,-z,relro",
63    "-Wl,-z,now",
64  ]
65
66  external_deps = [
67    "cJSON:cjson",
68    "c_utils:utils",
69    "distributed_hardware_fwk:distributedhardwareutils",
70    "dsoftbus:softbus_client",
71    "hilog:libhilog",
72    "hisysevent:libhisysevent",
73    "hitrace:hitrace_meter",
74    "init:libbegetutil",
75  ]
76
77  defines = [
78    "HI_LOG_ENABLE",
79    "LOG_DOMAIN=0xD004130",
80  ]
81
82  subsystem_name = "distributedhardware"
83
84  part_name = "distributed_audio"
85}
86