Erik de Castro Lopo | e0f7e0e | 2019-11-17 16:15:51 +1100 | [diff] [blame] | 1 | # FLAC - Free Lossless Audio Codec |
| 2 | # Copyright (C) 2019 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 | |
| 18 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/oss-fuzz |
| 19 | |
| 20 | AM_CXXFLAGS = -std=c++11 |
| 21 | |
| 22 | EXTRA_DIST = \ |
| 23 | fuzz-encoder.dict \ |
| 24 | fuzzing/Readme.md \ |
| 25 | fuzzing/datasource/datasource.hpp \ |
| 26 | fuzzing/datasource/id.hpp \ |
| 27 | fuzzing/exception.hpp \ |
| 28 | fuzzing/memory.hpp \ |
| 29 | fuzzing/types.hpp |
| 30 | |
| 31 | if USE_OSSFUZZ_FLAG |
| 32 | FUZZ_FLAG = $(LIB_FUZZING_ENGINE) |
| 33 | FUZZ_LDADD = -lFuzzer |
| 34 | else |
| 35 | if USE_OSSFUZZ_STATIC |
| 36 | FUZZ_LDADD = $(LIB_FUZZING_ENGINE) |
| 37 | FUZZ_FLAG = -lFuzzer |
| 38 | endif |
| 39 | endif |
| 40 | |
| 41 | noinst_PROGRAMS = |
| 42 | |
| 43 | if USE_OSSFUZZERS |
| 44 | noinst_PROGRAMS += fuzz-decoder fuzz-encoder |
| 45 | endif |
| 46 | |
| 47 | fuzz_decoder_SOURCES = fuzz-decoder.cc |
| 48 | fuzz_decoder_CXXFLAGS = $(AM_CXXFLAGS) $(FUZZ_FLAG) |
| 49 | fuzz_decoder_LDFLAGS = $(AM_LDFLAGS) -static |
| 50 | fuzz_decoder_LDADD = $(flac_libs) $(FUZZ_LDADD) |
| 51 | |
| 52 | fuzz_encoder_SOURCES = fuzz-encoder.cc |
| 53 | fuzz_encoder_CXXFLAGS = $(AM_CXXFLAGS) $(FUZZ_FLAG) |
| 54 | fuzz_encoder_LDFLAGS = $(AM_LDFLAGS) -static |
| 55 | fuzz_encoder_LDADD = $(flac_libs) $(FUZZ_LDADD) |
| 56 | |
| 57 | flac_libs = \ |
| 58 | $(top_builddir)/src/libFLAC/libFLAC-static.la \ |
| 59 | $(top_builddir)/src/libFLAC++/libFLAC++-static.la \ |
| 60 | @OGG_LIBS@ \ |
| 61 | -lm |
| 62 | |