1# FLAC - Free Lossless Audio Codec 2# Copyright (C) 2019-2023 Xiph.Org Foundation 3# 4# This file is part the FLAC project. FLAC is comprised of several 5# components distributed under different licenses. The codec libraries 6# are distributed under Xiph.Org's BSD-like license (see the file 7# COPYING.Xiph in this distribution). All other programs, libraries, and 8# plugins are distributed under the GPL (see COPYING.GPL). The documentation 9# is distributed under the Gnu FDL (see COPYING.FDL). Each file in the 10# FLAC distribution contains at the top the terms under which it may be 11# distributed. 12# 13# Since this particular file is relevant to all components of FLAC, 14# it may be distributed under the Xiph.Org license, which is the least 15# restrictive of those mentioned above. See the file COPYING.Xiph in this 16# distribution. 17 18AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/oss-fuzz 19 20AM_CFLAGS = ${LIB_FUZZING_ENGINE} 21AM_CXXFLAGS = -std=c++11 $(LIB_FUZZING_ENGINE) 22LDADD = $(flac_libs) 23 24 25EXTRA_DIST = \ 26 fuzzer_encoder.dict \ 27 common.h \ 28 Readme.md \ 29 fuzzing/datasource/datasource.hpp \ 30 fuzzing/datasource/id.hpp \ 31 fuzzing/exception.hpp \ 32 fuzzing/memory.hpp \ 33 fuzzing/types.hpp 34 35noinst_PROGRAMS = 36 37if USE_OSSFUZZERS 38noinst_PROGRAMS += fuzzer_encoder fuzzer_encoder_v2 fuzzer_decoder fuzzer_seek fuzzer_metadata fuzzer_reencoder fuzzer_tool_flac fuzzer_tool_metaflac 39endif 40 41fuzzer_encoder_SOURCES = encoder.cc 42fuzzer_encoder_v2_SOURCES = encoder_v2.cc 43fuzzer_decoder_SOURCES = decoder.cc 44fuzzer_seek_SOURCES = seek.cc 45fuzzer_metadata_SOURCES = metadata.cc 46fuzzer_reencoder_SOURCES = reencoder.cc 47fuzzer_tool_flac_SOURCES = ${flac_SOURCES} empty.cc tool_flac.c # empty.cc is to force use of C++ linker, which is mandated by oss-fuzz 48fuzzer_tool_flac_LDADD = \ 49 $(top_builddir)/src/share/utf8/libutf8.la \ 50 $(top_builddir)/src/share/grabbag/libgrabbag.la \ 51 $(top_builddir)/src/share/getopt/libgetopt.la \ 52 $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ 53 $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \ 54 $(top_builddir)/src/libFLAC/libFLAC.la \ 55 @LTLIBICONV@ \ 56 -lm 57fuzzer_tool_metaflac_SOURCES = ${metaflac_SOURCES} empty.cc tool_metaflac.c # empty.cc is to force use of C++ linker, which is mandated by oss-fuzz 58fuzzer_tool_metaflac_LDADD = \ 59 $(top_builddir)/src/share/utf8/libutf8.la \ 60 $(top_builddir)/src/share/grabbag/libgrabbag.la \ 61 $(top_builddir)/src/share/getopt/libgetopt.la \ 62 $(top_builddir)/src/share/replaygain_analysis/libreplaygain_analysis.la \ 63 $(top_builddir)/src/share/replaygain_synthesis/libreplaygain_synthesis.la \ 64 $(top_builddir)/src/libFLAC/libFLAC.la \ 65 @LTLIBICONV@ \ 66 -lm 67 68flac_libs = \ 69 $(top_builddir)/src/libFLAC/libFLAC-static.la \ 70 $(top_builddir)/src/libFLAC++/libFLAC++-static.la \ 71 @OGG_LIBS@ \ 72 -lm 73 74flac_SOURCES = \ 75 ${top_builddir}/src/flac/analyze.c \ 76 ${top_builddir}/src/flac/decode.c \ 77 ${top_builddir}/src/flac/encode.c \ 78 ${top_builddir}/src/flac/foreign_metadata.c \ 79 ${top_builddir}/src/flac/local_string_utils.c \ 80 ${top_builddir}/src/flac/utils.c \ 81 ${top_builddir}/src/flac/vorbiscomment.c \ 82 ${top_builddir}/src/flac/analyze.h \ 83 ${top_builddir}/src/flac/decode.h \ 84 ${top_builddir}/src/flac/encode.h \ 85 ${top_builddir}/src/flac/foreign_metadata.h \ 86 ${top_builddir}/src/flac/local_string_utils.h \ 87 ${top_builddir}/src/flac/utils.h \ 88 ${top_builddir}/src/flac/vorbiscomment.h 89 90metaflac_SOURCES = \ 91 ${top_builddir}/src/metaflac/operations.c \ 92 ${top_builddir}/src/metaflac/operations_shorthand_cuesheet.c \ 93 ${top_builddir}/src/metaflac/operations_shorthand_picture.c \ 94 ${top_builddir}/src/metaflac/operations_shorthand_seektable.c \ 95 ${top_builddir}/src/metaflac/operations_shorthand_streaminfo.c \ 96 ${top_builddir}/src/metaflac/operations_shorthand_vorbiscomment.c \ 97 ${top_builddir}/src/metaflac/options.c \ 98 ${top_builddir}/src/metaflac/usage.c \ 99 ${top_builddir}/src/metaflac/utils.c \ 100 ${top_builddir}/src/metaflac/operations.h \ 101 ${top_builddir}/src/metaflac/operations_shorthand.h \ 102 ${top_builddir}/src/metaflac/options.h \ 103 ${top_builddir}/src/metaflac/usage.h \ 104 ${top_builddir}/src/metaflac/utils.h 105