aboutsummaryrefslogtreecommitdiff
path: root/lib/libtelnet/Makefile
diff options
context:
space:
mode:
authorMark Murray <markm@FreeBSD.org>2003-07-16 20:59:15 +0000
committerMark Murray <markm@FreeBSD.org>2003-07-16 20:59:15 +0000
commit4afa3718327563c785b2961410b6ea85d6ddf3ca (patch)
treed0941cea5c5d555255e1721af0d195e7b1148f6a /lib/libtelnet/Makefile
parent48719ca7c8b9bb38fd2816dc06af05479c4491e2 (diff)
downloadsrc-4afa3718327563c785b2961410b6ea85d6ddf3ca.tar.gz
src-4afa3718327563c785b2961410b6ea85d6ddf3ca.zip
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.
Notes
Notes: svn path=/head/; revision=117675
Diffstat (limited to 'lib/libtelnet/Makefile')
-rw-r--r--lib/libtelnet/Makefile36
1 files changed, 16 insertions, 20 deletions
diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile
index 542a2615290e..4ee31fb46985 100644
--- a/lib/libtelnet/Makefile
+++ b/lib/libtelnet/Makefile
@@ -1,33 +1,29 @@
# From: @(#)Makefile 8.2 (Berkeley) 12/15/93
# $FreeBSD$
+TELNETDIR= ${.CURDIR}/../../contrib/telnet
+.PATH: ${TELNETDIR}/libtelnet
+
LIB= telnet
INTERNALLIB= yes
SRCS= genget.c getent.c misc.c
+CFLAGS+= -I${TELNETDIR}
WARNS?= 2
-unifdef:
- -cd ${.CURDIR} ; \
- ( for i in *.[ch] ; do \
- unifdef -UAUTHENTICATION -UENCRYPTION \
- ${.CURDIR}/../../crypto/telnet/libtelnet/$$i \
- > ${.CURDIR}/$$i ; \
- echo $$i ; \
- done )
+.if !defined(NO_CRYPTO)
+SRCS+= encrypt.c auth.c enc_des.c sra.c pk.c
+CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DSRA
+.if !defined(NO_KERBEROS)
+SRCS+= kerberos5.c
+CFLAGS+= -DKRB5 -I${KRB5DIR}/lib/krb5 -I${KRB5OBJDIR} -I${ASN1OBJDIR}
+CFLAGS+= -DFORWARD -Dnet_write=telnet_net_write
+.endif
+.endif
+
+INCS= ${TELNETDIR}/arpa/telnet.h
+INCSDIR= ${INCLUDEDIR}/arpa
.include <bsd.lib.mk>
-
-#
-# Remove obsolete shared libraries, if any. We don't bother moving them
-# to /usr/lib/compat, since they were only used by telnet, telnetd and
-# tn3270.
-#
-beforeinstall: __remove-stale-libs
-__remove-stale-libs: .PHONY
-.if exists(${DESTDIR}${SHLIBDIR}/lib${LIB}.so.2.0)
- -chflags noschg ${DESTDIR}${SHLIBDIR}/lib${LIB}.so.2.0
- rm -f ${DESTDIR}${SHLIBDIR}/lib${LIB}.so.2.0
-.endif