contrib/fuzz/Makefile
changeset 43813 5a9e2ae9899b
parent 43812 bf0453866c80
child 43815 19da643dc10c
--- a/contrib/fuzz/Makefile	Fri Dec 06 15:15:05 2019 -0500
+++ b/contrib/fuzz/Makefile	Fri Dec 06 15:19:47 2019 -0500
@@ -1,7 +1,14 @@
 CC = clang
 CXX = clang++
 
-LIB_FUZZING_ENGINE ?= -lFuzzingEngine
+# By default, use our own standalone_fuzz_target_runner.
+# This runner does no fuzzing, but simply executes the inputs
+# provided via parameters.
+# Run e.g. "make all LIB_FUZZING_ENGINE=/path/to/libFuzzer.a"
+# to link the fuzzer(s) against a real fuzzing engine.
+#
+# OSS-Fuzz will define its own value for LIB_FUZZING_ENGINE.
+LIB_FUZZING_ENGINE ?= standalone_fuzz_target_runner.o
 
 PYTHON_CONFIG ?= $$OUT/sanpy/bin/python-config
 
@@ -9,6 +16,8 @@
 
 all: bdiff mpatch xdiff
 
+standalone_fuzz_target_runner.o: standalone_fuzz_target_runner.cc
+
 pyutil.o: pyutil.cc pyutil.h
 	$(CXX) $(CXXFLAGS) -g -O1 \
 	  `$(PYTHON_CONFIG) --cflags` \