1# $FreeBSD$ 2 3.include <src.opts.mk> 4 5TELNETDIR= ${.CURDIR}/../../contrib/telnet 6.PATH: ${TELNETDIR}/telnet 7 8PROG= telnet 9 10SRCS= commands.c main.c network.c ring.c sys_bsd.c \ 11 telnet.c terminal.c utilities.c 12 13CFLAGS+= -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DOPIE \ 14 -I${TELNETDIR} -I${TELNETDIR}/libtelnet/ 15 16NO_PIE= yes 17 18.if ${MK_INET6_SUPPORT} != "no" 19CFLAGS+= -DINET6 20.endif 21 22WARNS?= 2 23 24LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a 25 26DPADD= ${LIBTERMCAPW} ${LIBTELNET} 27LDADD= -ltermcapw ${LIBTELNET} 28 29.if !defined(RELEASE_CRUNCH) 30CFLAGS+= -DIPSEC 31DPADD+= ${LIBIPSEC} 32LDADD+= -lipsec 33.else 34.PATH: ${TELNETDIR}/libtelnet 35SRCS+= genget.c getent.c misc.c 36CFLAGS+= -DHAS_CGETENT 37.endif 38 39.if ${MK_OPENSSL} != "no" 40SRCS+= authenc.c 41CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DIPSEC 42DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBIPSEC} ${LIBPAM} 43LDADD+= -lmp -lcrypto -lcrypt -lipsec ${MINUSLPAM} 44.endif 45 46.if ${MK_KERBEROS_SUPPORT} != "no" 47CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write 48DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN} 49LDADD+= -lkrb5 -lhx509 -lasn1 -lcom_err -lroken 50.endif 51 52.include <bsd.prog.mk> 53