2016-11-27 23:19:26 +08:00
|
|
|
##############################################################################
|
2020-07-16 19:38:25 +08:00
|
|
|
# OSS-Fuzz
|
2016-11-27 23:19:26 +08:00
|
|
|
##############################################################################
|
2016-08-04 13:24:46 +08:00
|
|
|
|
2020-07-16 19:38:25 +08:00
|
|
|
# The following targets realize the integration to OSS-Fuzz.
|
|
|
|
# See <https://github.com/google/oss-fuzz/blob/master/projects/json/build.sh> for more information.
|
2016-08-04 13:24:46 +08:00
|
|
|
|
2020-07-16 19:38:25 +08:00
|
|
|
# additional flags
|
|
|
|
CXXFLAGS += -std=c++11
|
|
|
|
CPPFLAGS += -I ../single_include
|
2016-12-22 18:09:26 +08:00
|
|
|
|
2017-01-04 05:35:31 +08:00
|
|
|
FUZZER_ENGINE = src/fuzzer-driver_afl.cpp
|
2018-10-24 21:43:37 +08:00
|
|
|
FUZZERS = parse_afl_fuzzer parse_bson_fuzzer parse_cbor_fuzzer parse_msgpack_fuzzer parse_ubjson_fuzzer
|
2018-01-28 01:38:11 +08:00
|
|
|
fuzzers: $(FUZZERS)
|
2017-01-02 04:51:36 +08:00
|
|
|
|
2016-12-22 18:09:26 +08:00
|
|
|
parse_afl_fuzzer:
|
2017-01-04 05:35:31 +08:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_json.cpp -o $@
|
2016-12-22 19:08:36 +08:00
|
|
|
|
2018-10-24 21:43:37 +08:00
|
|
|
parse_bson_fuzzer:
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_bson.cpp -o $@
|
|
|
|
|
2016-12-22 19:08:36 +08:00
|
|
|
parse_cbor_fuzzer:
|
2017-01-04 05:35:31 +08:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_cbor.cpp -o $@
|
2016-12-25 23:18:56 +08:00
|
|
|
|
|
|
|
parse_msgpack_fuzzer:
|
2017-01-04 05:35:31 +08:00
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_msgpack.cpp -o $@
|
2018-01-28 01:38:11 +08:00
|
|
|
|
|
|
|
parse_ubjson_fuzzer:
|
|
|
|
$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(FUZZER_ENGINE) src/fuzzer-parse_ubjson.cpp -o $@
|