diff --git a/kerberos5/lib/libtelnet/Makefile b/kerberos5/lib/libtelnet/Makefile index d6f4031a411..35e936e8de4 100644 --- a/kerberos5/lib/libtelnet/Makefile +++ b/kerberos5/lib/libtelnet/Makefile @@ -2,6 +2,10 @@ LIB= telnet +INTERNALLIB= yes +INTERNALSTATICLIB=yes +NOPIC= yes + SRCS= genget.c getent.c misc.c encrypt.c auth.c kerberos.c \ enc_des.c pk.c sra.c @@ -9,9 +13,8 @@ CFLAGS+= -DHAS_CGETENT -DENCRYPTION -DDES_ENCRYPTION -DAUTHENTICATION \ -DKRB4 -DSRA -I${TELNETDIR} \ -I${KRB4DIR}/lib/krb -NOPIC= yes - -INCLUDES= ${TELNETDIR}/arpa/telnet.h +INCS= ${TELNETDIR}/arpa/telnet.h +INCDIR= /usr/include/arpa # # Remove obsolete shared libraries, if any. We don't bother moving them diff --git a/kerberos5/libexec/telnetd/Makefile b/kerberos5/libexec/telnetd/Makefile index 996add453bd..6b35fa4dffe 100644 --- a/kerberos5/libexec/telnetd/Makefile +++ b/kerberos5/libexec/telnetd/Makefile @@ -15,7 +15,7 @@ SRCS= global.c slc.c state.c sys_term.c telnetd.c \ DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBKRB} \ ${LIBCRYPT} ${LIBCOM_ERR} -LDADD= -lutil -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto \ +LDADD= -lutil -ltermcap ${LIBTELNET} -lcrypto \ -L${KRBOBJDIR} -lkrb -lcrypt -lcom_err -lmp .include diff --git a/kerberos5/usr.bin/telnet/Makefile b/kerberos5/usr.bin/telnet/Makefile index e3c97f58099..8189235f0d0 100644 --- a/kerberos5/usr.bin/telnet/Makefile +++ b/kerberos5/usr.bin/telnet/Makefile @@ -11,7 +11,7 @@ SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c \ DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBKRB} ${LIBCRYPT} \ ${LIBCOM_ERR} ${LIBIPSEC} -LDADD= -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto \ +LDADD= -ltermcap ${LIBTELNET} -lcrypto \ -L${KRBOBJDIR} -lkrb -lcrypt -lcom_err -lmp -lipsec .include diff --git a/kerberosIV/Makefile.inc b/kerberosIV/Makefile.inc index 76e419892e8..e4157926530 100644 --- a/kerberosIV/Makefile.inc +++ b/kerberosIV/Makefile.inc @@ -64,9 +64,9 @@ SLOBJDIR= ${.CURDIR}/../../lib/libsl .endif .if exists(${.OBJDIR}/../../lib/libtelnet) -TELNETOBJDIR= ${.OBJDIR}/../../lib/libtelnet +LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a .else -TELNETOBJDIR= ${.CURDIR}/../../lib/libtelnet +LIBTELNET= ${.CURDIR}/../../lib/libtelnet/libtelnet.a .endif CFLAGS+= -I${.CURDIR}/../../include -Wall -DHAVE_CONFIG_H \ diff --git a/kerberosIV/lib/libtelnet/Makefile b/kerberosIV/lib/libtelnet/Makefile index d6f4031a411..35e936e8de4 100644 --- a/kerberosIV/lib/libtelnet/Makefile +++ b/kerberosIV/lib/libtelnet/Makefile @@ -2,6 +2,10 @@ LIB= telnet +INTERNALLIB= yes +INTERNALSTATICLIB=yes +NOPIC= yes + SRCS= genget.c getent.c misc.c encrypt.c auth.c kerberos.c \ enc_des.c pk.c sra.c @@ -9,9 +13,8 @@ CFLAGS+= -DHAS_CGETENT -DENCRYPTION -DDES_ENCRYPTION -DAUTHENTICATION \ -DKRB4 -DSRA -I${TELNETDIR} \ -I${KRB4DIR}/lib/krb -NOPIC= yes - -INCLUDES= ${TELNETDIR}/arpa/telnet.h +INCS= ${TELNETDIR}/arpa/telnet.h +INCDIR= /usr/include/arpa # # Remove obsolete shared libraries, if any. We don't bother moving them diff --git a/kerberosIV/libexec/telnetd/Makefile b/kerberosIV/libexec/telnetd/Makefile index 996add453bd..6b35fa4dffe 100644 --- a/kerberosIV/libexec/telnetd/Makefile +++ b/kerberosIV/libexec/telnetd/Makefile @@ -15,7 +15,7 @@ SRCS= global.c slc.c state.c sys_term.c telnetd.c \ DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBKRB} \ ${LIBCRYPT} ${LIBCOM_ERR} -LDADD= -lutil -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto \ +LDADD= -lutil -ltermcap ${LIBTELNET} -lcrypto \ -L${KRBOBJDIR} -lkrb -lcrypt -lcom_err -lmp .include diff --git a/kerberosIV/usr.bin/telnet/Makefile b/kerberosIV/usr.bin/telnet/Makefile index e3c97f58099..8189235f0d0 100644 --- a/kerberosIV/usr.bin/telnet/Makefile +++ b/kerberosIV/usr.bin/telnet/Makefile @@ -11,7 +11,7 @@ SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c \ DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBKRB} ${LIBCRYPT} \ ${LIBCOM_ERR} ${LIBIPSEC} -LDADD= -ltermcap -L${TELNETOBJDIR} -ltelnet -lcrypto \ +LDADD= -ltermcap ${LIBTELNET} -lcrypto \ -L${KRBOBJDIR} -lkrb -lcrypt -lcom_err -lmp -lipsec .include diff --git a/lib/libtelnet/Makefile b/lib/libtelnet/Makefile index 9e791748797..8ee712971c5 100644 --- a/lib/libtelnet/Makefile +++ b/lib/libtelnet/Makefile @@ -2,9 +2,13 @@ # $FreeBSD$ LIB= telnet + +INTERNALLIB=yes +INTERNALSTATICLIB=yes +NOPIC= yes + SRCS= genget.c getent.c misc.c CFLAGS+= -DHAS_CGETENT -NOPIC= true # # Remove obsolete shared libraries, if any. We don't bother moving them diff --git a/libexec/telnetd/Makefile b/libexec/telnetd/Makefile index 20acad94933..f366f536072 100644 --- a/libexec/telnetd/Makefile +++ b/libexec/telnetd/Makefile @@ -9,8 +9,15 @@ CFLAGS+=-I${.CURDIR}/../../lib CFLAGS+=-DINET6 SRCS= global.c slc.c state.c sys_term.c telnetd.c \ termstat.c utility.c + +.if exists(${.OBJDIR}/../../lib/libtelnet) +LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a +.else +LIBTELNET= ${.CURDIR}/../../lib/libtelnet/libtelnet.a +.endif + DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} -LDADD= -lutil -ltermcap -ltelnet +LDADD= -lutil -ltermcap ${LIBTELNET} MAN= telnetd.8 .include diff --git a/secure/Makefile.inc b/secure/Makefile.inc index ca5d1f4b7d5..9770b35b07b 100644 --- a/secure/Makefile.inc +++ b/secure/Makefile.inc @@ -3,6 +3,11 @@ DISTRIBUTION?=crypto TELNETDIR= ${.CURDIR}/../../../crypto/telnet +.if exists(${.OBJDIR}/../../lib/libtelnet) +LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a +.else +LIBTELNET= ${.CURDIR}/../../lib/libtelnet/libtelnet.a +.endif .if exists(${.CURDIR}/../../lib/libcrypt/obj) CRYPTOBJDIR= ${.CURDIR}/../../lib/libcrypt/obj diff --git a/secure/lib/libtelnet/Makefile b/secure/lib/libtelnet/Makefile index 23a0d0e4380..10760d51b87 100644 --- a/secure/lib/libtelnet/Makefile +++ b/secure/lib/libtelnet/Makefile @@ -2,14 +2,16 @@ LIB= telnet +INTERNALLIB= yes +INTERNALSTATICLIB=yes +NOPIC= yes + SRCS= genget.c getent.c misc.c encrypt.c auth.c \ enc_des.c pk.c CFLAGS+= -DHAS_CGETENT -DENCRYPTION -DDES_ENCRYPTION -DAUTHENTICATION \ -I${TELNETDIR} -NOPIC= yes - INCS= ${TELNETDIR}/arpa/telnet.h INCDIR= /usr/include/arpa diff --git a/secure/libexec/telnetd/Makefile b/secure/libexec/telnetd/Makefile index 20ec331dc62..7dffb39d699 100644 --- a/secure/libexec/telnetd/Makefile +++ b/secure/libexec/telnetd/Makefile @@ -15,7 +15,7 @@ SRCS= global.c slc.c state.c sys_term.c telnetd.c \ DPADD= ${LIBUTIL} ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBMP} \ ${LIBCRYPT} -LDADD= -lutil -ltermcap -ltelnet -lcrypto -lcrypt -lmp +LDADD= -lutil -ltermcap ${LIBTELNET} -lcrypto -lcrypt -lmp .include diff --git a/secure/usr.bin/telnet/Makefile b/secure/usr.bin/telnet/Makefile index 0e9db53c08e..3e6aae23440 100644 --- a/secure/usr.bin/telnet/Makefile +++ b/secure/usr.bin/telnet/Makefile @@ -11,7 +11,7 @@ SRCS= authenc.c commands.c main.c network.c ring.c sys_bsd.c \ DPADD= ${LIBTERMCAP} ${LIBTELNET} ${LIBCRYPTO} ${LIBCRYPT} ${LIBMP} DPADD+= ${LIBIPSEC} -LDADD= -ltermcap -ltelnet -lcrypto -lcrypt -lmp +LDADD= -ltermcap ${LIBTELNET} -lcrypto -lcrypt -lmp LDADD+= -lipsec .include diff --git a/share/mk/bsd.libnames.mk b/share/mk/bsd.libnames.mk index b53af03ed26..87981809287 100644 --- a/share/mk/bsd.libnames.mk +++ b/share/mk/bsd.libnames.mk @@ -89,7 +89,6 @@ LIBSS?= ${DESTDIR}${LIBDIR}/libss.a LIBSSL?= ${DESTDIR}${LIBDIR}/libssl.a # XXX in secure dist, not base LIBSTDCPLUSPLUS?= ${DESTDIR}${LIBDIR}/libstdc++.a LIBTACPLUS?= ${DESTDIR}${LIBDIR}/libtacplus.a -LIBTELNET?= ${DESTDIR}${LIBDIR}/libtelnet.a LIBTERMCAP?= ${DESTDIR}${LIBDIR}/libtermcap.a LIBTERMLIB?= "don't use LIBTERMLIB, use LIBTERMCAP" LIBUTIL?= ${DESTDIR}${LIBDIR}/libutil.a diff --git a/usr.bin/telnet/Makefile b/usr.bin/telnet/Makefile index 7ff18c8da0c..0458220ca37 100644 --- a/usr.bin/telnet/Makefile +++ b/usr.bin/telnet/Makefile @@ -41,8 +41,14 @@ CFLAGS+=-DENV_HACK CFLAGS+=-DSKEY CFLAGS+=-I${.CURDIR}/../../lib +.if exists(${.OBJDIR}/../../lib/libtelnet) +LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a +.else +LIBTELNET= ${.CURDIR}/../../lib/libtelnet/libtelnet.a +.endif + DPADD= ${LIBTERMCAP} ${LIBTELNET} -LDADD= -ltermcap -ltelnet +LDADD= -ltermcap ${LIBTELNET} .if !defined(RELEASE_CRUNCH) CFLAGS+=-DINET6