# This file was generated by fuzzing_include_am.py; do not hand-edit unless
# you enjoy having your changes erased.
FUZZING_CPPFLAGS = \
	$(src_test_AM_CPPFLAGS) $(TEST_CPPFLAGS)
FUZZING_CFLAGS = \
	$(AM_CFLAGS) $(TEST_CFLAGS)
FUZZING_LDFLAG = \
	@TOR_LDFLAGS_zlib@ $(TOR_LDFLAGS_CRYPTLIB) @TOR_LDFLAGS_libevent@
FUZZING_LIBS = \
	src/test/libtor-testing.a \
	@TOR_ZLIB_LIBS@ @TOR_LIB_MATH@ \
	@TOR_LIBEVENT_LIBS@ $(TOR_LIBS_CRYPTLIB) \
	@TOR_LIB_WS32@ @TOR_LIB_IPHLPAPI@ @TOR_LIB_SHLWAPI@ @TOR_LIB_GDI@ @TOR_LIB_USERENV@ @CURVE25519_LIBS@ \
	@TOR_SYSTEMD_LIBS@ \
	@TOR_LZMA_LIBS@ \
	@TOR_ZSTD_LIBS@ \
	@TOR_TRACE_LIBS@

oss-fuzz-prereqs: \
    src/test/libtor-testing.a

noinst_HEADERS += \
	src/test/fuzz/fuzzing.h

LIBFUZZER_CPPFLAGS = $(FUZZING_CPPFLAGS) -DLLVM_FUZZ
LIBFUZZER_CFLAGS = $(FUZZING_CFLAGS)
LIBFUZZER_LDFLAG = $(FUZZING_LDFLAG) -fsanitize=fuzzer
LIBFUZZER_LIBS = $(FUZZING_LIBS) -lstdc++

LIBOSS_FUZZ_CPPFLAGS = $(FUZZING_CPPFLAGS) -DLLVM_FUZZ
LIBOSS_FUZZ_CFLAGS = $(FUZZING_CFLAGS)

# ===== AFL fuzzers
if UNITTESTS_ENABLED
src_test_fuzz_fuzz_address_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_address.c
src_test_fuzz_fuzz_address_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_address_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_address_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_address_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_addressPTR_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_addressPTR.c
src_test_fuzz_fuzz_addressPTR_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_addressPTR_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_addressPTR_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_addressPTR_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_consensus_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_consensus.c
src_test_fuzz_fuzz_consensus_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_consensus_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_consensus_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_consensus_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_descriptor_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_descriptor.c
src_test_fuzz_fuzz_descriptor_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_descriptor_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_descriptor_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_descriptor_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_diff_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_diff.c
src_test_fuzz_fuzz_diff_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_diff_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_diff_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_diff_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_diff_apply_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_diff_apply.c
src_test_fuzz_fuzz_diff_apply_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_diff_apply_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_diff_apply_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_diff_apply_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_extrainfo_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_extrainfo.c
src_test_fuzz_fuzz_extrainfo_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_extrainfo_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_extrainfo_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_extrainfo_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_hsdescv3_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_hsdescv3.c
src_test_fuzz_fuzz_hsdescv3_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_hsdescv3_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_hsdescv3_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_hsdescv3_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_hsdescv3_inner_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_hsdescv3_inner.c
src_test_fuzz_fuzz_hsdescv3_inner_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_hsdescv3_inner_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_hsdescv3_inner_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_hsdescv3_inner_LDADD = $(FUZZING_LIBS)
endif


if UNITTESTS_ENABLED
src_test_fuzz_fuzz_hsdescv3_middle_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_hsdescv3_middle.c
src_test_fuzz_fuzz_hsdescv3_middle_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_hsdescv3_middle_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_hsdescv3_middle_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_hsdescv3_middle_LDADD = $(FUZZING_LIBS)
endif


if UNITTESTS_ENABLED
src_test_fuzz_fuzz_http_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_http.c
src_test_fuzz_fuzz_http_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_http_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_http_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_http_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_http_connect_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_http_connect.c
src_test_fuzz_fuzz_http_connect_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_http_connect_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_http_connect_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_http_connect_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_microdesc_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_microdesc.c
src_test_fuzz_fuzz_microdesc_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_microdesc_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_microdesc_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_microdesc_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_socks_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_socks.c
src_test_fuzz_fuzz_socks_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_socks_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_socks_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_socks_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_strops_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_strops.c
src_test_fuzz_fuzz_strops_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_strops_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_strops_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_strops_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_fuzz_vrs_SOURCES = \
	src/test/fuzz/fuzzing_common.c \
	src/test/fuzz/fuzz_vrs.c
src_test_fuzz_fuzz_vrs_CPPFLAGS = $(FUZZING_CPPFLAGS)
src_test_fuzz_fuzz_vrs_CFLAGS = $(FUZZING_CFLAGS)
src_test_fuzz_fuzz_vrs_LDFLAGS = $(FUZZING_LDFLAG)
src_test_fuzz_fuzz_vrs_LDADD = $(FUZZING_LIBS)
endif

if UNITTESTS_ENABLED
FUZZERS = \
	src/test/fuzz/fuzz-address \
	src/test/fuzz/fuzz-addressPTR \
	src/test/fuzz/fuzz-consensus \
	src/test/fuzz/fuzz-descriptor \
	src/test/fuzz/fuzz-diff \
	src/test/fuzz/fuzz-diff-apply \
	src/test/fuzz/fuzz-extrainfo \
	src/test/fuzz/fuzz-hsdescv3 \
	src/test/fuzz/fuzz-hsdescv3-inner \
	src/test/fuzz/fuzz-hsdescv3-middle \
	src/test/fuzz/fuzz-http \
	src/test/fuzz/fuzz-http-connect \
	src/test/fuzz/fuzz-microdesc \
	src/test/fuzz/fuzz-socks \
	src/test/fuzz/fuzz-strops \
	src/test/fuzz/fuzz-vrs
endif

# ===== libfuzzer

if LIBFUZZER_ENABLED
if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_address_SOURCES = \
	$(src_test_fuzz_fuzz_address_SOURCES)
src_test_fuzz_lf_fuzz_address_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_address_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_address_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_address_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_addressPTR_SOURCES = \
	$(src_test_fuzz_fuzz_addressPTR_SOURCES)
src_test_fuzz_lf_fuzz_addressPTR_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_addressPTR_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_addressPTR_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_addressPTR_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_consensus_SOURCES = \
	$(src_test_fuzz_fuzz_consensus_SOURCES)
src_test_fuzz_lf_fuzz_consensus_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_consensus_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_consensus_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_consensus_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_descriptor_SOURCES = \
	$(src_test_fuzz_fuzz_descriptor_SOURCES)
src_test_fuzz_lf_fuzz_descriptor_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_descriptor_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_descriptor_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_descriptor_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_diff_SOURCES = \
	$(src_test_fuzz_fuzz_diff_SOURCES)
src_test_fuzz_lf_fuzz_diff_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_diff_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_diff_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_diff_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_diff_apply_SOURCES = \
	$(src_test_fuzz_fuzz_diff_apply_SOURCES)
src_test_fuzz_lf_fuzz_diff_apply_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_diff_apply_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_diff_apply_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_diff_apply_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_extrainfo_SOURCES = \
	$(src_test_fuzz_fuzz_extrainfo_SOURCES)
src_test_fuzz_lf_fuzz_extrainfo_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_extrainfo_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_extrainfo_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_extrainfo_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_hsdescv3_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
src_test_fuzz_lf_fuzz_hsdescv3_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_hsdescv3_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_hsdescv3_inner_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_inner_SOURCES)
src_test_fuzz_lf_fuzz_hsdescv3_inner_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_inner_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_inner_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_hsdescv3_inner_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_hsdescv3_middle_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_middle_SOURCES)
src_test_fuzz_lf_fuzz_hsdescv3_middle_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_middle_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_hsdescv3_middle_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_hsdescv3_middle_LDADD = $(LIBFUZZER_LIBS)
endif


if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_http_SOURCES = \
	$(src_test_fuzz_fuzz_http_SOURCES)
src_test_fuzz_lf_fuzz_http_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_http_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_http_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_http_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_http_connect_SOURCES = \
	$(src_test_fuzz_fuzz_http_connect_SOURCES)
src_test_fuzz_lf_fuzz_http_connect_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_http_connect_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_http_connect_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_http_connect_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_microdesc_SOURCES = \
	$(src_test_fuzz_fuzz_microdesc_SOURCES)
src_test_fuzz_lf_fuzz_microdesc_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_microdesc_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_microdesc_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_microdesc_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_socks_SOURCES = \
	$(src_test_fuzz_fuzz_socks_SOURCES)
src_test_fuzz_lf_fuzz_socks_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_socks_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_socks_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_socks_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_strops_SOURCES = \
	$(src_test_fuzz_fuzz_strops_SOURCES)
src_test_fuzz_lf_fuzz_strops_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_strops_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_strops_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_strops_LDADD = $(LIBFUZZER_LIBS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_lf_fuzz_vrs_SOURCES = \
	$(src_test_fuzz_fuzz_vrs_SOURCES)
src_test_fuzz_lf_fuzz_vrs_CPPFLAGS = $(LIBFUZZER_CPPFLAGS)
src_test_fuzz_lf_fuzz_vrs_CFLAGS = $(LIBFUZZER_CFLAGS)
src_test_fuzz_lf_fuzz_vrs_LDFLAGS = $(LIBFUZZER_LDFLAG)
src_test_fuzz_lf_fuzz_vrs_LDADD = $(LIBFUZZER_LIBS)
endif

LIBFUZZER_FUZZERS = \
	src/test/fuzz/lf-fuzz-address \
	src/test/fuzz/lf-fuzz-addressPTR \
	src/test/fuzz/lf-fuzz-consensus \
	src/test/fuzz/lf-fuzz-descriptor \
	src/test/fuzz/lf-fuzz-diff \
	src/test/fuzz/lf-fuzz-diff-apply \
	src/test/fuzz/lf-fuzz-extrainfo \
	src/test/fuzz/lf-fuzz-hsdescv3 \
	src/test/fuzz/lf-fuzz-hsdescv3-inner \
	src/test/fuzz/lf-fuzz-hsdescv3-middle \
	src/test/fuzz/lf-fuzz-http \
	src/test/fuzz/lf-fuzz-http-connect \
	src/test/fuzz/lf-fuzz-microdesc \
	src/test/fuzz/lf-fuzz-socks \
	src/test/fuzz/lf-fuzz-strops \
	src/test/fuzz/lf-fuzz-vrs

else
LIBFUZZER_FUZZERS =
endif

# ===== oss-fuzz

if OSS_FUZZ_ENABLED
if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_address_a_SOURCES = \
	$(src_test_fuzz_fuzz_address_SOURCES)
src_test_fuzz_liboss_fuzz_address_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_address_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_addressPTR_a_SOURCES = \
	$(src_test_fuzz_fuzz_addressPTR_SOURCES)
src_test_fuzz_liboss_fuzz_addressPTR_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_addressPTR_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_consensus_a_SOURCES = \
	$(src_test_fuzz_fuzz_consensus_SOURCES)
src_test_fuzz_liboss_fuzz_consensus_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_consensus_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_descriptor_a_SOURCES = \
	$(src_test_fuzz_fuzz_descriptor_SOURCES)
src_test_fuzz_liboss_fuzz_descriptor_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_descriptor_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_diff_a_SOURCES = \
	$(src_test_fuzz_fuzz_diff_SOURCES)
src_test_fuzz_liboss_fuzz_diff_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_diff_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_diff_apply_a_SOURCES = \
	$(src_test_fuzz_fuzz_diff_apply_SOURCES)
src_test_fuzz_liboss_fuzz_diff_apply_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_diff_apply_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_extrainfo_a_SOURCES = \
	$(src_test_fuzz_fuzz_extrainfo_SOURCES)
src_test_fuzz_liboss_fuzz_extrainfo_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_extrainfo_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_hsdescv3_a_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_SOURCES)
src_test_fuzz_liboss_fuzz_hsdescv3_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv3_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_hsdescv3_inner_a_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_inner_SOURCES)
src_test_fuzz_liboss_fuzz_hsdescv3_inner_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv3_inner_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_hsdescv3_middle_a_SOURCES = \
	$(src_test_fuzz_fuzz_hsdescv3_middle_SOURCES)
src_test_fuzz_liboss_fuzz_hsdescv3_middle_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_hsdescv3_middle_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_http_a_SOURCES = \
	$(src_test_fuzz_fuzz_http_SOURCES)
src_test_fuzz_liboss_fuzz_http_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_http_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_http_connect_a_SOURCES = \
	$(src_test_fuzz_fuzz_http_connect_SOURCES)
src_test_fuzz_liboss_fuzz_http_connect_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_http_connect_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_microdesc_a_SOURCES = \
	$(src_test_fuzz_fuzz_microdesc_SOURCES)
src_test_fuzz_liboss_fuzz_microdesc_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_microdesc_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_socks_a_SOURCES = \
	$(src_test_fuzz_fuzz_socks_SOURCES)
src_test_fuzz_liboss_fuzz_socks_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_socks_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_strops_a_SOURCES = \
	$(src_test_fuzz_fuzz_strops_SOURCES)
src_test_fuzz_liboss_fuzz_strops_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_strops_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

if UNITTESTS_ENABLED
src_test_fuzz_liboss_fuzz_vrs_a_SOURCES = \
	$(src_test_fuzz_fuzz_vrs_SOURCES)
src_test_fuzz_liboss_fuzz_vrs_a_CPPFLAGS = $(LIBOSS_FUZZ_CPPFLAGS)
src_test_fuzz_liboss_fuzz_vrs_a_CFLAGS = $(LIBOSS_FUZZ_CFLAGS)
endif

OSS_FUZZ_FUZZERS = \
	src/test/fuzz/liboss-fuzz-address.a \
	src/test/fuzz/liboss-fuzz-addressPTR.a \
	src/test/fuzz/liboss-fuzz-consensus.a \
	src/test/fuzz/liboss-fuzz-descriptor.a \
	src/test/fuzz/liboss-fuzz-diff.a \
	src/test/fuzz/liboss-fuzz-diff-apply.a \
	src/test/fuzz/liboss-fuzz-extrainfo.a \
	src/test/fuzz/liboss-fuzz-hsdescv3.a \
	src/test/fuzz/liboss-fuzz-hsdescv3-inner.a \
	src/test/fuzz/liboss-fuzz-hsdescv3-middle.a \
	src/test/fuzz/liboss-fuzz-http.a \
	src/test/fuzz/liboss-fuzz-http-connect.a \
	src/test/fuzz/liboss-fuzz-microdesc.a \
	src/test/fuzz/liboss-fuzz-socks.a \
	src/test/fuzz/liboss-fuzz-strops.a \
	src/test/fuzz/liboss-fuzz-vrs.a

else
OSS_FUZZ_FUZZERS =
endif

noinst_PROGRAMS += $(FUZZERS) $(LIBFUZZER_FUZZERS)
noinst_LIBRARIES += $(OSS_FUZZ_FUZZERS)
oss-fuzz-fuzzers:  oss-fuzz-prereqs $(OSS_FUZZ_FUZZERS)
fuzzers: $(FUZZERS) $(LIBFUZZER_FUZZERS)

test-fuzz-corpora: $(FUZZERS)
	$(top_srcdir)/src/test/fuzz_static_testcases.sh
