xref: /freebsd/secure/lib/libssh/Makefile (revision 0fdf8fae8b569bf9fff3b5171e669dcd7cf9c79e)
1c6063d0dSWarner Losh.include <src.opts.mk>
29d63429fSEd Maste.include "${SRCTOP}/secure/ssh.mk"
3e1fe3dbaSRuslan Ermilov
4c23e256eSMark MurrayLIB=	ssh
50b2766bdSDag-Erling SmørgravPRIVATELIB=	true
63ca3047aSKen SmithSHLIB_MAJOR=	5
71c99af1eSEd MasteSRCS=	ssh_api.c ssherr.c \
8f448c3edSGuido Falsi	sshbuf.c sshkey.c sshbuf-getput-basic.c \
9ba681bc9SJohn Baldwin	sshbuf-misc.c sshbuf-getput-crypto.c krl.c bitmap.c
10190cef3dSDag-Erling SmørgravSRCS+=	authfd.c authfile.c \
11bc5531deSDag-Erling Smørgrav	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
1238a52bd3SEd Maste	cleanup.c \
1319261079SEd Maste	compat.c fatal.c hostfile.c \
1419261079SEd Maste	log.c match.c moduli.c nchan.c packet.c \
1519261079SEd Maste	readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c \
1619261079SEd Maste	atomicio.c dispatch.c mac.c misc.c utf8.c \
171c99af1eSEd Maste	monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-ecdsa-sk.c \
181c99af1eSEd Maste	ssh-ed25519-sk.c ssh-rsa.c dh.c \
19c0af3295SEd Maste	msg.c dns.c entropy.c umac.c umac128.c \
20bc5531deSDag-Erling Smørgrav	ssh-pkcs11.c smult_curve25519_ref.c \
2119261079SEd Maste	poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-libcrypto.c \
221c99af1eSEd Maste	ssh-ed25519.c digest-openssl.c digest-libc.c \
23f374ba41SEd Maste	hmac.c ed25519.c hash.c \
24*0fdf8faeSEd Maste	kex.c kex-names.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
2519261079SEd Maste	kexgexc.c kexgexs.c \
2619261079SEd Maste	kexsntrup761x25519.c sntrup761.c kexgen.c \
2719261079SEd Maste	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
2819261079SEd Maste	sshbuf-io.c
291c99af1eSEd MasteSRCS+=	ssh-sk-client.c
301c99af1eSEd Maste
310bd7d22eSBaptiste DaroussinPACKAGE=	ssh
3240e0db94SDag-Erling Smørgrav
3340e0db94SDag-Erling Smørgrav# gss-genr.c should be in $SRCS but causes linking problems, so it is
3440e0db94SDag-Erling Smørgrav# compiled directly into sshd instead.
3540e0db94SDag-Erling Smørgrav
36f0b56c5cSDag-Erling Smørgrav# Portability layer
3747dd1d1bSDag-Erling SmørgravSRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
382a01feabSEd Maste	fmt_scaled.c freezero.c glob.c \
392a01feabSEd Maste	libressl-api-compat.c \
404d3fc8b0SEd Maste	mktemp.c \
412a01feabSEd Maste	openssl-compat.c port-net.c \
4219261079SEd Maste	recallocarray.c strtonum.c timingsafe_bcmp.c vis.c xcrypt.c
434d56bc23SDag-Erling Smørgrav
449cfa8b3fSDag-Erling Smørgrav.if ${MK_LDNS} == "no"
459cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname.c
469cfa8b3fSDag-Erling Smørgrav.else
47b71fb1a4SEnji CooperLDNSDIR=	${SRCTOP}/contrib/ldns
489cfa8b3fSDag-Erling SmørgravCFLAGS+=	-DHAVE_LDNS=1 -I${LDNSDIR}
499cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname-ldns.c
50ee5a34ecSBaptiste DaroussinLIBADD+=	ldns
51c23e256eSMark Murray.endif
52c23e256eSMark Murray
5394ef145eSEnji Cooper.if ${MK_GSSAPI} != "no" && ${MK_KERBEROS_SUPPORT} != "no"
540085282bSDag-Erling SmørgravCFLAGS+= -include krb5_config.h
55e42070a7SBryan DrewerySRCS+=	 krb5_config.h
56e6a64a84SBjoern A. Zeeb.endif
57e6a64a84SBjoern A. Zeeb
581f474190SStefan Eßer.if defined(LOCALBASE)
591f474190SStefan EßerCFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
601f474190SStefan Eßer.endif
611f474190SStefan Eßer
62ab7a2947SRuslan ErmilovNO_LINT=
63dcb22793SDavid E. O'Brien
64ee5a34ecSBaptiste DaroussinLIBADD+=	crypto crypt z
65e47a40e7SRuslan Ermilov
66c23e256eSMark Murray.include <bsd.lib.mk>
67b8cba406SRuslan Ermilov
68f0b56c5cSDag-Erling Smørgrav.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
69