1# Copyright (c) 2022 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
14hdf_audio_path = "./../.."
15hdf_hdi_service_path = "./.."
16import("//build/ohos.gni")
17import("$hdf_audio_path/audio.gni")
18
19ohos_shared_library("audio_path_select") {
20  sources = [
21    "$hdf_audio_path/hal/pathselect/src/audio_pathselect.c",
22    "$hdf_hdi_service_path/primary_impl/src/audio_common.c",
23  ]
24
25  include_dirs = [
26    "$hdf_hdi_service_path/primary_impl/include",
27    "$hdf_audio_path/hal/pathselect/include",
28    "$hdf_hdi_service_path/vendor_interface/utils",
29  ]
30
31  defines = [ "IDL_MODE" ]
32  if (enable_audio_hal_hdf_log) {
33    defines += [ "AUDIO_HDF_LOG" ]
34  }
35  if (drivers_peripheral_audio_feature_alsa_lib) {
36    defines += [ "ALSA_LIB_MODE" ]
37  }
38  if (is_standard_system) {
39    external_deps = [
40      "drivers_interface_audio:libaudio_proxy_4.0",
41      "hdf_core:libhdf_utils",
42      "hilog:libhilog",
43    ]
44    if (enable_c_utils) {
45      external_deps += [ "c_utils:utils" ]
46    }
47  } else if (defined(ohos_lite)) {
48    external_deps = [ "hilog_lite:hilog_shared" ]
49  } else {
50    external_deps = [ "hilog:libhilog" ]
51  }
52  external_deps += [
53    "bounds_checking_function:libsec_shared",
54    "cJSON:cjson",
55  ]
56
57  install_images = [ chipset_base_dir ]
58  subsystem_name = "hdf"
59  part_name = "drivers_peripheral_audio"
60}
61