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("pulsecommon_config") { 17 visibility = [ ":*" ] 18 19 include_dirs = [ 20 "../../src", 21 "../../include", 22 "../../", 23 "../src", 24 "../include", 25 "../../src/pulse", 26 ] 27 28 cflags = [ 29 "-Wall", 30 "-Werror", 31 "-Wno-implicit-function-declaration", 32 "-Wno-unused-function", 33 "-Wno-unused-but-set-variable", 34 "-DHAVE_CONFIG_H", 35 "-D_GNU_SOURCE", 36 ] 37} 38 39ohos_source_set("pulsecommon_sources") { 40 sources = [ 41 "../../src/pulse/channelmap.c", 42 "../../src/pulse/client-conf.c", 43 "../../src/pulse/error.c", 44 "../../src/pulse/fork-detect.c", 45 "../../src/pulse/format.c", 46 "../../src/pulse/mainloop-api.c", 47 "../../src/pulse/ohos_pa_volume.c", 48 "../../src/pulse/proplist.c", 49 "../../src/pulse/rtclock.c", 50 "../../src/pulse/sample.c", 51 "../../src/pulse/timeval.c", 52 "../../src/pulse/utf8.c", 53 "../../src/pulse/util.c", 54 "../../src/pulse/xmalloc.c", 55 "../../src/pulsecore/arpa-inet.c", 56 "../../src/pulsecore/aupdate.c", 57 "../../src/pulsecore/authkey.c", 58 "../../src/pulsecore/bitset.c", 59 "../../src/pulsecore/conf-parser.c", 60 "../../src/pulsecore/core-error.c", 61 "../../src/pulsecore/core-format.c", 62 "../../src/pulsecore/core-rtclock.c", 63 "../../src/pulsecore/core-util.c", 64 "../../src/pulsecore/dynarray.c", 65 "../../src/pulsecore/fdsem.c", 66 "../../src/pulsecore/flist.c", 67 "../../src/pulsecore/g711.c", 68 "../../src/pulsecore/hashmap.c", 69 "../../src/pulsecore/i18n.c", 70 "../../src/pulsecore/idxset.c", 71 "../../src/pulsecore/iochannel.c", 72 "../../src/pulsecore/ioline.c", 73 "../../src/pulsecore/ipacl.c", 74 "../../src/pulsecore/json.c", 75 "../../src/pulsecore/lock-autospawn.c", 76 "../../src/pulsecore/log.c", 77 "../../src/pulsecore/mcalign.c", 78 "../../src/pulsecore/memblock.c", 79 "../../src/pulsecore/memblockq.c", 80 "../../src/pulsecore/memchunk.c", 81 "../../src/pulsecore/memtrap.c", 82 "../../src/pulsecore/mutex-posix.c", 83 "../../src/pulsecore/native-common.c", 84 "../../src/pulsecore/ohos_socket-server.c", 85 "../../src/pulsecore/once.c", 86 "../../src/pulsecore/packet.c", 87 "../../src/pulsecore/parseaddr.c", 88 "../../src/pulsecore/pdispatch.c", 89 "../../src/pulsecore/pid.c", 90 "../../src/pulsecore/pipe.c", 91 "../../src/pulsecore/proplist-util.c", 92 "../../src/pulsecore/pstream-util.c", 93 "../../src/pulsecore/pstream.c", 94 "../../src/pulsecore/queue.c", 95 "../../src/pulsecore/random.c", 96 "../../src/pulsecore/ratelimit.c", 97 "../../src/pulsecore/sample-util.c", 98 "../../src/pulsecore/semaphore-posix.c", 99 "../../src/pulsecore/shm.c", 100 "../../src/pulsecore/socket-client.c", 101 "../../src/pulsecore/socket-util.c", 102 "../../src/pulsecore/srbchannel.c", 103 "../../src/pulsecore/strbuf.c", 104 "../../src/pulsecore/strlist.c", 105 "../../src/pulsecore/tagstruct.c", 106 "../../src/pulsecore/thread-posix.c", 107 "../../src/pulsecore/time-smoother.c", 108 "../../src/pulsecore/tokenizer.c", 109 "../../src/pulsecore/usergroup.c", 110 ] 111 112 configs = [ ":pulsecommon_config" ] 113 114 external_deps = [ 115 "hilog:libhilog", 116 "init:libbegetutil", 117 ] 118 119 defines = [] 120 if (defined(global_parts_info) && 121 defined(global_parts_info.hiviewdfx_hitrace)) { 122 defines += [ "FEATURE_HITRACE_METER" ] 123 external_deps += [ "hitrace:hitrace_meter" ] 124 } 125 126 subsystem_name = "thirdparty" 127 part_name = "pulseaudio" 128} 129 130ohos_shared_library("pulsecommon") { 131 branch_protector_ret = "pac_ret" 132 deps = [ ":pulsecommon_sources" ] 133 134 external_deps = [ 135 "hilog:libhilog", 136 "init:libbegetutil", 137 ] 138 139 subsystem_name = "thirdparty" 140 innerapi_tags = [ 141 "chipsetsdk_indirect", 142 "platformsdk_indirect", 143 ] 144 part_name = "pulseaudio" 145} 146ohos_prebuilt_etc("pa_daemon_config") { 147 source = "../../conf/daemon.conf" 148 149 subsystem_name = "thirdparty" 150 module_install_dir = "etc/pulse" 151 part_name = "pulseaudio" 152} 153 154ohos_prebuilt_etc("pa_default_config") { 155 source = "../../conf/default.pa" 156 subsystem_name = "thirdparty" 157 module_install_dir = "etc/pulse" 158 part_name = "pulseaudio" 159} 160 161ohos_prebuilt_etc("pa_client_config") { 162 source = "../../conf/client.conf" 163 subsystem_name = "thirdparty" 164 module_install_dir = "etc/pulse" 165 part_name = "pulseaudio" 166} 167