LZ4_CXXFLAGS = $(CXXFLAGS) $(DEBUGFLAGS) $(MOREFLAGS)
LZ4_CPPFLAGS = $(CPPFLAGS) -I$(LZ4DIR) -DXXH_NAMESPACE=LZ4_
+FUZZERS := \
+ compress_fuzzer \
+ decompress_fuzzer \
+ round_trip_fuzzer \
+ round_trip_stream_fuzzer
+
+all: $(FUZZERS)
+
# Include a rule to build the static library if calling this target
# directly.
$(LZ4DIR)/liblz4.a:
export MAKEFLAGS+="-j$(nproc)"
pushd ossfuzz
-make V=1 compress_fuzzer decompress_fuzzer
+make V=1 all
popd
# Copy the fuzzers to the target directory.
-cp -v ossfuzz/compress_fuzzer ossfuzz/decompress_fuzzer $OUT/
+cp -v ossfuzz/*_fuzzer $OUT/
if [[ ! -d /tmp/ossfuzz/projects/lz4 ]]
then
echo "Could not find the lz4 project in ossfuzz"
-
- # Exit with a success code while the lz4 project is not expected to exist
- # on oss-fuzz.
- exit 0
+ exit 1
fi
# Modify the oss-fuzz Dockerfile so that we're checking out the current branch on travis.