#
#    CPMIO: CP/M console emulation library
#    Copyright (C) 1998 - 1999, John Elliott <jce@seasip.demon.co.uk>
#
#    This library is free software; you can redistribute it and/or
#    modify it under the terms of the GNU Library General Public
#    License as published by the Free Software Foundation; either
#    version 2 of the License, or (at your option) any later version.
#
#    This library is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#    Library General Public License for more details.
#
#    You should have received a copy of the GNU Library General Public
#    License along with this library; if not, write to the Free
#    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

CC      = gcc
CFLAGS  = -Wall -I/usr/include/ncurses -DHAVE_NCURSES
OBJECTS = cpmio.o conbdos.o iosig.o termvt52.o termcore.o termansi.o
RANLIB  = ranlib
TAR     = tar zchvf

all: libcpmio.a testio

${OBJECTS}: cpmio.h cpmio_i.h termcore.h

libcpmio.a: ${OBJECTS}
	ar rc $@ ${OBJECTS}
	${RANLIB} $@

testio:	libcpmio.a testio.o cpmio.h
	${CC} -o testio testio.o -lncurses libcpmio.a -lreadline

clean:
	rm -f *.o testio libcpmio.a *~

archive: 
	${TAR} cpmio.tar.gz cpmio.h cpmio_i.h termcore.h \
		cpmio.c conbdos.c iosig.c termcore.c testio.c \
                termansi.c termvt52.c \
                Makefile Makefile.dj2 README COPYING.LIB

tar:	archive 

