oss-fuzz: replace -lFuzzingEngine with $LIB_FUZZING_ENGINE
[platform/upstream/libvorbis.git] / contrib / oss-fuzz / build.sh
1 #!/bin/bash -eu
2
3 pushd $SRC
4 mv people.xiph.org/*.ogg decode_corpus/
5 zip -r "$OUT/decode_fuzzer_seed_corpus.zip" decode_corpus/
6 popd
7
8 pushd $SRC/ogg
9 ./autogen.sh
10 ./configure --prefix="$WORK" --enable-static --disable-shared --disable-crc
11 make clean
12 make -j$(nproc)
13 make install
14 popd
15
16
17 ./autogen.sh
18 ./configure --prefix="$WORK" --enable-static --disable-shared
19 make clean
20 make -j$(nproc)
21 make install
22
23 $CXX $CXXFLAGS $SRC/vorbis/contrib/oss-fuzz/decode_fuzzer.cc -o $OUT/decode_fuzzer -L"$WORK/lib" -I"$WORK/include" $LIB_FUZZING_ENGINE -lvorbisfile -lvorbis -logg