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