xref: /freebsd/crypto/openssh/regress/misc/sk-dummy/Makefile (revision 8e28d84935f2f0ee081d44f9803f3052b960e50b)
1*8e28d849SEd Maste#	$OpenBSD: Makefile,v 1.3 2023/01/15 23:35:10 djm Exp $
2*8e28d849SEd Maste
3*8e28d849SEd Maste.include <bsd.own.mk>
4*8e28d849SEd Maste.include <bsd.obj.mk>
5*8e28d849SEd Maste
6*8e28d849SEd MastePROG=	sk-dummy.so
7*8e28d849SEd MasteNOMAN=
8*8e28d849SEd Maste
9*8e28d849SEd MasteSSHREL=../../../../../usr.bin/ssh
10*8e28d849SEd Maste.PATH: ${.CURDIR}/${SSHREL}
11*8e28d849SEd Maste
12*8e28d849SEd MasteSRCS=sk-dummy.c
13*8e28d849SEd Maste# From usr.bin/ssh
14*8e28d849SEd MasteSRCS+=ed25519.c hash.c
15*8e28d849SEd MasteOPENSSL?=	yes
16*8e28d849SEd Maste
17*8e28d849SEd MasteCFLAGS+=	-fPIC
18*8e28d849SEd Maste
19*8e28d849SEd Maste.if (${OPENSSL:L} == "yes")
20*8e28d849SEd MasteCFLAGS+=	-DWITH_OPENSSL
21*8e28d849SEd Maste.endif
22*8e28d849SEd Maste
23*8e28d849SEd Maste# enable warnings
24*8e28d849SEd MasteWARNINGS=Yes
25*8e28d849SEd Maste
26*8e28d849SEd MasteDEBUG=-g
27*8e28d849SEd MasteCFLAGS+=	-fstack-protector-all
28*8e28d849SEd MasteCDIAGFLAGS=	-Wall
29*8e28d849SEd MasteCDIAGFLAGS+=	-Wextra
30*8e28d849SEd MasteCDIAGFLAGS+=	-Werror
31*8e28d849SEd MasteCDIAGFLAGS+=	-Wchar-subscripts
32*8e28d849SEd MasteCDIAGFLAGS+=	-Wcomment
33*8e28d849SEd MasteCDIAGFLAGS+=	-Wformat
34*8e28d849SEd MasteCDIAGFLAGS+=	-Wformat-security
35*8e28d849SEd MasteCDIAGFLAGS+=	-Wimplicit
36*8e28d849SEd MasteCDIAGFLAGS+=	-Winline
37*8e28d849SEd MasteCDIAGFLAGS+=	-Wmissing-declarations
38*8e28d849SEd MasteCDIAGFLAGS+=	-Wmissing-prototypes
39*8e28d849SEd MasteCDIAGFLAGS+=	-Wparentheses
40*8e28d849SEd MasteCDIAGFLAGS+=	-Wpointer-arith
41*8e28d849SEd MasteCDIAGFLAGS+=	-Wreturn-type
42*8e28d849SEd MasteCDIAGFLAGS+=	-Wshadow
43*8e28d849SEd MasteCDIAGFLAGS+=	-Wsign-compare
44*8e28d849SEd MasteCDIAGFLAGS+=	-Wstrict-aliasing
45*8e28d849SEd MasteCDIAGFLAGS+=	-Wstrict-prototypes
46*8e28d849SEd MasteCDIAGFLAGS+=	-Wswitch
47*8e28d849SEd MasteCDIAGFLAGS+=	-Wtrigraphs
48*8e28d849SEd MasteCDIAGFLAGS+=	-Wuninitialized
49*8e28d849SEd MasteCDIAGFLAGS+=	-Wunused
50*8e28d849SEd MasteCDIAGFLAGS+=	-Wno-unused-parameter
51*8e28d849SEd Maste.if ${COMPILER_VERSION:L} != "gcc3"
52*8e28d849SEd MasteCDIAGFLAGS+=	-Wold-style-definition
53*8e28d849SEd Maste.endif
54*8e28d849SEd Maste
55*8e28d849SEd MasteCFLAGS+=-I${.CURDIR}/${SSHREL}
56*8e28d849SEd Maste
57*8e28d849SEd Maste.if (${OPENSSL:L} == "yes")
58*8e28d849SEd MasteLDADD+= -lcrypto
59*8e28d849SEd MasteDPADD+= ${LIBCRYPTO}
60*8e28d849SEd Maste.endif
61*8e28d849SEd Maste
62*8e28d849SEd Maste$(PROG): $(OBJS)
63*8e28d849SEd Maste	$(CC) $(LDFLAGS) -shared -o $@ $(OBJS) $(LDADD)
64*8e28d849SEd Maste
65*8e28d849SEd Maste.include <bsd.prog.mk>
66*8e28d849SEd Maste
67