xref: /original-bsd/usr.bin/telnet/Makefile (revision c3e32dec)
1#
2# Copyright (c) 1990 The Regents of the University of California.
3# All rights reserved.
4#
5# %sccs.include.redist.sh%
6#
7#	@(#)Makefile	8.1 (Berkeley) 06/06/93
8#
9
10PROG=	telnet
11
12CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DAUTHENTICATION -DENCRYPTION
13CFLAGS+=-DENV_HACK
14CFLAGS+=-I${.CURDIR}/../../lib
15
16CFLAGS+= -DKRB4
17
18LDADD=	-ltermcap -ltelnet
19LDADD+=	-lkrb -ldes
20DPADD=	${LIBTERMCAP}
21
22SRCS=	authenc.c commands.c main.c network.c ring.c sys_bsd.c telnet.c \
23	terminal.c tn3270.c utilities.c
24
25# These are the sources that have encryption stuff in them.
26CRYPT_SRC= authenc.c commands.c externs.h main.c network.c
27CRYPT_SRC+= ring.c ring.h telnet.c terminal.c utilities.c Makefile
28NOCRYPT_DIR=${.CURDIR}/Nocrypt
29
30.include <bsd.prog.mk>
31
32nocrypt:
33#ifdef	ENCRYPTION
34	@for i in ${CRYPT_SRC}; do \
35	    if [ ! -d ${NOCRYPT_DIR} ]; then \
36		echo Creating subdirectory ${NOCRYPT_DIR}; \
37		mkdir ${NOCRYPT_DIR}; \
38	    fi; \
39	    echo ${NOCRYPT_DIR}/$$i; \
40	    unifdef -UENCRYPTION ${.CURDIR}/$$i | \
41		sed "s/ || defined(ENCRYPTION)//" > ${NOCRYPT_DIR}/$$i; \
42	done
43
44placeholder:
45#else	/* ENCRYPTION */
46	@echo "Encryption code already removed."
47#endif	/* ENCRYPTION */
48