freebsd-dev/usr.bin/telnet/Makefile
Bryan Drewery 864c53ead8 In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.
This is currently an opt-in build flag. Once ASLR support is ready and stable
it should changed to opt-out and be enabled by default along with ASLR.

Each application Makefile uses opt-out to ensure that ASLR will be enabled by
default in new directories when the system is compiled with PIE/ASLR. [2]

Mark known build failures as NO_PIE for now.

The only known runtime failure was rtld.

[1] http://www.bsdcan.org/2014/schedule/events/452.en.html
Submitted by:		Shawn Webb <lattera@gmail.com>
Discussed between:	des@ and Shawn Webb [2]
2014-06-08 17:29:31 +00:00

53 lines
1.1 KiB
Makefile

# $FreeBSD$
.include <src.opts.mk>
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/
NO_PIE= yes
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
WARNS?= 2
LIBTELNET= ${.OBJDIR}/../../lib/libtelnet/libtelnet.a
DPADD= ${LIBTERMCAP} ${LIBTELNET}
LDADD= -ltermcap ${LIBTELNET}
.if !defined(RELEASE_CRUNCH)
CFLAGS+= -DIPSEC
DPADD+= ${LIBIPSEC}
LDADD+= -lipsec
.else
.PATH: ${TELNETDIR}/libtelnet
SRCS+= genget.c getent.c misc.c
CFLAGS+= -DHAS_CGETENT
.endif
.if ${MK_OPENSSL} != "no"
SRCS+= authenc.c
CFLAGS+= -DENCRYPTION -DAUTHENTICATION -DIPSEC
DPADD+= ${LIBMP} ${LIBCRYPTO} ${LIBCRYPT} ${LIBIPSEC} ${LIBPAM}
LDADD+= -lmp -lcrypto -lcrypt -lipsec ${MINUSLPAM}
.endif
.if ${MK_KERBEROS_SUPPORT} != "no"
CFLAGS+= -DKRB5 -DFORWARD -Dnet_write=telnet_net_write
DPADD+= ${LIBKRB5} ${LIBHX509} ${LIBASN1} ${LIBCOM_ERR} ${LIBROKEN}
LDADD+= -lkrb5 -lhx509 -lasn1 -lcom_err -lroken
.endif
.include <bsd.prog.mk>