# Makefile generated by imake - do not edit!
# $XConsortium: imake.c,v 1.51 89/12/12 12:37:30 jim Exp $
#
# The cpp used on this machine replaces all newlines and multiple tabs and
# spaces in a macro expansion with a single space.  Imake tries to compensate
# for this, but is not always successful.
#

SHELL=/bin/sh
MAKESHELL=/bin/sh

TOP = ../../.
CWD = ./ctelnet/telnet
CONFIGSRC = ${TOP}/config
DESTDIR=

IRULESRC = $(CONFIGSRC)

UTILDIR=$(TOP)/util/bin/
IMAKE= imake
IFLAGS= -I$(IRULESRC)
XTOP=$(TOP)/third/common/X11R4
XIFLAGS= -I$(XTOP)/config -DTOPDIR=$(XTOP) -DCURDIR=$(CWD)

ICONFIGFILE = ${IRULESRC}/Imake.tmpl ${IRULESRC}/Imake.rules \
	${IRULESRC}/site.def Imakefile
MKDIRHIER= sh $(IRULESRC)/mkdirhier.sh

ATHVERS = ${IRULESRC}/update.conf

ATHBASEDIR=/usr/athena

ATHLIBDIR=$(ATHBASEDIR)/lib
ATHBINDIR=$(ATHBASEDIR)/bin
ATHINCDIR=$(ATHBASEDIR)/include
ATHETCDIR=$(ATHBASEDIR)/etc
ATHCONFDIR=/etc/athena
ATHMANDIR=$(ATHBASEDIR)/man
ATHRBINDIR=/bin/athena
ATHRETCDIR=/etc/athena

ATHNEWDIR=$(ATHBINDIR)

ATHXAPPDIR=/usr/athena/lib/X11/app-defaults
ATHXBITDIR=/usr/athena/lib/X11/bitmaps
ATHXINCDIR=/usr/athena/include
ATHXLIBDIR=/usr/athena/lib

AFSDIR=$(TOP)/third/common/afs/@sys/dest

LINTCFLAG=-C
LINTFLAGS=$(DEFINES) -I/usr/athena/include

INSTALL=$(UTILDIR)install -c
RANLIB=ranlib
CC=cc
LD=cc
AS=as
RM=rm -f
CDEBUG=-O2

CLIENT=-DCLIENT

SERVER=-DSERVER

CFLAGS=$(CDEBUG)  $(CLIENT) $(SERVER) $(DEFINES) -I/usr/athena/include
LDFLAGS= $(LDDEFS)
LDPATH=-L$(ATHLIBDIR)
LDLIBS=

all::
install:: install_dirs
install_dirs::
install::
install.man::

clean::
depend::

FRC::

###########################################################################
# Project inclusion
###########################################################################

###########################################################################
# start of Imakefile
###########################################################################

ODEFS=-g -I../../include -DKRB4 -DAUTHENTICATION -DENCRYPTION -DDES_ENCRYPTION -DCHARON

DEFINES=-I.. -I/usr/5include ${ODEFS} -DSTREAMS -DUSE_TERMIO -DLINEMODE -DKLUDGELINEMODE -DDIAGNOSTICS
TERMLIB=/usr/5lib/libcurses.a -lhesiod

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 $< > $@

all:: ktelnet
ktelnet:: ${OBJS}
	$(LD)  $(LDFLAGS) -o ktelnet ${OBJS} $(LDPATH) ${LIBS} $(LDLIBS)
clean::
	$(RM) ktelnet

install::
	$(INSTALL) -s  ktelnet $(DESTDIR)/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`

Makefile:: $(ICONFIGFILE)
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(IFLAGS) $(IPROJ) -DNEWTOP=$(TOP) -DNEWCWD=$(CWD)

XMakefile::
	-@if [ -f Makefile ]; then \
	echo "  $(RM) Makefile.bak; mv Makefile Makefile.bak"; \
	$(RM) Makefile.bak; mv Makefile Makefile.bak; \
	else exit 0; fi
	$(IMAKE) $(XIFLAGS)

clean::
	rm -f *~ *.o *.a core a.out

Makefiles::

###########################################################################
# dependencies generated by makedepend

