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