diff options
author | Tobias Brunner <tobias@strongswan.org> | 2017-05-30 16:44:22 +0200 |
---|---|---|
committer | Tobias Brunner <tobias@strongswan.org> | 2017-08-15 10:35:20 +0200 |
commit | be1beea7a4faf78ed613631f97f6c83c2cc08529 (patch) | |
tree | 3130b9bd457f371b774d4bb194d07eebfb7d9ddc /fuzz/Makefile.am | |
parent | c15dbfaf0855cdfa3b7b7c4311c3f7ff9feab90f (diff) | |
download | strongswan-be1beea7a4faf78ed613631f97f6c83c2cc08529.tar.bz2 strongswan-be1beea7a4faf78ed613631f97f6c83c2cc08529.tar.xz |
fuzzing: Add driver to run fuzz targets on a given list of files
This is enabled if the path to libFuzzer.a is not specified when running
the configure script.
Diffstat (limited to 'fuzz/Makefile.am')
-rw-r--r-- | fuzz/Makefile.am | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am index 66debc226..6d3d83ff7 100644 --- a/fuzz/Makefile.am +++ b/fuzz/Makefile.am @@ -1,12 +1,12 @@ -CPPFLAGS = @CPPFLAGS@ \ +AM_CPPFLAGS = @CPPFLAGS@ \ -I$(top_srcdir)/src/libstrongswan \ -DPLUGINDIR=\""$(abs_top_builddir)/src/libstrongswan/plugins\"" \ -DPLUGINS="\"${fuzz_plugins}\"" -LDFLAGS = @LDFLAGS@ ${libfuzzer} \ +fuzz_ldflags = ${libfuzzer} \ $(top_builddir)/src/libstrongswan/.libs/libstrongswan.a \ -Wl,-Bstatic -lgmp -Wl,-Bdynamic \ - -stdlib=libc++ -lstdc++ + @FUZZING_LDFLAGS@ FUZZ_TARGETS=fuzz_certs @@ -14,5 +14,9 @@ all-local: $(FUZZ_TARGETS) CLEANFILES=$(FUZZ_TARGETS) -fuzz_certs: fuzz_certs.c - $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $< $(LDFLAGS) +fuzz_certs: fuzz_certs.c ${libfuzzer} + $(CC) $(AM_CPPFLAGS) $(CFLAGS) -o $@ $< $(fuzz_ldflags) + +noinst_LIBRARIES = libFuzzerLocal.a +libFuzzerLocal_a_SOURCES = libFuzzerLocal.c +libFuzzerLocal_a_LIBADD = $(top_builddir)/src/libstrongswan/libstrongswan.la |