/* 
 * Imakefile for telnet
 *
 * $Author: brlewis $
 * $Id: Imakefile,v 1.1 92/04/22 15:42:27 brlewis Exp Locker: brlewis $
 *
 * Copyright 1992 by the Massachusetts Institute of Technology.
 * For copying and distribution information, see the file
 * "mit-copyright.h".
 *
 */

ODEFS=-g -I../../include -DKRB4 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -DCHARON
#if defined(ULTRIX40)
DEFINES=-I.. ${ODEFS} -DUSE_TERMIO -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=-lcursesX
#else
#if defined(_AIX)
DEFINES=-I.. ${ODEFS} -Dunix -DUSE_TERMIO -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=-lcurses	/* only to get setupterm, ttytype */
#else
#if defined(ibm032)
DEFINES=-I.. -U__STDC__ ${ODEFS} -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=-lcurses -ltermlib
CC=gcc
LD=gcc
#else
#if defined(sun)
#if !defined(SOLARIS)
DEFINES=-I.. -I/usr/5include ${ODEFS} -DSTREAMS -DUSE_TERMIO -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=/usr/5lib/libcurses.a -lhesiod /* hesiod has right getservbyname */
#else
DEFINES=-I.. ${ODEFS} -Usun -DSTREAMS -DSVR4 -DUSE_TERMIO -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=/usr/ccs/lib/libcurses.a -lhesiod -lsocket -lnsl -lucb -lelf/* hesiod has right getservbyname */
#endif
#else
DEFINES=-I.. ${ODEFS} -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=-lterminfo
#endif /* sun */
#endif /* ibm032 */
#endif /* _AIX */
#endif /* ULTRIX40 */
LIBS=-L../libtelnet -ltelnet ../../lib/libcharon.a -lkrb -ldes ${TERMLIB}\
	-lcom_err

/**/#
/**/# Copyright (c) 1991 The Regents of the University of California.
/**/# All rights reserved.
/**/#
/**/# Redistribution and use in source and binary forms are permitted provided
/**/# that: (1) source distributions retain this entire copyright notice and
/**/# comment, and (2) distributions including binaries display the following
/**/# acknowledgement:  ``This product includes software developed by the
/**/# University of California, Berkeley and its contributors'' in the
/**/# documentation or other materials provided with the distribution and in
/**/# all advertising materials mentioning features or use of this software.
/**/# Neither the name of the University nor the names of its contributors may
/**/# be used to endorse or promote products derived from this software without
/**/# specific prior written permission.
/**/# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
/**/# WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
/**/# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
/**/#
/**/#	@(#)Makefile.generic	5.5 (Berkeley) 3/1/91
/**/#

INCLUDES= -I..
ARPA_TELNET= ../arpa/telnet.h

SRCS=	commands.c main.c network.c ring.c \
	sys_bsd.c telnet.c terminal.c \
	utilities.c ${GETOPT_SRC}

ALLHC=	${SRCS} \
	defines.h externs.h fdset.h general.h \
	ring.h types.h

OBJS=	authenc.o commands.o main.o network.o ring.o sys_bsd.o \
	telnet.o terminal.o utilities.o ${GETOPT_OBJ}
MAN=	telnet.0

#
# These next three lines are not needed in 4.4BSD
#
.SUFFIXES: .0 .1
.1.0:
	nroff -man -h $< > $@

SimpleProgram(ktelnet,${OBJS},${LIBS},/bin)

clean:: FRC
	rm -f ${OBJS} core errs l.errs telnet

cleandir: clean
	rm -f ${MAN} tags .depend

clist:	FRC ${SRCS}
	@for i in ${SRCS} ; \
		do (echo ${DIRPATH}$$i); done

hclist:	FRC ${ALLHC}
	@for i in ${ALLHC} ; \
		do (echo ${DIRPATH}$$i); done

lint: FRC ${SRCS}
	lint ${CFLAGS} `make clist`

tags: FRC ${SRCS}
	ctags `make hclist`
