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