1# $FreeBSD: stable/10/libexec/telnetd/Makefile 321267 2017-07-20 00:52:11Z ngie $
2
3# Do not define -DKLUDGELINEMODE, as it does not interact well with many
4# telnet implementations.
5
6.include <bsd.own.mk>
7
8TELNETDIR=	${SRCTOP}/contrib/telnet
9.PATH:		${TELNETDIR}/telnetd
10
11PROG=		telnetd
12MAN=		telnetd.8
13
14SRCS=		global.c slc.c state.c sys_term.c telnetd.c \
15		termstat.c utility.c
16
17WARNS?=		2
18WFORMAT?=	0
19
20CFLAGS+=	-DLINEMODE -DUSE_TERMIO -DDIAGNOSTICS -DOLD_ENVIRON \
21		-DENV_HACK -DSTREAMSPTY
22
23.if ${MK_INET6_SUPPORT} != "no"
24CFLAGS+=	-DINET6
25.endif
26
27CFLAGS+=	-I${TELNETDIR}
28CFLAGS+=	-I${TELNETDIR}/telnet
29
30LIBTELNET=	${OBJTOP}/lib/libtelnet/libtelnet.a
31
32DPADD=		${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET}
33LDADD=		-lutil -ltermcap ${LIBTELNET}
34
35# XXX for src/release/picobsd
36.if !defined(RELEASE_CRUNCH)
37.if ${MK_OPENSSL} != "no"
38SRCS+=		authenc.c
39CFLAGS+=	-DAUTHENTICATION -DENCRYPTION
40DPADD+=		${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBPAM}
41LDADD+=		-lmp -lcrypto -lcrypt ${MINUSLPAM}
42.endif
43
44.if ${MK_KERBEROS_SUPPORT} != "no"
45CFLAGS+=	-DKRB5 -DFORWARD -Dnet_write=telnet_net_write
46DPADD+=		${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBROKEN} ${LIBCOM_ERR}
47LDADD+=		-lkrb5 -lhx509 -lasn1 -lroken -lcom_err
48.endif
49.endif
50
51.include <bsd.prog.mk>
52