summaryrefslogtreecommitdiffstats
path: root/usr.bin/telnet/Makefile
diff options
context:
space:
mode:
authormarkm <markm@FreeBSD.org>2003-07-16 20:59:15 +0000
committermarkm <markm@FreeBSD.org>2003-07-16 20:59:15 +0000
commitd6aec2b6d60b4b7b11a4a51d8a87a963e942803c (patch)
treed0941cea5c5d555255e1721af0d195e7b1148f6a /usr.bin/telnet/Makefile
parent23022fa9406006dadd2eafdf36b94c737d737135 (diff)
downloadFreeBSD-src-d6aec2b6d60b4b7b11a4a51d8a87a963e942803c.zip
FreeBSD-src-d6aec2b6d60b4b7b11a4a51d8a87a963e942803c.tar.gz
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.
Diffstat (limited to 'usr.bin/telnet/Makefile')
-rw-r--r--usr.bin/telnet/Makefile27
1 files changed, 16 insertions, 11 deletions
diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile
index a8c8351..817a725 100644
--- a/usr.bin/telnet/Makefile
+++ b/usr.bin/telnet/Makefile
@@ -1,12 +1,15 @@
# $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${.CURDIR}/../../lib -I${.CURDIR}/../../lib/libtelnet/
+ -I${TELNETDIR} -I${TELNETDIR}/libtelnet/
.if exists(${.OBJDIR}/../../lib/libtelnet)
LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
@@ -22,19 +25,21 @@ CFLAGS+= -DINET6 -DIPSEC
DPADD+= ${LIBIPSEC}
LDADD+= -lipsec
.else
-.PATH: ${.CURDIR}/../../lib/libtelnet
-# XXX This was copied from lib/libtelnet/Makefile.
+.PATH: ${TELNETDIR}/libtelnet
SRCS+= genget.c getent.c misc.c
CFLAGS+= -DHAS_CGETENT
.endif
-unifdef:
- -cd ${.CURDIR} ; \
- ( for i in *.[ch] ; do \
- unifdef -UAUTHENTICATION -UENCRYPTION \
- ${.CURDIR}/../../crypto/telnet/telnet/$$i \
- > ${.CURDIR}/$$i ; \
- echo $$i ; \
- done )
+.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>
OpenPOWER on IntegriCloud