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 "../../../speex/include", 26 ] 27 28 cflags = [ 29 "-Wall", 30 "-Werror", 31 "-Wno-implicit-function-declaration", 32 "-Wno-unused-function", 33 "-Wno-uninitialized", 34 "-DHAVE_CONFIG_H", 35 "-D_GNU_SOURCE", 36 "-D__INCLUDED_FROM_PULSE_AUDIO", 37 ] 38} 39 40ohos_source_set("pulsecore_sources") { 41 sources = [ 42 "../../../src/pulsecore/asyncmsgq.c", 43 "../../../src/pulsecore/asyncq.c", 44 "../../../src/pulsecore/auth-cookie.c", 45 "../../../src/pulsecore/card.c", 46 "../../../src/pulsecore/cli-command.c", 47 "../../../src/pulsecore/cli-text.c", 48 "../../../src/pulsecore/client.c", 49 "../../../src/pulsecore/core-scache.c", 50 "../../../src/pulsecore/core-subscribe.c", 51 "../../../src/pulsecore/core.c", 52 "../../../src/pulsecore/cpu-arm.c", 53 "../../../src/pulsecore/database-simple.c", 54 "../../../src/pulsecore/database.c", 55 "../../../src/pulsecore/device-port.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/resampler.c", 74 "../../../src/pulsecore/resampler/ffmpeg.c", 75 "../../../src/pulsecore/resampler/peaks.c", 76 "../../../src/pulsecore/resampler/speex.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 = [ "hilog:libhilog" ] 101 102 defines = [] 103 if (defined(global_parts_info) && 104 defined(global_parts_info.hiviewdfx_hitrace)) { 105 defines += [ "FEATURE_HITRACE_METER" ] 106 external_deps += [ "hitrace:hitrace_meter" ] 107 } 108 109 subsystem_name = "thirdparty" 110 part_name = "pulseaudio" 111} 112 113config("export_pulsecore_include") { 114 include_dirs = [ 115 "../../../include", 116 "../../../src", 117 "../../include", 118 "../../src", 119 ] 120} 121 122ohos_shared_library("pulsecore") { 123 deps = [ 124 ":pulsecore_sources", 125 "../../../speex:speexresampler", 126 "../../src:pulsecommon", 127 ] 128 129 public_configs = [ ":export_pulsecore_include" ] 130 131 external_deps = [ "hilog:libhilog" ] 132 133 defines = [] 134 if (defined(global_parts_info) && 135 defined(global_parts_info.hiviewdfx_hitrace)) { 136 defines += [ "FEATURE_HITRACE_METER" ] 137 external_deps += [ "hitrace:hitrace_meter" ] 138 } 139 140 subsystem_name = "thirdparty" 141 innerapi_tags = [ 142 "chipsetsdk_indirect", 143 "platformsdk_indirect", 144 ] 145 part_name = "pulseaudio" 146} 147 148config("modules_internal_lib_config") { 149 visibility = [ ":*" ] 150 151 include_dirs = [ 152 "../../include", 153 "../../../include", 154 "../../../src", 155 "../../../", 156 "../../src", 157 ] 158 159 cflags = [ 160 "-Wall", 161 "-Werror", 162 "-Wno-unused-function", 163 "-DHAVE_CONFIG_H", 164 "-D_GNU_SOURCE", 165 "-D__INCLUDED_FROM_PULSE_AUDIO", 166 ] 167} 168 169ohos_shared_library("cli") { 170 sources = [ "../../../src/pulsecore/cli.c" ] 171 172 configs = [ ":modules_internal_lib_config" ] 173 174 deps = [ 175 "../../src:pulsecommon", 176 "../../src/pulsecore:pulsecore", 177 ] 178 179 subsystem_name = "thirdparty" 180 part_name = "pulseaudio" 181} 182 183ohos_shared_library("protocol-cli") { 184 sources = [ "../../../src/pulsecore/protocol-cli.c" ] 185 186 configs = [ ":modules_internal_lib_config" ] 187 188 deps = [ 189 "../../src:pulsecommon", 190 "../../src/pulsecore:cli", 191 "../../src/pulsecore:pulsecore", 192 ] 193 194 subsystem_name = "thirdparty" 195 part_name = "pulseaudio" 196} 197 198ohos_shared_library("protocol-native") { 199 sources = [ "../../../src/pulsecore/protocol-native.c" ] 200 201 configs = [ ":modules_internal_lib_config" ] 202 203 deps = [ 204 "../../src:pulsecommon", 205 "../../src/pulsecore:pulsecore", 206 ] 207 208 external_deps = [ "hilog:libhilog" ] 209 210 defines = [] 211 if (defined(global_parts_info) && 212 defined(global_parts_info.hiviewdfx_hitrace)) { 213 defines += [ "FEATURE_HITRACE_METER" ] 214 external_deps += [ "hitrace:hitrace_meter" ] 215 } 216 217 subsystem_name = "thirdparty" 218 part_name = "pulseaudio" 219} 220