1# NB. libssh and libopenbsd-compat should be built with the same sanitizer opts. 2CXX=clang++-3.9 3FUZZ_FLAGS=-fsanitize=address,undefined -fsanitize-coverage=edge 4FUZZ_LIBS=-lFuzzer 5 6CXXFLAGS=-O2 -g -Wall -Wextra -I ../../.. $(FUZZ_FLAGS) 7LDFLAGS=-L ../../.. -L ../../../openbsd-compat -g $(FUZZ_FLAGS) 8LIBS=-lssh -lopenbsd-compat -lcrypto $(FUZZ_LIBS) 9 10all: pubkey_fuzz sig_fuzz authopt_fuzz 11 12.cc.o: 13 $(CXX) $(CXXFLAGS) -c $< -o $@ 14 15pubkey_fuzz: pubkey_fuzz.o 16 $(CXX) -o $@ pubkey_fuzz.o $(LDFLAGS) $(LIBS) 17 18sig_fuzz: sig_fuzz.o 19 $(CXX) -o $@ sig_fuzz.o $(LDFLAGS) $(LIBS) 20 21authopt_fuzz: authopt_fuzz.o 22 $(CXX) -o $@ authopt_fuzz.o ../../../auth-options.o $(LDFLAGS) $(LIBS) 23 24clean: 25 -rm -f *.o pubkey_fuzz sig_fuzz authopt_fuzz 26