summaryrefslogtreecommitdiff
path: root/regress/misc/sk-dummy/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'regress/misc/sk-dummy/Makefile')
-rw-r--r--regress/misc/sk-dummy/Makefile66
1 files changed, 66 insertions, 0 deletions
diff --git a/regress/misc/sk-dummy/Makefile b/regress/misc/sk-dummy/Makefile
new file mode 100644
index 000000000..29e313c82
--- /dev/null
+++ b/regress/misc/sk-dummy/Makefile
@@ -0,0 +1,66 @@
1# $OpenBSD: Makefile,v 1.2 2019/11/29 00:13:29 djm Exp $
2
3.include <bsd.own.mk>
4.include <bsd.obj.mk>
5
6PROG= sk-dummy.so
7NOMAN=
8
9SSHREL=../../../../../usr.bin/ssh
10.PATH: ${.CURDIR}/${SSHREL}
11
12SRCS=sk-dummy.c
13# From usr.bin/ssh
14SRCS+=ed25519.c hash.c ge25519.c fe25519.c sc25519.c verify.c
15OPENSSL?= yes
16
17CFLAGS+= -fPIC
18
19.if (${OPENSSL:L} == "yes")
20CFLAGS+= -DWITH_OPENSSL
21.endif
22
23# enable warnings
24WARNINGS=Yes
25
26DEBUG=-g
27CFLAGS+= -fstack-protector-all
28CDIAGFLAGS= -Wall
29CDIAGFLAGS+= -Wextra
30CDIAGFLAGS+= -Werror
31CDIAGFLAGS+= -Wchar-subscripts
32CDIAGFLAGS+= -Wcomment
33CDIAGFLAGS+= -Wformat
34CDIAGFLAGS+= -Wformat-security
35CDIAGFLAGS+= -Wimplicit
36CDIAGFLAGS+= -Winline
37CDIAGFLAGS+= -Wmissing-declarations
38CDIAGFLAGS+= -Wmissing-prototypes
39CDIAGFLAGS+= -Wparentheses
40CDIAGFLAGS+= -Wpointer-arith
41CDIAGFLAGS+= -Wreturn-type
42CDIAGFLAGS+= -Wshadow
43CDIAGFLAGS+= -Wsign-compare
44CDIAGFLAGS+= -Wstrict-aliasing
45CDIAGFLAGS+= -Wstrict-prototypes
46CDIAGFLAGS+= -Wswitch
47CDIAGFLAGS+= -Wtrigraphs
48CDIAGFLAGS+= -Wuninitialized
49CDIAGFLAGS+= -Wunused
50CDIAGFLAGS+= -Wno-unused-parameter
51.if ${COMPILER_VERSION:L} != "gcc3"
52CDIAGFLAGS+= -Wold-style-definition
53.endif
54
55CFLAGS+=-I${.CURDIR}/${SSHREL}
56
57.if (${OPENSSL:L} == "yes")
58LDADD+= -lcrypto
59DPADD+= ${LIBCRYPTO}
60.endif
61
62$(PROG): $(OBJS)
63 $(CC) $(LDFLAGS) -shared -o $@ $(OBJS) $(LDADD)
64
65.include <bsd.prog.mk>
66