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