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("../../../../config.gni")
16
17ohos_shared_library("audio_device_manager") {
18  branch_protector_ret = "pac_ret"
19  sanitize = {
20    cfi = true
21    cfi_cross_dso = true
22    cfi_vcall_icall_only = true
23    debug = false
24  }
25  install_enable = true
26
27  cflags = [ "-fPIC" ]
28  cflags += [ "-Wall" ]
29  cflags_cc = cflags
30
31  include_dirs = [
32    "include",
33    "interface",
34    "../../audioutils/include",
35    "../../../../interfaces/inner_api/native/audiocommon/include",
36  ]
37
38  sources = [
39    "src/audio_device_adapter_impl.cpp",
40    "src/audio_device_manager_impl.cpp",
41  ]
42
43  deps = [ "../../audioutils:audio_utils" ]
44
45  external_deps = [
46    "bounds_checking_function:libsec_shared",
47    "c_utils:utils",
48    "drivers_interface_distributed_audio:libdaudio_proxy_1.0",
49    "hilog:libhilog",
50  ]
51
52  defines = []
53  if (audio_framework_feature_daudio_enable) {
54    defines += [ "FEATURE_DISTRIBUTE_AUDIO" ]
55  }
56
57  part_name = "audio_framework"
58  subsystem_name = "multimedia"
59}
60