diff options
| author | 2017-05-29 04:08:29 +0200 | |
|---|---|---|
| committer | 2017-05-29 04:08:29 +0200 | |
| commit | 99f3ab144dcaa97a2be37e562740dbff2de350c6 (patch) | |
| tree | b6540c04944d1e493e95693c70b2d39e8b01302b /fuzz/Makefile.am | |
| parent | 1e89644636438269bcedb50f3eabf0780d0074ac (diff) | |
| download | libplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.gz libplist-99f3ab144dcaa97a2be37e562740dbff2de350c6.tar.bz2 | |
Integrate fuzzers into build system
Diffstat (limited to 'fuzz/Makefile.am')
| -rw-r--r-- | fuzz/Makefile.am | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am new file mode 100644 index 0000000..b9798f9 --- /dev/null +++ b/fuzz/Makefile.am | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | if BUILD_FUZZERS | ||
| 2 | |||
| 3 | libFuzzer.a: Fuzzer/build.sh | ||
| 4 | @echo "Building $@" | ||
| 5 | @./Fuzzer/build.sh | ||
| 6 | |||
| 7 | Fuzzer/build.sh: LIBFUZZER_SRC | ||
| 8 | |||
| 9 | LIBFUZZER_SRC: | ||
| 10 | @if test -d Fuzzer ; then \ | ||
| 11 | if test -d Fuzzer/.git ; then \ | ||
| 12 | echo Making sure libFuzzer source tree is up-to-date... ; \ | ||
| 13 | cd Fuzzer && git checkout . && git pull && cd .. ; \ | ||
| 14 | fi \ | ||
| 15 | else \ | ||
| 16 | echo Checking out libFuzzer source code... ; \ | ||
| 17 | git clone https://chromium.googlesource.com/chromium/llvm-project/llvm/lib/Fuzzer ; \ | ||
| 18 | fi | ||
| 19 | |||
| 20 | CLEANFILES = libFuzzer.a | ||
| 21 | |||
| 22 | noinst_PROGRAMS = xplist_fuzzer bplist_fuzzer | ||
| 23 | |||
| 24 | xplist_fuzzer_SOURCES = xplist_fuzzer.cc | ||
| 25 | xplist_fuzzer_LDFLAGS = -static | ||
| 26 | xplist_fuzzer_LDADD = $(top_builddir)/src/libplist.la libFuzzer.a | ||
| 27 | |||
| 28 | bplist_fuzzer_SOURCES = bplist_fuzzer.cc | ||
| 29 | bplist_fuzzer_LDFLAGS = -static | ||
| 30 | bplist_fuzzer_LDADD = $(top_builddir)/src/libplist.la libFuzzer.a | ||
| 31 | |||
| 32 | TESTS = fuzzers.test | ||
| 33 | |||
| 34 | EXTRA_DIST = bplist.dict xplist.dict init-fuzzers.sh test-fuzzers.sh fuzzers.test | ||
| 35 | |||
| 36 | endif | ||
