xref: /netbsd-src/crypto/external/bsd/openssh/lib/Makefile (revision 6f51ed32a8ce4774bffecfdcb97eced63e7216e7)
1#	$NetBSD: Makefile,v 1.41 2024/10/02 21:21:26 christos Exp $
2
3.include <bsd.own.mk>
4
5.include "../Makefile.inc"
6
7CWARNFLAGS.clang+=	-Wno-error=sizeof-array-div
8CWARNFLAGS.clang+=	-Wno-error=format-nonliteral
9LIB=	ssh
10SRCS=\
11addr.c \
12addrmatch.c \
13atomicio.c \
14authfd.c \
15authfile.c \
16bcrypt_pbkdf.c \
17bitmap.c \
18blowfish.c \
19canohost.c \
20chacha.c \
21channels.c \
22cipher-chachapoly.c \
23cipher.c \
24cleanup.c \
25compat.c \
26dh.c \
27dispatch.c \
28dns.c \
29ed25519.c \
30fatal.c \
31freezero.c \
32hash.c \
33hmac.c \
34hostfile.c \
35kex.c \
36kex-names.c \
37kexdh.c \
38kexecdh.c \
39kexgen.c \
40kexgex.c \
41kexgexc.c \
42kexmlkem768x25519.c \
43kexsntrup761x25519.c \
44krl.c \
45log.c \
46mac.c \
47match.c \
48misc.c \
49monitor_fdpass.c \
50msg.c \
51nchan.c \
52packet.c \
53poly1305.c \
54progressmeter.c \
55readpass.c \
56recallocarray.c \
57smult_curve25519_ref.c \
58sntrup761.c \
59ssh-ed25519.c \
60ssh-ed25519-sk.c \
61ssh-pkcs11.c \
62ssh-sk-client.c \
63ssh-xmss.c \
64sshbuf-getput-basic.c \
65sshbuf-getput-crypto.c \
66sshbuf-misc.c \
67sshbuf-io.c \
68sshbuf.c \
69ssherr.c \
70sshkey-xmss.c \
71sshkey.c \
72ttymodes.c \
73uidswap.c \
74umac.c \
75umac128.c \
76utf8.c \
77xmalloc.c \
78xmss_commons.c \
79xmss_fast.c \
80xmss_hash.c \
81xmss_hash_address.c \
82xmss_wots.c
83
84OPENSSL_SRCS=\
85digest-openssl.c \
86kexc25519.c \
87ssh-dss.c \
88ssh-ecdsa.c \
89ssh-ecdsa-sk.c \
90ssh-rsa.c
91
92SRCS+=	fmt_scaled.c
93SRCS+=	readpassphrase.c getpeereid.c getrrsetbyname.c
94COPTS.monitor_fdpass.c+=-Wno-stack-protector
95COPTS.xmss_fast.c+=	-Wno-stack-protector
96COPTS.xmss_hash.c+=	-Wno-stack-protector
97COPTS.xmss_wots.c+=	-Wno-stack-protector
98COPTS.sntrup761.c+=	-Wno-stack-protector
99
100.if WITH_OPENSSL
101SRCS+=		${OPENSSL_SRCS}
102.else
103SRCS+=		digest-libc.c
104.endif
105
106CPPFLAGS+= -DHAVE_BLF_H
107
108CPPFLAGS+=	-I${SSHDIST}
109.PATH:		${SSHDIST}
110
111LIBDPLIBS+=	crypto	${NETBSDSRCDIR}/crypto/external/bsd/${EXTERNAL_OPENSSL_SUBDIR}/lib/libcrypto \
112		crypt	${NETBSDSRCDIR}/lib/libcrypt \
113		z	${NETBSDSRCDIR}/lib/libz
114
115.for f in dns channels hostfile ssh-pkcs11
116COPTS.${f}.c+=	-Wno-pointer-sign
117.endfor
118
119# XXX
120COPTS.channels.c+=	-fno-strict-aliasing
121
122COPTS.hostfile.c+=	${CC_WNO_FORMAT_TRUNCATION}
123COPTS.sshkey.c+=	${CC_WNO_FORMAT_TRUNCATION}
124COPTS.cipher.c+=	-Wno-error=deprecated-declarations
125COPTS.dh.c+=		-Wno-error=deprecated-declarations
126COPTS.kex.c+=		-Wno-error=deprecated-declarations
127COPTS.kexdh.c+=		-Wno-error=deprecated-declarations
128COPTS.kexecdh.c+=	-Wno-error=deprecated-declarations
129COPTS.kexgexc.c+=	-Wno-error=deprecated-declarations
130COPTS.ssh-dss.c+=	-Wno-error=deprecated-declarations
131COPTS.ssh-ecdsa-sk.c+=	-Wno-error=deprecated-declarations
132COPTS.ssh-ecdsa.c+=	-Wno-error=deprecated-declarations
133COPTS.ssh-pkcs11.c+=	-Wno-error=deprecated-declarations
134COPTS.ssh-rsa.c+=	-Wno-error=deprecated-declarations
135COPTS.sshbuf-getput-crypto.c+=	-Wno-error=deprecated-declarations
136COPTS.sshkey.c+=	-Wno-error=deprecated-declarations
137COPTS.umac.c+=		-Wno-error=deprecated-declarations
138COPTS.umac128.c+=	-Wno-error=deprecated-declarations
139COPTS.kexmlkem768x25519.c+=${${ACTIVE_CC} == "clang":? -Wno-error=missing-noreturn:}
140
141
142
143.include <bsd.lib.mk>
144