• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021-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
14import("//build/ohos.gni")
15
16config("pulse_config") {
17  visibility = [ ":*" ]
18
19  include_dirs = [
20    "../../../include",
21    "../../../src/pulse",
22    "../../../src",
23    "../../../",
24    "../../src",
25    "../../include",
26  ]
27
28  cflags = [
29    "-Wall",
30    "-Werror",
31    "-Wno-implicit-function-declaration",
32    "-Wno-sign-compare",
33    "-Wno-unused-function",
34    "-DHAVE_CONFIG_H",
35    "-D_GNU_SOURCE",
36  ]
37}
38
39config("pulse_include_config") {
40  visibility = [ ":*" ]
41  include_dirs = [
42    "../../../include",
43    "../../../src",
44  ]
45}
46
47ohos_source_set("pulse_sources") {
48  sources = [
49    "../../../src/pulse/channelmap.c",
50    "../../../src/pulse/context.c",
51    "../../../src/pulse/direction.c",
52    "../../../src/pulse/error.c",
53    "../../../src/pulse/ext-device-manager.c",
54    "../../../src/pulse/ext-device-restore.c",
55    "../../../src/pulse/ext-stream-restore.c",
56    "../../../src/pulse/format.c",
57    "../../../src/pulse/internal.h",
58    "../../../src/pulse/introspect.c",
59    "../../../src/pulse/mainloop-api.c",
60    "../../../src/pulse/mainloop-signal.c",
61    "../../../src/pulse/mainloop.c",
62    "../../../src/pulse/ohos_pa_volume.c",
63    "../../../src/pulse/operation.c",
64    "../../../src/pulse/proplist.c",
65    "../../../src/pulse/rtclock.c",
66    "../../../src/pulse/sample.c",
67    "../../../src/pulse/scache.c",
68    "../../../src/pulse/stream.c",
69    "../../../src/pulse/subscribe.c",
70    "../../../src/pulse/thread-mainloop.c",
71    "../../../src/pulse/timeval.c",
72    "../../../src/pulse/utf8.c",
73    "../../../src/pulse/util.c",
74    "../../../src/pulse/xmalloc.c",
75  ]
76
77  configs = [ ":pulse_config" ]
78
79  external_deps = [ "hilog:libhilog" ]
80
81  subsystem_name = "thirdparty"
82  part_name = "pulseaudio"
83}
84
85ohos_shared_library("pulse") {
86  branch_protector_ret = "pac_ret"
87  deps = [
88    ":pulse_sources",
89    "../../src:pulsecommon",
90  ]
91
92  public_configs = [ ":pulse_include_config" ]
93
94  external_deps = [ "hilog:libhilog" ]
95
96  defines = []
97  if (defined(global_parts_info) &&
98      defined(global_parts_info.hiviewdfx_hitrace)) {
99    defines += [ "FEATURE_HITRACE_METER" ]
100    external_deps += [ "hitrace:hitrace_meter" ]
101  }
102
103  subsystem_name = "thirdparty"
104  innerapi_tags = [ "platformsdk_indirect" ]
105  part_name = "pulseaudio"
106}
107
108ohos_shared_library("pulse-simple") {
109  sources = [ "../../../src/pulse/simple.c" ]
110
111  configs = [ ":pulse_config" ]
112
113  deps = [
114    "../../src:pulsecommon",
115    "../../src/pulse:pulse",
116  ]
117
118  subsystem_name = "thirdparty"
119  part_name = "pulseaudio"
120}
121