• 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
16pulseaudio_dir = "//third_party/pulseaudio"
17pulseaudio_build_path = "//third_party/pulseaudio/ohosbuild"
18libsndfile_dir = "//third_party/libsnd"
19libsndfile_build_path = "//third_party/libsnd"
20
21config("pulsecore_config") {
22  visibility = [ ":*" ]
23
24  include_dirs = [
25    "$pulseaudio_dir/include",
26    "$pulseaudio_dir",
27    "$pulseaudio_dir/src",
28    "$pulseaudio_build_path/include",
29    "$pulseaudio_build_path/src",
30    "//third_party/glib/glib",
31    "//third_party/glib",
32    "$libsndfile_dir/include",
33  ]
34
35  cflags = [
36    "-Wall",
37    "-Werror",
38    "-Wno-implicit-function-declaration",
39    "-Wno-unused-function",
40    "-Wno-uninitialized",
41    "-DHAVE_CONFIG_H",
42    "-D_GNU_SOURCE",
43    "-D__INCLUDED_FROM_PULSE_AUDIO",
44  ]
45}
46
47ohos_source_set("pulsecore_sources") {
48  sources = [
49    "$pulseaudio_build_path/src/pulsecore/ltdl_stub.c",
50    "$pulseaudio_dir/src/pulsecore/asyncmsgq.c",
51    "$pulseaudio_dir/src/pulsecore/asyncq.c",
52    "$pulseaudio_dir/src/pulsecore/auth-cookie.c",
53    "$pulseaudio_dir/src/pulsecore/card.c",
54    "$pulseaudio_dir/src/pulsecore/cli-command.c",
55    "$pulseaudio_dir/src/pulsecore/cli-text.c",
56    "$pulseaudio_dir/src/pulsecore/client.c",
57    "$pulseaudio_dir/src/pulsecore/core-scache.c",
58    "$pulseaudio_dir/src/pulsecore/core-subscribe.c",
59    "$pulseaudio_dir/src/pulsecore/core.c",
60    "$pulseaudio_dir/src/pulsecore/cpu-arm.c",
61    "$pulseaudio_dir/src/pulsecore/database-simple.c",
62    "$pulseaudio_dir/src/pulsecore/database.c",
63    "$pulseaudio_dir/src/pulsecore/device-port.c",
64    "$pulseaudio_dir/src/pulsecore/ffmpeg/resample2.c",
65    "$pulseaudio_dir/src/pulsecore/filter/biquad.c",
66    "$pulseaudio_dir/src/pulsecore/filter/crossover.c",
67    "$pulseaudio_dir/src/pulsecore/filter/lfe-filter.c",
68    "$pulseaudio_dir/src/pulsecore/hook-list.c",
69    "$pulseaudio_dir/src/pulsecore/ltdl-helper.c",
70    "$pulseaudio_dir/src/pulsecore/message-handler.c",
71    "$pulseaudio_dir/src/pulsecore/mix.c",
72    "$pulseaudio_dir/src/pulsecore/modargs.c",
73    "$pulseaudio_dir/src/pulsecore/modinfo.c",
74    "$pulseaudio_dir/src/pulsecore/module.c",
75    "$pulseaudio_dir/src/pulsecore/msgobject.c",
76    "$pulseaudio_dir/src/pulsecore/namereg.c",
77    "$pulseaudio_dir/src/pulsecore/object.c",
78    "$pulseaudio_dir/src/pulsecore/play-memblockq.c",
79    "$pulseaudio_dir/src/pulsecore/play-memchunk.c",
80    "$pulseaudio_dir/src/pulsecore/remap.c",
81    "$pulseaudio_dir/src/pulsecore/resampler.c",
82    "$pulseaudio_dir/src/pulsecore/resampler/ffmpeg.c",
83    "$pulseaudio_dir/src/pulsecore/resampler/peaks.c",
84    "$pulseaudio_dir/src/pulsecore/resampler/trivial.c",
85    "$pulseaudio_dir/src/pulsecore/rtpoll.c",
86    "$pulseaudio_dir/src/pulsecore/sconv-s16be.c",
87    "$pulseaudio_dir/src/pulsecore/sconv-s16le.c",
88    "$pulseaudio_dir/src/pulsecore/sconv.c",
89    "$pulseaudio_dir/src/pulsecore/shared.c",
90    "$pulseaudio_dir/src/pulsecore/sink-input.c",
91    "$pulseaudio_dir/src/pulsecore/sink.c",
92    "$pulseaudio_dir/src/pulsecore/sioman.c",
93    "$pulseaudio_dir/src/pulsecore/sound-file-stream.c",
94    "$pulseaudio_dir/src/pulsecore/sound-file.c",
95    "$pulseaudio_dir/src/pulsecore/source-output.c",
96    "$pulseaudio_dir/src/pulsecore/source.c",
97    "$pulseaudio_dir/src/pulsecore/start-child.c",
98    "$pulseaudio_dir/src/pulsecore/stream-util.c",
99    "$pulseaudio_dir/src/pulsecore/svolume_arm.c",
100    "$pulseaudio_dir/src/pulsecore/svolume_c.c",
101    "$pulseaudio_dir/src/pulsecore/svolume_mmx.c",
102    "$pulseaudio_dir/src/pulsecore/svolume_sse.c",
103    "$pulseaudio_dir/src/pulsecore/thread-mq.c",
104  ]
105
106  configs = [ ":pulsecore_config" ]
107
108  subsystem_name = "multimedia"
109  part_name = "multimedia_audio_framework"
110}
111
112ohos_shared_library("pulsecore") {
113  deps = [
114    ":pulsecore_sources",
115    "$libsndfile_build_path:sndfile",
116    "$pulseaudio_build_path/src:pulsecommon",
117  ]
118
119  subsystem_name = "multimedia"
120  part_name = "multimedia_audio_framework"
121}
122
123config("modules_internal_lib_config") {
124  visibility = [ ":*" ]
125
126  include_dirs = [
127    "$pulseaudio_build_path/include",
128    "$pulseaudio_dir/include",
129    "$pulseaudio_dir/src",
130    "$pulseaudio_dir",
131    "$pulseaudio_build_path/src",
132  ]
133
134  cflags = [
135    "-Wall",
136    "-Werror",
137    "-Wno-unused-function",
138    "-DHAVE_CONFIG_H",
139    "-D_GNU_SOURCE",
140    "-D__INCLUDED_FROM_PULSE_AUDIO",
141  ]
142}
143
144ohos_shared_library("cli") {
145  sources = [ "$pulseaudio_dir/src/pulsecore/cli.c" ]
146
147  configs = [ ":modules_internal_lib_config" ]
148
149  deps = [
150    "$pulseaudio_build_path/src:pulsecommon",
151    "$pulseaudio_build_path/src/pulsecore:pulsecore",
152  ]
153
154  subsystem_name = "multimedia"
155  part_name = "multimedia_audio_framework"
156}
157
158ohos_shared_library("protocol-cli") {
159  sources = [ "$pulseaudio_dir/src/pulsecore/protocol-cli.c" ]
160
161  configs = [ ":modules_internal_lib_config" ]
162
163  deps = [
164    "$pulseaudio_build_path/src:pulsecommon",
165    "$pulseaudio_build_path/src/pulsecore:cli",
166    "$pulseaudio_build_path/src/pulsecore:pulsecore",
167  ]
168
169  subsystem_name = "multimedia"
170  part_name = "multimedia_audio_framework"
171}
172
173ohos_shared_library("protocol-native") {
174  sources = [ "$pulseaudio_dir/src/pulsecore/protocol-native.c" ]
175
176  configs = [ ":modules_internal_lib_config" ]
177
178  deps = [
179    "$pulseaudio_build_path/src:pulsecommon",
180    "$pulseaudio_build_path/src/pulsecore:pulsecore",
181  ]
182
183  subsystem_name = "multimedia"
184  part_name = "multimedia_audio_framework"
185}
186