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 16group("native-modules") { 17 deps = [ 18 ":module-cli-protocol-unix", 19 ":module-native-protocol-fd", 20 ":module-native-protocol-tcp", 21 ":module-native-protocol-unix", 22 ":module-suspend-on-idle", 23 ] 24} 25 26group("common_deps") { 27 deps = [ 28 "../../src:pulsecommon", 29 "../../src/pulsecore:pulsecore", 30 ] 31} 32 33config("common_config") { 34 visibility = [ ":*" ] 35 36 include_dirs = [ 37 "../../../include", 38 "../../../src/modules", 39 "../../../src", 40 "../../../", 41 "../../src", 42 "../../include", 43 ] 44 45 cflags = [ 46 "-Wall", 47 "-Werror", 48 "-DHAVE_CONFIG_H", 49 "-D_GNU_SOURCE", 50 "-D__INCLUDED_FROM_PULSE_AUDIO", 51 ] 52} 53 54ohos_shared_library("module-native-protocol-fd") { 55 sources = [ "../../../src/modules/module-native-protocol-fd.c" ] 56 cflags = [ "-DPA_MODULE_NAME=libmodule_native_protocol_fd_z_so" ] 57 ldflags = [ 58 "-Wl", 59 "--no-undefined", 60 ] 61 configs = [ ":common_config" ] 62 deps = [ 63 ":common_deps", 64 "../../src/pulsecore:protocol-native", 65 ] 66 67 subsystem_name = "thirdparty" 68 part_name = "pulseaudio" 69} 70 71ohos_shared_library("module-native-protocol-tcp") { 72 sources = [ "../../../src/modules/ohos_module-protocol-stub.c" ] 73 cflags = [ 74 "-DPA_MODULE_NAME=libmodule_native_protocol_tcp_z_so", 75 "-DUSE_PROTOCOL_NATIVE", 76 "-DUSE_TCP_SOCKETS", 77 ] 78 ldflags = [ 79 "-Wl", 80 "--no-undefined", 81 ] 82 configs = [ ":common_config" ] 83 deps = [ 84 ":common_deps", 85 "../../src/pulsecore:protocol-native", 86 ] 87 88 subsystem_name = "thirdparty" 89 part_name = "pulseaudio" 90} 91 92ohos_shared_library("module-native-protocol-unix") { 93 sources = [ "../../../src/modules/ohos_module-protocol-stub.c" ] 94 cflags = [ 95 "-DPA_MODULE_NAME=libmodule_native_protocol_unix_z_so", 96 "-DUSE_PROTOCOL_NATIVE", 97 "-DUSE_UNIX_SOCKETS", 98 ] 99 ldflags = [ 100 "-Wl", 101 "--no-undefined", 102 ] 103 configs = [ ":common_config" ] 104 deps = [ 105 ":common_deps", 106 "../../src/pulsecore:protocol-native", 107 ] 108 109 subsystem_name = "thirdparty" 110 part_name = "pulseaudio" 111} 112 113ohos_shared_library("module-cli-protocol-unix") { 114 sources = [ "../../../src/modules/ohos_module-protocol-stub.c" ] 115 cflags = [ 116 "-DPA_MODULE_NAME=libmodule_cli_protocol_unix_z_so", 117 "-DUSE_PROTOCOL_CLI", 118 "-DUSE_UNIX_SOCKETS", 119 ] 120 ldflags = [ 121 "-Wl", 122 "--no-undefined", 123 ] 124 configs = [ ":common_config" ] 125 deps = [ 126 ":common_deps", 127 "../../src/pulsecore:protocol-cli", 128 ] 129 130 subsystem_name = "thirdparty" 131 part_name = "pulseaudio" 132} 133 134ohos_shared_library("module-suspend-on-idle") { 135 sources = [ "../../../src/modules/module-suspend-on-idle.c" ] 136 cflags = [ "-DPA_MODULE_NAME=libmodule_suspend_on_idle_z_so" ] 137 138 ldflags = [ 139 "-Wl", 140 "--no-undefined", 141 ] 142 143 configs = [ ":common_config" ] 144 deps = [ ":common_deps" ] 145 146 subsystem_name = "thirdparty" 147 part_name = "pulseaudio" 148} 149