2017-04-17 11:02:31 +00:00
|
|
|
# $OpenBSD: Makefile.inc,v 1.10 2017/04/17 11:02:31 jsg Exp $
|
2014-05-15 05:17:15 +00:00
|
|
|
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
.include <bsd.obj.mk>
|
|
|
|
|
|
|
|
# enable warnings
|
|
|
|
WARNINGS=Yes
|
|
|
|
|
|
|
|
DEBUG=-g
|
|
|
|
CFLAGS+= -fstack-protector-all
|
|
|
|
CDIAGFLAGS= -Wall
|
|
|
|
CDIAGFLAGS+= -Wextra
|
|
|
|
CDIAGFLAGS+= -Werror
|
|
|
|
CDIAGFLAGS+= -Wchar-subscripts
|
|
|
|
CDIAGFLAGS+= -Wcomment
|
|
|
|
CDIAGFLAGS+= -Wformat
|
|
|
|
CDIAGFLAGS+= -Wformat-security
|
|
|
|
CDIAGFLAGS+= -Wimplicit
|
|
|
|
CDIAGFLAGS+= -Winline
|
|
|
|
CDIAGFLAGS+= -Wmissing-declarations
|
|
|
|
CDIAGFLAGS+= -Wmissing-prototypes
|
|
|
|
CDIAGFLAGS+= -Wparentheses
|
|
|
|
CDIAGFLAGS+= -Wpointer-arith
|
|
|
|
CDIAGFLAGS+= -Wreturn-type
|
|
|
|
CDIAGFLAGS+= -Wshadow
|
|
|
|
CDIAGFLAGS+= -Wsign-compare
|
|
|
|
CDIAGFLAGS+= -Wstrict-aliasing
|
|
|
|
CDIAGFLAGS+= -Wstrict-prototypes
|
|
|
|
CDIAGFLAGS+= -Wswitch
|
|
|
|
CDIAGFLAGS+= -Wtrigraphs
|
|
|
|
CDIAGFLAGS+= -Wuninitialized
|
|
|
|
CDIAGFLAGS+= -Wunused
|
2017-04-17 11:02:31 +00:00
|
|
|
.if ${COMPILER_VERSION:L} != "gcc3"
|
2015-01-23 21:21:23 +00:00
|
|
|
CDIAGFLAGS+= -Wpointer-sign
|
2014-05-15 05:17:15 +00:00
|
|
|
CDIAGFLAGS+= -Wold-style-definition
|
|
|
|
.endif
|
|
|
|
|
|
|
|
SSHREL=../../../../../usr.bin/ssh
|
|
|
|
|
|
|
|
CFLAGS+=-I${.CURDIR}/../test_helper -I${.CURDIR}/${SSHREL}
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/../test_helper/${__objdir})
|
|
|
|
LDADD+=-L${.CURDIR}/../test_helper/${__objdir} -ltest_helper
|
|
|
|
DPADD+=${.CURDIR}/../test_helper/${__objdir}/libtest_helper.a
|
|
|
|
.else
|
|
|
|
LDADD+=-L${.CURDIR}/../test_helper -ltest_helper
|
|
|
|
DPADD+=${.CURDIR}/../test_helper/libtest_helper.a
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir})
|
|
|
|
LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh
|
2016-09-28 20:09:52 +00:00
|
|
|
LIBSSH=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a
|
2014-05-15 05:17:15 +00:00
|
|
|
.else
|
|
|
|
LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh
|
2016-09-28 20:09:52 +00:00
|
|
|
LIBSSH=${.CURDIR}/${SSHREL}/lib/libssh.a
|
2014-05-15 05:17:15 +00:00
|
|
|
.endif
|
2016-09-28 20:09:52 +00:00
|
|
|
DPADD+=${LIBSSH}
|
|
|
|
${PROG}: ${LIBSSH}
|
|
|
|
${LIBSSH}:
|
|
|
|
cd ${.CURDIR}/${SSHREL} && ${MAKE} lib
|
2014-05-15 05:17:15 +00:00
|
|
|
|
|
|
|
LDADD+= -lcrypto
|
|
|
|
DPADD+= ${LIBCRYPTO}
|