xref: /freebsd/secure/lib/libssh/Makefile (revision d15f2551b25f79ddcbe289faa95e655100b952da)
1.include <src.opts.mk>
2.include "${SRCTOP}/secure/ssh.mk"
3
4LIB=	ssh
5PRIVATELIB=	true
6SHLIB_MAJOR=	5
7
8LIBOPENSSH_SRCS=\
9	ssh_api.c \
10	ssherr.c \
11	sshbuf.c \
12	sshkey.c \
13	sshbuf-getput-basic.c \
14	sshbuf-misc.c \
15	sshbuf-getput-crypto.c \
16	krl.c \
17	bitmap.c
18
19# gss-genr.c should be in $SRCS but causes linking problems, so it is
20# compiled directly into sshd instead.
21SRCS=	${LIBOPENSSH_SRCS} \
22	authfd.c authfile.c \
23	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
24	cleanup.c \
25	compat.c fatal.c hostfile.c \
26	log.c match.c moduli.c nchan.c packet.c \
27	readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c \
28	atomicio.c dispatch.c mac.c misc.c utf8.c \
29	monitor_fdpass.c rijndael.c ssh-ecdsa.c ssh-ecdsa-sk.c \
30	ssh-ed25519-sk.c ssh-rsa.c dh.c \
31	msg.c dns.c entropy.c umac.c umac128.c \
32	ssh-pkcs11.c smult_curve25519_ref.c \
33	poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-libcrypto.c \
34	ssh-ed25519.c digest-openssl.c digest-libc.c \
35	libcrux-mlkem-mldsa.c ssh-mldsa-eddsa.c \
36	hmac.c ed25519.c ed25519-openssl.c \
37	kex.c kex-names.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
38	kexgexc.c kexgexs.c \
39	kexsntrup761x25519.c kexmlkem768x25519.c sntrup761.c kexgen.c \
40	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
41	sshbuf-io.c misc-agent.c ssherr-libcrypto.c
42
43# Add ${SKSRCS} to avoid linking problems.
44SRCS+=	${SKSRCS}
45
46PACKAGE=	ssh
47
48# Portability layer
49SRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
50	fmt_scaled.c freezero.c glob.c \
51	libressl-api-compat.c \
52	mktemp.c \
53	openssl-compat.c port-net.c \
54	recallocarray.c strtonum.c timingsafe_bcmp.c vis.c xcrypt.c
55
56.if ${MK_LDNS} == "no"
57SRCS+=	getrrsetbyname.c
58.else
59LDNSDIR=	${SRCTOP}/contrib/ldns
60CFLAGS+=	-I${LDNSDIR}
61SRCS+=	getrrsetbyname-ldns.c
62LIBADD+=	ldns
63.endif
64
65.if defined(LOCALBASE)
66CFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
67.endif
68
69NO_LINT=
70
71LIBADD+=	crypto crypt z
72
73.include <bsd.lib.mk>
74
75.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
76