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 ] 26 27 cflags = [ 28 "-Wall", 29 "-Werror", 30 "-Wno-implicit-function-declaration", 31 "-Wno-unused-function", 32 "-Wno-uninitialized", 33 "-DHAVE_CONFIG_H", 34 "-D_GNU_SOURCE", 35 "-D__INCLUDED_FROM_PULSE_AUDIO", 36 ] 37} 38 39ohos_source_set("pulsecore_sources") { 40 sources = [ 41 "../../../src/pulsecore/asyncmsgq.c", 42 "../../../src/pulsecore/asyncq.c", 43 "../../../src/pulsecore/auth-cookie.c", 44 "../../../src/pulsecore/card.c", 45 "../../../src/pulsecore/cli-command.c", 46 "../../../src/pulsecore/cli-text.c", 47 "../../../src/pulsecore/client.c", 48 "../../../src/pulsecore/core-scache.c", 49 "../../../src/pulsecore/core-subscribe.c", 50 "../../../src/pulsecore/core.c", 51 "../../../src/pulsecore/cpu-arm.c", 52 "../../../src/pulsecore/database-simple.c", 53 "../../../src/pulsecore/database.c", 54 "../../../src/pulsecore/device-port.c", 55 "../../../src/pulsecore/downmix.c", 56 "../../../src/pulsecore/ffmpeg/resample2.c", 57 "../../../src/pulsecore/filter/biquad.c", 58 "../../../src/pulsecore/filter/crossover.c", 59 "../../../src/pulsecore/filter/lfe-filter.c", 60 "../../../src/pulsecore/hook-list.c", 61 "../../../src/pulsecore/ltdl-helper.c", 62 "../../../src/pulsecore/message-handler.c", 63 "../../../src/pulsecore/mix.c", 64 "../../../src/pulsecore/modargs.c", 65 "../../../src/pulsecore/modinfo.c", 66 "../../../src/pulsecore/module.c", 67 "../../../src/pulsecore/msgobject.c", 68 "../../../src/pulsecore/namereg.c", 69 "../../../src/pulsecore/object.c", 70 "../../../src/pulsecore/play-memblockq.c", 71 "../../../src/pulsecore/play-memchunk.c", 72 "../../../src/pulsecore/remap.c", 73 "../../../src/pulsecore/resampleLoader.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/source-output.c", 87 "../../../src/pulsecore/source.c", 88 "../../../src/pulsecore/start-child.c", 89 "../../../src/pulsecore/stream-util.c", 90 "../../../src/pulsecore/svolume_arm.c", 91 "../../../src/pulsecore/svolume_c.c", 92 "../../../src/pulsecore/svolume_mmx.c", 93 "../../../src/pulsecore/svolume_sse.c", 94 "../../../src/pulsecore/thread-mq.c", 95 "../../src/pulsecore/ltdl_stub.c", 96 ] 97 98 configs = [ ":pulsecore_config" ] 99 100 external_deps = [ 101 "c_utils:utils", 102 "hilog:libhilog", 103 "init:libbegetutil", 104 ] 105 106 defines = [] 107 if (defined(global_parts_info) && 108 defined(global_parts_info.hiviewdfx_hitrace)) { 109 defines += [ "FEATURE_HITRACE_METER" ] 110 external_deps += [ "hitrace:hitrace_meter" ] 111 } 112 113 subsystem_name = "thirdparty" 114 part_name = "pulseaudio" 115} 116 117config("export_pulsecore_include") { 118 include_dirs = [ 119 "../../../include", 120 "../../../src", 121 "../../include", 122 "../../src", 123 ] 124} 125 126ohos_shared_library("pulsecore") { 127 sanitize = { 128 integer_overflow = true 129 } 130 131 deps = [ 132 ":pulsecore_sources", 133 "../../src:pulsecommon", 134 ] 135 136 public_configs = [ ":export_pulsecore_include" ] 137 138 external_deps = [ 139 "c_utils:utils", 140 "hilog:libhilog", 141 "init:libbegetutil", 142 ] 143 144 defines = [] 145 if (defined(global_parts_info) && 146 defined(global_parts_info.hiviewdfx_hitrace)) { 147 defines += [ "FEATURE_HITRACE_METER" ] 148 external_deps += [ "hitrace:hitrace_meter" ] 149 } 150 151 subsystem_name = "thirdparty" 152 innerapi_tags = [ 153 "chipsetsdk_indirect", 154 "platformsdk_indirect", 155 ] 156 part_name = "pulseaudio" 157} 158 159config("modules_internal_lib_config") { 160 visibility = [ ":*" ] 161 162 include_dirs = [ 163 "../../include", 164 "../../../include", 165 "../../../src", 166 "../../../", 167 "../../src", 168 ] 169 170 cflags = [ 171 "-Wall", 172 "-Werror", 173 "-Wno-unused-function", 174 "-DHAVE_CONFIG_H", 175 "-D_GNU_SOURCE", 176 "-D__INCLUDED_FROM_PULSE_AUDIO", 177 ] 178} 179 180ohos_shared_library("cli") { 181 sources = [ "../../../src/pulsecore/cli.c" ] 182 183 configs = [ ":modules_internal_lib_config" ] 184 185 deps = [ 186 "../../src:pulsecommon", 187 "../../src/pulsecore:pulsecore", 188 ] 189 external_deps = [ "hilog:libhilog" ] 190 subsystem_name = "thirdparty" 191 part_name = "pulseaudio" 192} 193 194ohos_shared_library("protocol-cli") { 195 sources = [ "../../../src/pulsecore/protocol-cli.c" ] 196 197 configs = [ ":modules_internal_lib_config" ] 198 199 deps = [ 200 "../../src:pulsecommon", 201 "../../src/pulsecore:cli", 202 "../../src/pulsecore:pulsecore", 203 ] 204 external_deps = [ "hilog:libhilog" ] 205 subsystem_name = "thirdparty" 206 part_name = "pulseaudio" 207} 208 209ohos_shared_library("protocol-native") { 210 sources = [ "../../../src/pulsecore/protocol-native.c" ] 211 212 configs = [ ":modules_internal_lib_config" ] 213 214 deps = [ 215 "../../src:pulsecommon", 216 "../../src/pulsecore:pulsecore", 217 ] 218 219 external_deps = [ "hilog:libhilog" ] 220 221 defines = [] 222 if (defined(global_parts_info) && 223 defined(global_parts_info.hiviewdfx_hitrace)) { 224 defines += [ "FEATURE_HITRACE_METER" ] 225 external_deps += [ "hitrace:hitrace_meter" ] 226 } 227 228 subsystem_name = "thirdparty" 229 part_name = "pulseaudio" 230} 231