xref: /freebsd/secure/lib/libssh/Makefile (revision 4757b351ea9d59d71d4a38b82506d2d16fcd560d)
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
79440aad1SJose Luis Duran
89440aad1SJose Luis DuranLIBOPENSSH_SRCS=\
99440aad1SJose Luis Duran	ssh_api.c \
109440aad1SJose Luis Duran	ssherr.c \
119440aad1SJose Luis Duran	sshbuf.c \
129440aad1SJose Luis Duran	sshkey.c \
139440aad1SJose Luis Duran	sshbuf-getput-basic.c \
149440aad1SJose Luis Duran	sshbuf-misc.c \
159440aad1SJose Luis Duran	sshbuf-getput-crypto.c \
169440aad1SJose Luis Duran	krl.c \
179440aad1SJose Luis Duran	bitmap.c
189440aad1SJose Luis Duran
199440aad1SJose Luis Duran# gss-genr.c should be in $SRCS but causes linking problems, so it is
209440aad1SJose Luis Duran# compiled directly into sshd instead.
219440aad1SJose Luis DuranSRCS=	${LIBOPENSSH_SRCS} \
229440aad1SJose 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 Maste
42ac62b979SJose Luis Duran# Add ${SKSRCS} to avoid linking problems.
43ac62b979SJose Luis DuranSRCS+=	${SKSRCS}
44ac62b979SJose Luis Duran
450bd7d22eSBaptiste DaroussinPACKAGE=	ssh
4640e0db94SDag-Erling Smørgrav
47f0b56c5cSDag-Erling Smørgrav# Portability layer
4847dd1d1bSDag-Erling SmørgravSRCS+=	bcrypt_pbkdf.c blowfish.c bsd-misc.c bsd-signal.c explicit_bzero.c \
492a01feabSEd Maste	fmt_scaled.c freezero.c glob.c \
502a01feabSEd Maste	libressl-api-compat.c \
514d3fc8b0SEd Maste	mktemp.c \
522a01feabSEd Maste	openssl-compat.c port-net.c \
5319261079SEd Maste	recallocarray.c strtonum.c timingsafe_bcmp.c vis.c xcrypt.c
544d56bc23SDag-Erling Smørgrav
559cfa8b3fSDag-Erling Smørgrav.if ${MK_LDNS} == "no"
569cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname.c
579cfa8b3fSDag-Erling Smørgrav.else
58b71fb1a4SEnji CooperLDNSDIR=	${SRCTOP}/contrib/ldns
59d71e7e57SEd MasteCFLAGS+=	-I${LDNSDIR}
609cfa8b3fSDag-Erling SmørgravSRCS+=	getrrsetbyname-ldns.c
61ee5a34ecSBaptiste DaroussinLIBADD+=	ldns
62c23e256eSMark Murray.endif
63c23e256eSMark Murray
641f474190SStefan Eßer.if defined(LOCALBASE)
651f474190SStefan EßerCFLAGS+= -D_PATH_SSH_ASKPASS_DEFAULT='"${LOCALBASE}/bin/ssh-askpass"'
661f474190SStefan Eßer.endif
671f474190SStefan Eßer
68*4757b351SPierre ProncheryNO_LINT=
69*4757b351SPierre Pronchery
70ee5a34ecSBaptiste DaroussinLIBADD+=	crypto crypt z
71e47a40e7SRuslan Ermilov
72c23e256eSMark Murray.include <bsd.lib.mk>
73b8cba406SRuslan Ermilov
74f0b56c5cSDag-Erling Smørgrav.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
75