head	1.1;
access;
symbols
	tn1:1.1;
locks
	kcozens:1.1; strict;
comment	@# @;


1.1
date	98.09.01.01.30.02;	author kcozens;	state Exp;
branches;
next	;


desc
@This is the Makefile for the telnet library.
@


1.1
log
@Initial revision
@
text
@include ../MakeVars
CFLAGS += -I..

SOURCE	= telnet-fsm.c telnet.c version.c
OFILES	= $(SOURCE:.c=.o)
DEST	= ../telnet.a

all: version.c $(OFILES)
	$(AR) $(DEST) $(OFILES)
	$(RANLIB) $(DEST)

clean:
	rm -f $(OFILES) $(DEST)

distclean: clean

#
# Primitive version system
#

version.c:
	@@if [ ! -f version.c ]; then \
		echo "ERROR: version.c is missing, please type \"make newversion\" to recreate"; \
		exit 1; \
	fi;

newversion:
	@@if [ ! -f .version -o ! -s .version ]; then \
		echo 0 >.version; \
	else \
		expr `cat .version` + 1 >.version; \
	fi
	@@date "+%a-%d-%b-%Y" >.date
	@@rm -f version.c
	@@echo \char* TELNETVERSION\=\"v1.`cat .version` `cat .date`\"\; >version.c
	@@echo "new telnet library version = \"v1.`cat .version` `cat .date`\""

@
