xref: /freebsd/secure/lib/libssh/Makefile (revision 480f4e946db51c7de558c4cd1ba3d88caeaceec8)
1# $FreeBSD$
2
3.include <src.opts.mk>
4
5LIB=	ssh
6PRIVATELIB=	true
7SHLIB_MAJOR=	5
8SRCS=	ssh_api.c ssherr.c sshbuf.c sshkey.c sshbuf-getput-basic.c \
9	sshbuf-misc.c sshbuf-getput-crypto.c krl.c bitmap.c
10SRCS+=	authfd.c authfile.c bufaux.c bufbn.c bufec.c buffer.c \
11	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
12	cipher-bf1.c cipher-ctr.c cipher-3des1.c cleanup.c \
13	compat.c crc32.c deattack.c fatal.c hostfile.c \
14	log.c match.c md-sha256.c moduli.c nchan.c packet.c opacket.c \
15	readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \
16	atomicio.c key.c dispatch.c mac.c uidswap.c uuencode.c misc.c \
17	monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \
18	msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \
19	ssh-pkcs11.c smult_curve25519_ref.c \
20	poly1305.c chacha.c cipher-chachapoly.c \
21	ssh-ed25519.c digest-openssl.c digest-libc.c hmac.c \
22	sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c blocks.c \
23	kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
24	kexdhc.c kexgexc.c kexecdhc.c kexc25519c.c \
25	kexdhs.c kexgexs.c kexecdhs.c kexc25519s.c \
26	platform-pledge.c
27
28# gss-genr.c should be in $SRCS but causes linking problems, so it is
29# compiled directly into sshd instead.
30
31# Portability layer
32SRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c explicit_bzero.c fmt_scaled.c \
33	glob.c openssl-compat.c port-tun.c realpath.c strtonum.c \
34	timingsafe_bcmp.c vis.c xcrypt.c xmmap.c
35
36.if ${MK_LDNS} == "no"
37SRCS+=	getrrsetbyname.c
38.else
39LDNSDIR=	${.CURDIR}/../../../contrib/ldns
40CFLAGS+=	-DHAVE_LDNS=1 -I${LDNSDIR}
41SRCS+=	getrrsetbyname-ldns.c
42LIBADD+=	ldns
43.endif
44
45CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
46SRCS+=	 ssh_namespace.h
47
48.if ${MK_KERBEROS_SUPPORT} != "no"
49CFLAGS+= -include krb5_config.h
50SRCS+=	 krb5_config.h
51.endif
52
53NO_LINT=
54
55LIBADD+=	crypto crypt z
56
57.include <bsd.lib.mk>
58
59.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
60