summaryrefslogtreecommitdiff
path: root/crypto/external/bsd/openssh/lib/Makefile
blob: 068edcc856f9a99760925414245074ea16eac88a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#	$NetBSD: Makefile,v 1.36 2023/06/03 09:09:02 lukem Exp $

.include <bsd.own.mk>

.include "../Makefile.inc"

CWARNFLAGS.clang+=	-Wno-error=sizeof-array-div
CWARNFLAGS.clang+=	-Wno-error=format-nonliteral
LIB=	ssh
SRCS=\
addr.c \
addrmatch.c \
atomicio.c \
authfd.c \
authfile.c \
bcrypt_pbkdf.c \
bitmap.c \
blowfish.c \
canohost.c \
chacha.c \
channels.c \
cipher-chachapoly.c \
cipher.c \
cleanup.c \
compat.c \
dh.c \
dispatch.c \
dns.c \
ed25519.c \
fatal.c \
fe25519.c \
freezero.c \
ge25519.c \
hash.c \
hmac.c \
hostfile.c \
kex.c \
kexdh.c \
kexecdh.c \
kexgen.c \
kexgex.c \
kexgexc.c \
kexsntrup761x25519.c \
krl.c \
log.c \
mac.c \
match.c \
misc.c \
monitor_fdpass.c \
msg.c \
nchan.c \
packet.c \
poly1305.c \
progressmeter.c \
readpass.c \
recallocarray.c \
sc25519.c \
smult_curve25519_ref.c \
sntrup761.c \
ssh-ed25519.c \
ssh-ed25519-sk.c \
ssh-pkcs11.c \
ssh-sk-client.c \
ssh-xmss.c \
sshbuf-getput-basic.c \
sshbuf-getput-crypto.c \
sshbuf-misc.c \
sshbuf-io.c \
sshbuf.c \
ssherr.c \
sshkey-xmss.c \
sshkey.c \
ttymodes.c \
uidswap.c \
umac.c \
umac128.c \
utf8.c \
verify.c \
xmalloc.c \
xmss_commons.c \
xmss_fast.c \
xmss_hash.c \
xmss_hash_address.c \
xmss_wots.c

OPENSSL_SRCS=\
digest-openssl.c \
kexc25519.c \
ssh-dss.c \
ssh-ecdsa.c \
ssh-ecdsa-sk.c \
ssh-rsa.c

SRCS+=	fmt_scaled.c
SRCS+=	readpassphrase.c getpeereid.c getrrsetbyname.c
COPTS.monitor_fdpass.c+=-Wno-stack-protector
COPTS.xmss_fast.c+=	-Wno-stack-protector
COPTS.xmss_hash.c+=	-Wno-stack-protector
COPTS.xmss_wots.c+=	-Wno-stack-protector
COPTS.sntrup761.c+=	-Wno-stack-protector

.if WITH_OPENSSL
SRCS+=		${OPENSSL_SRCS}
.else
SRCS+=		digest-libc.c
.endif

CPPFLAGS+= -DHAVE_BLF_H

CPPFLAGS+=	-I${SSHDIST}
.PATH:		${SSHDIST}

LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
		crypt	${NETBSDSRCDIR}/lib/libcrypt \
		z	${NETBSDSRCDIR}/lib/libz

.for f in dns channels hostfile ssh-pkcs11
COPTS.${f}.c+=	-Wno-pointer-sign
.endfor

# XXX
COPTS.channels.c+=	-fno-strict-aliasing

# XXX
.if ${MACHINE} == "vax"
COPTS.poly1305.c+=	-O0
COPTS.umac.c+=		-O0
.endif

COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
COPTS.cipher.c+=	-Wno-error=deprecated-declarations
COPTS.dh.c+=		-Wno-error=deprecated-declarations
COPTS.kex.c+=		-Wno-error=deprecated-declarations
COPTS.kexdh.c+=		-Wno-error=deprecated-declarations
COPTS.kexecdh.c+=	-Wno-error=deprecated-declarations
COPTS.kexgexc.c+=	-Wno-error=deprecated-declarations
COPTS.ssh-dss.c+=	-Wno-error=deprecated-declarations
COPTS.ssh-ecdsa-sk.c+=	-Wno-error=deprecated-declarations
COPTS.ssh-ecdsa.c+=	-Wno-error=deprecated-declarations
COPTS.ssh-pkcs11.c+=	-Wno-error=deprecated-declarations
COPTS.ssh-rsa.c+=	-Wno-error=deprecated-declarations
COPTS.sshbuf-getput-crypto.c+=	-Wno-error=deprecated-declarations
COPTS.sshkey.c+=	-Wno-error=deprecated-declarations
COPTS.umac.c+=		-Wno-error=deprecated-declarations
COPTS.umac128.c+=	-Wno-error=deprecated-declarations

.include <bsd.lib.mk>