1# $OpenBSD: Makefile.inc,v 1.9 2016/11/01 13:43:27 tb Exp $ 2 3.include <bsd.own.mk> 4.include <bsd.obj.mk> 5 6# enable warnings 7WARNINGS=Yes 8 9DEBUG=-g 10CFLAGS+= -fstack-protector-all 11CDIAGFLAGS= -Wall 12CDIAGFLAGS+= -Wextra 13CDIAGFLAGS+= -Werror 14CDIAGFLAGS+= -Wchar-subscripts 15CDIAGFLAGS+= -Wcomment 16CDIAGFLAGS+= -Wformat 17CDIAGFLAGS+= -Wformat-security 18CDIAGFLAGS+= -Wimplicit 19CDIAGFLAGS+= -Winline 20CDIAGFLAGS+= -Wmissing-declarations 21CDIAGFLAGS+= -Wmissing-prototypes 22CDIAGFLAGS+= -Wparentheses 23CDIAGFLAGS+= -Wpointer-arith 24CDIAGFLAGS+= -Wreturn-type 25CDIAGFLAGS+= -Wshadow 26CDIAGFLAGS+= -Wsign-compare 27CDIAGFLAGS+= -Wstrict-aliasing 28CDIAGFLAGS+= -Wstrict-prototypes 29CDIAGFLAGS+= -Wswitch 30CDIAGFLAGS+= -Wtrigraphs 31CDIAGFLAGS+= -Wuninitialized 32CDIAGFLAGS+= -Wunused 33.if ${COMPILER_VERSION} == "gcc4" 34CDIAGFLAGS+= -Wpointer-sign 35CDIAGFLAGS+= -Wold-style-definition 36.endif 37 38SSHREL=../../../../../usr.bin/ssh 39 40CFLAGS+=-I${.CURDIR}/../test_helper -I${.CURDIR}/${SSHREL} 41 42.if exists(${.CURDIR}/../test_helper/${__objdir}) 43LDADD+=-L${.CURDIR}/../test_helper/${__objdir} -ltest_helper 44DPADD+=${.CURDIR}/../test_helper/${__objdir}/libtest_helper.a 45.else 46LDADD+=-L${.CURDIR}/../test_helper -ltest_helper 47DPADD+=${.CURDIR}/../test_helper/libtest_helper.a 48.endif 49 50.if exists(${.CURDIR}/${SSHREL}/lib/${__objdir}) 51LDADD+=-L${.CURDIR}/${SSHREL}/lib/${__objdir} -lssh 52LIBSSH=${.CURDIR}/${SSHREL}/lib/${__objdir}/libssh.a 53.else 54LDADD+=-L${.CURDIR}/${SSHREL}/lib -lssh 55LIBSSH=${.CURDIR}/${SSHREL}/lib/libssh.a 56.endif 57DPADD+=${LIBSSH} 58${PROG}: ${LIBSSH} 59${LIBSSH}: 60 cd ${.CURDIR}/${SSHREL} && ${MAKE} lib 61 62LDADD+= -lcrypto 63DPADD+= ${LIBCRYPTO} 64