xref: /freebsd-13.1/secure/lib/libssh/Makefile (revision 317a38ab)
1c23e256eSMark Murray# $FreeBSD$
2c23e256eSMark Murray
3c6063d0dSWarner Losh.include <src.opts.mk>
4a0880129SEd Maste.include "${SRCTOP}/secure/ssh.mk"
5e1fe3dbaSRuslan Ermilov
6c23e256eSMark MurrayLIB=	ssh
70b2766bdSDag-Erling SmørgravPRIVATELIB=	true
83ca3047aSKen SmithSHLIB_MAJOR=	5
9*317a38abSEd MasteSRCS=	ssh_api.c ssherr.c \
10*317a38abSEd Maste	sshbuf.c sshkey.c sshbuf-getput-basic.c \
11ba681bc9SJohn Baldwin	sshbuf-misc.c sshbuf-getput-crypto.c krl.c bitmap.c
12190cef3dSDag-Erling SmørgravSRCS+=	authfd.c authfile.c \
13bc5531deSDag-Erling Smørgrav	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
144f52dfbbSDag-Erling Smørgrav	cipher-ctr.c cleanup.c \
15*317a38abSEd Maste	compat.c fatal.c hostfile.c \
16*317a38abSEd Maste	log.c match.c moduli.c nchan.c packet.c \
17*317a38abSEd Maste	readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c \
18*317a38abSEd Maste	atomicio.c dispatch.c mac.c misc.c utf8.c \
19*317a38abSEd Maste	monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-ecdsa-sk.c \
20*317a38abSEd Maste	ssh-ed25519-sk.c ssh-rsa.c dh.c \
21f7167e0eSDag-Erling Smørgrav	msg.c progressmeter.c dns.c entropy.c umac.c umac128.c \
22bc5531deSDag-Erling Smørgrav	ssh-pkcs11.c smult_curve25519_ref.c \
23*317a38abSEd Maste	poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-libcrypto.c \
24*317a38abSEd Maste	ssh-ed25519.c digest-openssl.c digest-libc.c \
25*317a38abSEd Maste	hmac.c sc25519.c ge25519.c fe25519.c ed25519.c verify.c hash.c \
26bc5531deSDag-Erling Smørgrav	kex.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
27*317a38abSEd Maste	kexgexc.c kexgexs.c \
28*317a38abSEd Maste	kexsntrup761x25519.c sntrup761.c kexgen.c \
29*317a38abSEd Maste	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
30*317a38abSEd Maste	sshbuf-io.c
31*317a38abSEd MasteSRCS+=	ssh-sk-client.c
32*317a38abSEd Maste
330bd7d22eSBaptiste DaroussinPACKAGE=	ssh
3440e0db94SDag-Erling Smørgrav
3540e0db94SDag-Erling Smørgrav# gss-genr.c should be in $SRCS but causes linking problems, so it is
3640e0db94SDag-Erling Smørgrav# compiled directly into sshd instead.
3740e0db94SDag-Erling Smørgrav
38f0b56c5cSDag-Erling Smørgrav# Portability layer
3947dd1d1bSDag-Erling SmørgravSRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
402a01feabSEd Maste	fmt_scaled.c freezero.c glob.c \
412a01feabSEd Maste	libressl-api-compat.c \
422a01feabSEd Maste	openssl-compat.c port-net.c \
43*317a38abSEd Maste	recallocarray.c strtonum.c timingsafe_bcmp.c vis.c xcrypt.c
444d56bc23SDag-Erling Smørgrav
459cfa8b3fSDag-Erling Smørgrav.if ${MK_LDNS} == "no"
469cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname.c
479cfa8b3fSDag-Erling Smørgrav.else
48b71fb1a4SEnji CooperLDNSDIR=	${SRCTOP}/contrib/ldns
499cfa8b3fSDag-Erling SmørgravCFLAGS+=	-DHAVE_LDNS=1 -I${LDNSDIR}
509cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname-ldns.c
51ee5a34ecSBaptiste DaroussinLIBADD+=	ldns
52c23e256eSMark Murray.endif
53c23e256eSMark Murray
5494ef145eSEnji Cooper.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
550085282bSDag-Erling SmørgravCFLAGS+= -include krb5_config.h
56e42070a7SBryan DrewerySRCS+=	 krb5_config.h
57e6a64a84SBjoern A. Zeeb.endif
58e6a64a84SBjoern A. Zeeb
591f474190SStefan Eßer.if defined(LOCALBASE)
601f474190SStefan EßerCFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
611f474190SStefan Eßer.endif
621f474190SStefan Eßer
63ab7a2947SRuslan ErmilovNO_LINT=
64dcb22793SDavid E. O'Brien
65ee5a34ecSBaptiste DaroussinLIBADD+=	crypto crypt z
66e47a40e7SRuslan Ermilov
67c23e256eSMark Murray.include <bsd.lib.mk>
68b8cba406SRuslan Ermilov
69f0b56c5cSDag-Erling Smørgrav.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
70