xref: /freebsd/secure/lib/libssh/Makefile (revision caf6fbd81a21a5bd5fac57a0163582bbc8968920)
1# $FreeBSD$
2
3.include <bsd.own.mk>
4
5LIB=	ssh
6SHLIB_MAJOR=	5
7SRCS=	authfd.c authfile.c bufaux.c bufbn.c buffer.c \
8	canohost.c channels.c cipher.c cipher-aes.c \
9	cipher-bf1.c cipher-ctr.c cipher-3des1.c cleanup.c \
10	compat.c compress.c crc32.c deattack.c fatal.c hostfile.c \
11	krl.c log.c match.c md-sha256.c moduli.c nchan.c packet.c \
12	readpass.c rsa.c ttymodes.c xmalloc.c addrmatch.c \
13	atomicio.c key.c dispatch.c kex.c mac.c uidswap.c uuencode.c misc.c \
14	monitor_fdpass.c rijndael.c ssh-dss.c ssh-ecdsa.c ssh-rsa.c dh.c \
15	kexdh.c kexgex.c kexdhc.c kexgexc.c bufec.c kexecdh.c kexecdhc.c \
16	msg.c progressmeter.c dns.c entropy.c umac.c umac128.c jpake.c \
17	schnorr.c ssh-pkcs11.c
18
19# gss-genr.c should be in $SRCS but causes linking problems, so it is
20# compiled directly into sshd instead.
21
22# Portability layer
23SRCS+=	bsd-misc.c fmt_scaled.c getrrsetbyname.c glob.c \
24	openssl-compat.c port-tun.c strtonum.c timingsafe_bcmp.c \
25	vis.c xcrypt.c xmmap.c
26
27.if defined(COMPAT_GETADDRINFO)
28SRCS+=	getaddrinfo.c getnameinfo.c name6.c rcmd.c bindresvport.c
29.endif
30
31CFLAGS+= -I${SSHDIR} -include ssh_namespace.h
32DPADD=	${LIBZ}
33LDADD=	-lz
34
35.if ${MK_KERBEROS_SUPPORT} != "no"
36CFLAGS+= -DGSSAPI -DHAVE_GSSAPI_GSSAPI_H=1 -DKRB5 -DHEIMDAL
37DPADD+=	${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBMD} ${LIBROKEN}
38LDADD+=	-lgssapi -lkrb5 -lhx509 -lasn1 -lcom_err -lmd -lroken
39.endif
40
41.if ${MK_OPENSSH_NONE_CIPHER} != "no"
42CFLAGS+= -DNONE_CIPHER_ENABLED
43.endif
44
45NO_LINT=
46
47DPADD+=	${LIBCRYPTO} ${LIBCRYPT}
48LDADD+=	-lcrypto -lcrypt
49
50.include <bsd.lib.mk>
51
52.PATH: ${SSHDIR} ${SSHDIR}/openbsd-compat
53
54${OBJS} ${POBJS} ${SOBJS}: ssh_namespace.h
55