summaryrefslogtreecommitdiff
path: root/regress/misc/fuzz-harness/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'regress/misc/fuzz-harness/Makefile')
-rw-r--r--regress/misc/fuzz-harness/Makefile16
1 files changed, 12 insertions, 4 deletions
diff --git a/regress/misc/fuzz-harness/Makefile b/regress/misc/fuzz-harness/Makefile
index a2aa4441f..85179ac4e 100644
--- a/regress/misc/fuzz-harness/Makefile
+++ b/regress/misc/fuzz-harness/Makefile
@@ -1,13 +1,15 @@
1# NB. libssh and libopenbsd-compat should be built with the same sanitizer opts. 1# NB. libssh and libopenbsd-compat should be built with the same sanitizer opts.
2CXX=clang++-3.9 2CXX=clang++-6.0
3FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge 3FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge,trace-pc
4FUZZ_LIBS=-lFuzzer 4FUZZ_LIBS=-lFuzzer
5 5
6CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS) 6CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS)
7LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS) 7LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS)
8LIBS=-lssh -lopenbsd-compat -lcrypto $(FUZZ_LIBS) 8LIBS=-lssh -lopenbsd-compat -lcrypto $(FUZZ_LIBS)
9 9
10all: pubkey_fuzz sig_fuzz authopt_fuzz 10TARGETS=pubkey_fuzz sig_fuzz authopt_fuzz sshsig_fuzz sshsigopt_fuzz
11
12all: $(TARGETS)
11 13
12.cc.o: 14.cc.o:
13 $(CXX) $(CXXFLAGS) -c $< -o $@ 15 $(CXX) $(CXXFLAGS) -c $< -o $@
@@ -21,5 +23,11 @@ sig_fuzz: sig_fuzz.o
21authopt_fuzz: authopt_fuzz.o 23authopt_fuzz: authopt_fuzz.o
22 $(CXX) -o $@ authopt_fuzz.o ../../../auth-options.o $(LDFLAGS) $(LIBS) 24 $(CXX) -o $@ authopt_fuzz.o ../../../auth-options.o $(LDFLAGS) $(LIBS)
23 25
26sshsig_fuzz: sshsig_fuzz.o
27 $(CXX) -o $@ sshsig_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS)
28
29sshsigopt_fuzz: sshsigopt_fuzz.o
30 $(CXX) -o $@ sshsigopt_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS)
31
24clean: 32clean:
25 -rm -f *.o pubkey_fuzz sig_fuzz authopt_fuzz 33 -rm -f *.o $(TARGETS)