diff options
Diffstat (limited to 'regress/misc/fuzz-harness/Makefile')
-rw-r--r-- | regress/misc/fuzz-harness/Makefile | 16 |
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. |
2 | CXX=clang++-3.9 | 2 | CXX=clang++-6.0 |
3 | FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge | 3 | FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge,trace-pc |
4 | FUZZ_LIBS=-lFuzzer | 4 | FUZZ_LIBS=-lFuzzer |
5 | 5 | ||
6 | CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS) | 6 | CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS) |
7 | LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS) | 7 | LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS) |
8 | LIBS=-lssh -lopenbsd-compat -lcrypto $(FUZZ_LIBS) | 8 | LIBS=-lssh -lopenbsd-compat -lcrypto $(FUZZ_LIBS) |
9 | 9 | ||
10 | all: pubkey_fuzz sig_fuzz authopt_fuzz | 10 | TARGETS=pubkey_fuzz sig_fuzz authopt_fuzz sshsig_fuzz sshsigopt_fuzz |
11 | |||
12 | all: $(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 | |||
21 | authopt_fuzz: authopt_fuzz.o | 23 | authopt_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 | ||
26 | sshsig_fuzz: sshsig_fuzz.o | ||
27 | $(CXX) -o $@ sshsig_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS) | ||
28 | |||
29 | sshsigopt_fuzz: sshsigopt_fuzz.o | ||
30 | $(CXX) -o $@ sshsigopt_fuzz.o ../../../sshsig.o $(LDFLAGS) $(LIBS) | ||
31 | |||
24 | clean: | 32 | clean: |
25 | -rm -f *.o pubkey_fuzz sig_fuzz authopt_fuzz | 33 | -rm -f *.o $(TARGETS) |