xref: /freebsd/secure/lib/libssh/Makefile (revision 9440aad19dca73fdd224b128ac2dc2e78191ff15)
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
7*9440aad1SJose Luis Duran
8*9440aad1SJose Luis DuranLIBOPENSSH_SRCS=\
9*9440aad1SJose Luis Duran	ssh_api.c \
10*9440aad1SJose Luis Duran	ssherr.c \
11*9440aad1SJose Luis Duran	sshbuf.c \
12*9440aad1SJose Luis Duran	sshkey.c \
13*9440aad1SJose Luis Duran	sshbuf-getput-basic.c \
14*9440aad1SJose Luis Duran	sshbuf-misc.c \
15*9440aad1SJose Luis Duran	sshbuf-getput-crypto.c \
16*9440aad1SJose Luis Duran	krl.c \
17*9440aad1SJose Luis Duran	bitmap.c
18*9440aad1SJose Luis Duran
19*9440aad1SJose Luis Duran# gss-genr.c should be in $SRCS but causes linking problems, so it is
20*9440aad1SJose Luis Duran# compiled directly into sshd instead.
21*9440aad1SJose Luis DuranSRCS=	${LIBOPENSSH_SRCS} \
22*9440aad1SJose Luis Duran	authfd.c authfile.c \
23bc5531deSDag-Erling Smørgrav	canohost.c channels.c cipher.c cipher-aes.c cipher-aesctr.c \
2438a52bd3SEd Maste	cleanup.c \
2519261079SEd Maste	compat.c fatal.c hostfile.c \
2619261079SEd Maste	log.c match.c moduli.c nchan.c packet.c \
2719261079SEd Maste	readpass.c ttymodes.c xmalloc.c addr.c addrmatch.c \
2819261079SEd Maste	atomicio.c dispatch.c mac.c misc.c utf8.c \
291c99af1eSEd Maste	monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-ecdsa-sk.c \
301c99af1eSEd Maste	ssh-ed25519-sk.c ssh-rsa.c dh.c \
31c0af3295SEd Maste	msg.c dns.c entropy.c umac.c umac128.c \
32bc5531deSDag-Erling Smørgrav	ssh-pkcs11.c smult_curve25519_ref.c \
3319261079SEd Maste	poly1305.c chacha.c cipher-chachapoly.c cipher-chachapoly-libcrypto.c \
341c99af1eSEd Maste	ssh-ed25519.c digest-openssl.c digest-libc.c \
35f374ba41SEd Maste	hmac.c ed25519.c hash.c \
360fdf8faeSEd Maste	kex.c kex-names.c kexdh.c kexgex.c kexecdh.c kexc25519.c \
3719261079SEd Maste	kexgexc.c kexgexs.c \
383d9fd9fcSEd Maste	kexsntrup761x25519.c kexmlkem768x25519.c sntrup761.c kexgen.c \
3919261079SEd Maste	sftp-realpath.c platform-pledge.c platform-tracing.c platform-misc.c \
4019261079SEd Maste	sshbuf-io.c
411c99af1eSEd MasteSRCS+=	ssh-sk-client.c
421c99af1eSEd Maste
430bd7d22eSBaptiste DaroussinPACKAGE=	ssh
4440e0db94SDag-Erling Smørgrav
45f0b56c5cSDag-Erling Smørgrav# Portability layer
4647dd1d1bSDag-Erling SmørgravSRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
472a01feabSEd Maste	fmt_scaled.c freezero.c glob.c \
482a01feabSEd Maste	libressl-api-compat.c \
494d3fc8b0SEd Maste	mktemp.c \
502a01feabSEd Maste	openssl-compat.c port-net.c \
5119261079SEd Maste	recallocarray.c strtonum.c timingsafe_bcmp.c vis.c xcrypt.c
524d56bc23SDag-Erling Smørgrav
539cfa8b3fSDag-Erling Smørgrav.if ${MK_LDNS} == "no"
549cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname.c
559cfa8b3fSDag-Erling Smørgrav.else
56b71fb1a4SEnji CooperLDNSDIR=	${SRCTOP}/contrib/ldns
57d71e7e57SEd MasteCFLAGS+=	-I${LDNSDIR}
589cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname-ldns.c
59ee5a34ecSBaptiste DaroussinLIBADD+=	ldns
60c23e256eSMark Murray.endif
61c23e256eSMark Murray
621f474190SStefan Eßer.if defined(LOCALBASE)
631f474190SStefan EßerCFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
641f474190SStefan Eßer.endif
651f474190SStefan Eßer
66ab7a2947SRuslan ErmilovNO_LINT=
67dcb22793SDavid E. O'Brien
68ee5a34ecSBaptiste DaroussinLIBADD+=	crypto crypt z
69e47a40e7SRuslan Ermilov
70c23e256eSMark Murray.include <bsd.lib.mk>
71b8cba406SRuslan Ermilov
72f0b56c5cSDag-Erling Smørgrav.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
73