freebsd-dev/usr.bin/telnet/Makefile
Mark Murray 4afa371832 Very big makeover in the way telnet, telnetd and libtelnet are built.
Previously, there were two copies of telnet; a non-crypto version
that lived in the usual places, and a crypto version that lived in
crypto/telnet/. The latter was built in a broken manner somewhat akin
to other "contribified" sources. This meant that there were 4 telnets
competing with each other at build time - KerberosIV, Kerberos5,
plain-old-secure and base. KerberosIV is no longer in the running, but
the other three took it in turns to jump all over each other during a
"make buildworld".

As the crypto issue has been clarified, and crypto _calls_ are not
a problem, crypto/telnet has been repo-copied to contrib/telnet,
and with this commit, all telnets are now "contribified". The contrib
path was chosen to not destroy history in the repository, and differs
from other contrib/ entries in that it may be worked on as "normal"
BSD code. There is no dangerous crypto in these sources, only a
very weak system less strong than enigma(1).

Kerberos5 telnet and Secure telnet are now selected by using the usual
macros in /etc/make.conf, and the build process is unsurprising and
less treacherous.
2003-07-16 20:59:15 +00:00

46 lines
1.1 KiB
Makefile

# $FreeBSD$
TELNETDIR= ${.CURDIR}/../../contrib/telnet
.PATH: ${TELNETDIR}/telnet
PROG= telnet
SRCS= commands.c main.c network.c ring.c sys_bsd.c \
telnet.c terminal.c utilities.c
CFLAGS+= -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK -DOPIE \
-I${TELNETDIR} -I${TELNETDIR}/libtelnet/
.if exists(${.OBJDIR}/../../lib/libtelnet)
LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
.else
LIBTELNET= ${.CURDIR}/../../lib/libtelnet/libtelnet.a
.endif
DPADD= ${LIBTERMCAP} ${LIBTELNET}
LDADD= -ltermcap ${LIBTELNET}
.if !defined(RELEASE_CRUNCH)
CFLAGS+= -DINET6 -DIPSEC
DPADD+= ${LIBIPSEC}
LDADD+= -lipsec
.else
.PATH: ${TELNETDIR}/libtelnet
SRCS+= genget.c getent.c misc.c
CFLAGS+= -DHAS_CGETENT
.endif
.if !defined(NO_CRYPTO)
SRCS+= authenc.c
CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DIPSEC
DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBIPSEC} ${LIBPAM}
LDADD+= -lmp -lcrypto -lcrypt -lipsec ${MINUSLPAM}
.if !defined(NO_KERBEROS)
CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write
DPADD+= ${LIBKRB5} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
LDADD+= -lkrb5 -lasn1 -lcom_err -lroken
.endif
.endif
.include <bsd.prog.mk>