xref: /original-bsd/usr.bin/telnet/Makefile (revision f874cf45)
186bbe572Sborman#
22cd0b9fbSdab# Copyright (c) 1990 The Regents of the University of California.
32cd0b9fbSdab# All rights reserved.
486bbe572Sborman#
5eb76ab8cSdab# %sccs.include.redist.sh%
686bbe572Sborman#
7*f874cf45Sbostic#	@(#)Makefile	8.1 (Berkeley) 06/06/93
886bbe572Sborman#
92cd0b9fbSdab
102eeaed23SbosticPROG=	telnet
112cd0b9fbSdab
126af5d437SdabCFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DAUTHENTICATION -DENCRYPTION
130f6e9217SdabCFLAGS+=-DENV_HACK
14708f44adSdabCFLAGS+=-I${.CURDIR}/../../lib
152cd0b9fbSdab
162cd0b9fbSdabCFLAGS+= -DKRB4
172cd0b9fbSdab
182cd0b9fbSdabLDADD=	-ltermcap -ltelnet
192cd0b9fbSdabLDADD+=	-lkrb -ldes
202eeaed23SbosticDPADD=	${LIBTERMCAP}
2186bbe572Sborman
222cd0b9fbSdabSRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
232cd0b9fbSdab	terminal.c tn3270.c utilities.c
2472b2cfe0Sminshall
250a4f15c7Sdab# These are the sources that have encryption stuff in them.
260a4f15c7SdabCRYPT_SRC= authenc.c commands.c externs.h main.c network.c
270a4f15c7SdabCRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile
280a4f15c7SdabNOCRYPT_DIR=${.CURDIR}/Nocrypt
290a4f15c7Sdab
302eeaed23Sbostic.include <bsd.prog.mk>
310a4f15c7Sdab
320a4f15c7Sdabnocrypt:
330a4f15c7Sdab#ifdef	ENCRYPTION
340a4f15c7Sdab	@for i in ${CRYPT_SRC}; do \
350a4f15c7Sdab	    if [ ! -d ${NOCRYPT_DIR} ]; then \
360a4f15c7Sdab		echo Creating subdirectory ${NOCRYPT_DIR}; \
370a4f15c7Sdab		mkdir ${NOCRYPT_DIR}; \
380a4f15c7Sdab	    fi; \
390a4f15c7Sdab	    echo ${NOCRYPT_DIR}/$$i; \
400a4f15c7Sdab	    unifdef -UENCRYPTION ${.CURDIR}/$$i | \
410a4f15c7Sdab		sed "s/ || defined(ENCRYPTION)//" > ${NOCRYPT_DIR}/$$i; \
420a4f15c7Sdab	done
430a4f15c7Sdab
440a4f15c7Sdabplaceholder:
450a4f15c7Sdab#else	/* ENCRYPTION */
460a4f15c7Sdab	@echo "Encryption code already removed."
470a4f15c7Sdab#endif	/* ENCRYPTION */
48