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("sndfile_config") { 17 visibility = [ ":*" ] 18 19 include_dirs = [ 20 "src", 21 "include", 22 "src/GSM610", 23 "src/G72x", 24 "src/ALAC", 25 ] 26 27 cflags = [ 28 "-Wall", 29 "-Werror", 30 "-Wno-unused-but-set-variable", 31 ] 32} 33 34config("export_include_config") { 35 include_dirs = [ "include" ] 36} 37 38ohos_source_set("sndfile_sources") { 39 sources = [ 40 "src/ALAC/ALACBitUtilities.c", 41 "src/ALAC/ag_dec.c", 42 "src/ALAC/ag_enc.c", 43 "src/ALAC/alac_decoder.c", 44 "src/ALAC/alac_encoder.c", 45 "src/ALAC/dp_dec.c", 46 "src/ALAC/dp_enc.c", 47 "src/ALAC/matrix_dec.c", 48 "src/ALAC/matrix_enc.c", 49 "src/G72x/g721.c", 50 "src/G72x/g723_16.c", 51 "src/G72x/g723_24.c", 52 "src/G72x/g723_40.c", 53 "src/G72x/g72x.c", 54 "src/GSM610/add.c", 55 "src/GSM610/code.c", 56 "src/GSM610/decode.c", 57 "src/GSM610/gsm_create.c", 58 "src/GSM610/gsm_decode.c", 59 "src/GSM610/gsm_destroy.c", 60 "src/GSM610/gsm_encode.c", 61 "src/GSM610/gsm_option.c", 62 "src/GSM610/long_term.c", 63 "src/GSM610/lpc.c", 64 "src/GSM610/preprocess.c", 65 "src/GSM610/rpe.c", 66 "src/GSM610/short_term.c", 67 "src/GSM610/table.c", 68 "src/aiff.c", 69 "src/alac.c", 70 "src/alaw.c", 71 "src/au.c", 72 "src/audio_detect.c", 73 "src/avr.c", 74 "src/broadcast.c", 75 "src/caf.c", 76 "src/cart.c", 77 "src/chanmap.c", 78 "src/chunk.c", 79 "src/command.c", 80 "src/common.c", 81 "src/dither.c", 82 "src/double64.c", 83 "src/dwd.c", 84 "src/dwvw.c", 85 "src/file_io.c", 86 "src/flac.c", 87 "src/float32.c", 88 "src/g72x.c", 89 "src/gsm610.c", 90 "src/htk.c", 91 "src/id3.c", 92 "src/ima_adpcm.c", 93 "src/ima_oki_adpcm.c", 94 "src/interleave.c", 95 "src/ircam.c", 96 "src/macos.c", 97 "src/mat4.c", 98 "src/mat5.c", 99 "src/mpc2k.c", 100 "src/mpeg.c", 101 "src/ms_adpcm.c", 102 "src/nist.c", 103 "src/nms_adpcm.c", 104 "src/ogg.c", 105 "src/ogg_opus.c", 106 "src/ogg_pcm.c", 107 "src/ogg_speex.c", 108 "src/ogg_vcomment.c", 109 "src/ogg_vorbis.c", 110 "src/paf.c", 111 "src/pcm.c", 112 "src/pvf.c", 113 "src/raw.c", 114 "src/rf64.c", 115 "src/rx2.c", 116 "src/sd2.c", 117 "src/sds.c", 118 "src/sndfile.c", 119 "src/strings.c", 120 "src/svx.c", 121 "src/txw.c", 122 "src/ulaw.c", 123 "src/voc.c", 124 "src/vox_adpcm.c", 125 "src/w64.c", 126 "src/wav.c", 127 "src/wavlike.c", 128 "src/wve.c", 129 "src/xi.c", 130 ] 131 132 configs = [ ":sndfile_config" ] 133 subsystem_name = "thirdparty" 134 part_name = "libsnd" 135} 136 137ohos_shared_library("sndfile") { 138 deps = [ ":sndfile_sources" ] 139 140 public_configs = [ ":export_include_config" ] 141 142 innerapi_tags = [ 143 "chipsetsdk_indirect", 144 "platformsdk_indirect", 145 ] 146 subsystem_name = "thirdparty" 147 part_name = "libsnd" 148} 149