• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 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("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
16import("//drivers/peripheral/audio/audio.gni")
17
18if (defined(ohos_lite)) {
19  ohos_shared_library("hdi_audio_path_select") {
20    sources = [
21      "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_common.c",
22      "//third_party/cJSON/cJSON.c",
23      "src/audio_pathselect.c",
24    ]
25
26    include_dirs = [
27      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
28      "//drivers/peripheral/audio/hal/pathselect/include",
29      "//third_party/cJSON",
30      "//drivers/peripheral/audio/interfaces/include",
31      "//third_party/bounds_checking_function/include",
32    ]
33
34    deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
35    external_deps = [ "hdf_core:libhdf_utils" ]
36    if (enable_audio_hal_hdf_log) {
37      defines = [ "AUDIO_HDF_LOG" ]
38    }
39
40    subsystem_name = "hdf"
41    part_name = "drivers_peripheral_audio"
42  }
43} else {
44  ohos_shared_library("hdi_audio_path_select") {
45    sources = [
46      "//drivers/peripheral/audio/hal/hdi_passthrough/src/audio_common.c",
47      "//third_party/cJSON/cJSON.c",
48      "src/audio_pathselect.c",
49    ]
50
51    include_dirs = [
52      "//drivers/peripheral/audio/hal/hdi_passthrough/include",
53      "//drivers/peripheral/audio/hal/pathselect/include",
54      "//third_party/cJSON",
55      "//drivers/peripheral/audio/interfaces/include",
56      "//third_party/bounds_checking_function/include",
57    ]
58
59    defines = []
60    if (enable_audio_hal_hdf_log) {
61      defines += [ "AUDIO_HDF_LOG" ]
62    }
63
64    if (is_standard_system) {
65      external_deps = [
66        "c_utils:utils",
67        "hdf_core:libhdf_utils",
68        "hiviewdfx_hilog_native:libhilog",
69      ]
70    } else {
71      external_deps = [ "hilog:libhilog" ]
72    }
73
74    install_images = [ chipset_base_dir ]
75    subsystem_name = "hdf"
76    part_name = "drivers_peripheral_audio"
77  }
78}
79