1 # $OpenBSD: Makefile,v 1.1 2016/03/04 02:30:37 djm Exp $ 2 3 .include <bsd.own.mk> 4 .include <bsd.obj.mk> 5 6 # XXX detect from ssh binary? 7 SSH1?= no 8 OPENSSL?= yes 9 10 PROG= kexfuzz 11 SRCS= kexfuzz.c 12 NOMAN= 1 13 14 .if (${OPENSSL:L} == "yes") 15 CFLAGS+= -DWITH_OPENSSL 16 .else 17 # SSH v.1 requires OpenSSL. 18 SSH1= no 19 .endif 20 21 .if (${SSH1:L} == "yes") 22 CFLAGS+= -DWITH_SSH1 23 .endif 24 25 # enable warnings 26 WARNINGS=Yes 27 28 DEBUG=-g 29 CFLAGS+= -fstack-protector-all 30 CDIAGFLAGS= -Wall 31 CDIAGFLAGS+= -Wextra 32 CDIAGFLAGS+= -Werror 33 CDIAGFLAGS+= -Wchar-subscripts 34 CDIAGFLAGS+= -Wcomment 35 CDIAGFLAGS+= -Wformat 36 CDIAGFLAGS+= -Wformat-security 37 CDIAGFLAGS+= -Wimplicit 38 CDIAGFLAGS+= -Winline 39 CDIAGFLAGS+= -Wmissing-declarations 40 CDIAGFLAGS+= -Wmissing-prototypes 41 CDIAGFLAGS+= -Wparentheses 42 CDIAGFLAGS+= -Wpointer-arith 43 CDIAGFLAGS+= -Wreturn-type 44 CDIAGFLAGS+= -Wshadow 45 CDIAGFLAGS+= -Wsign-compare 46 CDIAGFLAGS+= -Wstrict-aliasing 47 CDIAGFLAGS+= -Wstrict-prototypes 48 CDIAGFLAGS+= -Wswitch 49 CDIAGFLAGS+= -Wtrigraphs 50 CDIAGFLAGS+= -Wuninitialized 51 CDIAGFLAGS+= -Wunused 52 .if ${COMPILER_VERSION} == "gcc4" 53 CDIAGFLAGS+= -Wpointer-sign 54 CDIAGFLAGS+= -Wold-style-definition 55 .endif 56 57 SSHREL=../../../../../usr.bin/ssh 58 59 CFLAGS+=-I${.CURDIR}/${SSHREL} 60 61 .if exists(${.CURDIR}/${SSHREL}/lib/${__objdir}) 62 LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh 63 DPADD+=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a 64 .else 65 LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh 66 DPADD+=${.CURDIR}/${SSHREL}/lib/libssh.a 67 .endif 68 69 LDADD+= -lutil -lz 70 DPADD+= ${LIBUTIL} ${LIBZ} 71 72 .if (${OPENSSL:L} == "yes") 73 LDADD+= -lcrypto 74 DPADD+= ${LIBCRYPTO} 75 .endif 76 77 .include <bsd.prog.mk> 78 79