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 "//third_party/glib/glib", 27 "//third_party/glib", 28 "//base/hiviewdfx/hilog/interfaces/native/innerkits/include", 29 ] 30 31 cflags = [ 32 "-Wall", 33 "-Werror", 34 "-Wno-implicit-function-declaration", 35 "-Wno-sign-compare", 36 "-Wno-unused-function", 37 "-DHAVE_CONFIG_H", 38 "-D_GNU_SOURCE", 39 ] 40} 41 42ohos_source_set("pulse_sources") { 43 sources = [ 44 "../../../src/pulse/channelmap.c", 45 "../../../src/pulse/context.c", 46 "../../../src/pulse/direction.c", 47 "../../../src/pulse/error.c", 48 "../../../src/pulse/ext-device-manager.c", 49 "../../../src/pulse/ext-device-restore.c", 50 "../../../src/pulse/ext-stream-restore.c", 51 "../../../src/pulse/format.c", 52 "../../../src/pulse/internal.h", 53 "../../../src/pulse/introspect.c", 54 "../../../src/pulse/mainloop-api.c", 55 "../../../src/pulse/mainloop-signal.c", 56 "../../../src/pulse/mainloop.c", 57 "../../../src/pulse/ohos_pa_volume.c", 58 "../../../src/pulse/operation.c", 59 "../../../src/pulse/proplist.c", 60 "../../../src/pulse/rtclock.c", 61 "../../../src/pulse/sample.c", 62 "../../../src/pulse/scache.c", 63 "../../../src/pulse/stream.c", 64 "../../../src/pulse/subscribe.c", 65 "../../../src/pulse/thread-mainloop.c", 66 "../../../src/pulse/timeval.c", 67 "../../../src/pulse/utf8.c", 68 "../../../src/pulse/util.c", 69 "../../../src/pulse/xmalloc.c", 70 ] 71 72 configs = [ ":pulse_config" ] 73 74 subsystem_name = "thirdparty" 75 part_name = "pulseaudio" 76} 77 78ohos_shared_library("pulse") { 79 deps = [ 80 ":pulse_sources", 81 "../../src:pulsecommon", 82 ] 83 84 external_deps = [ "hilog:libhilog" ] 85 86 subsystem_name = "thirdparty" 87 innerapi_tags = [ "platformsdk_indirect" ] 88 part_name = "pulseaudio" 89} 90 91ohos_shared_library("pulse-simple") { 92 sources = [ "../../../src/pulse/simple.c" ] 93 94 configs = [ ":pulse_config" ] 95 96 deps = [ 97 "../../src:pulsecommon", 98 "../../src/pulse:pulse", 99 ] 100 101 subsystem_name = "thirdparty" 102 part_name = "pulseaudio" 103} 104 105ohos_shared_library("pulse-mainloop-glib") { 106 sources = [ "../../../src/pulse/ohos_glib-mainloop.c" ] 107 108 configs = [ ":pulse_config" ] 109 deps = [ 110 "../../src:pulsecommon", 111 "//third_party/glib:glib", 112 ] 113 114 subsystem_name = "thirdparty" 115 part_name = "pulseaudio" 116} 117