#	$Id: makefile,v 1.3 2001/03/09 18:32:11 pwessel Exp $
#	makefile for cps directory
#

#----------------- stop here - nothing to edit--------------------

include ../makegmt.macros

CFLAGS		= $(CC_OPT) $(WIN32)


all:		cpsencode cpsdecode

install:	all
		$(INSTALL) cpsencode$(EXE) $(bindir)
		$(INSTALL) cpsdecode$(EXE) $(bindir)

uninstall:
		\rm -f $(bindir)/cpsencode$(EXE)
		\rm -f $(bindir)/cpsdecode$(EXE)

spotless:	clean
		\rm -f *.a

clean:	
		rm -f *.o cpsencode$(EXE) cpsdecode$(EXE)

#-------------------------------------------------------------------------------
#       library
#-------------------------------------------------------------------------------

libuu.a:	libuu.o
		$(AR) cvr libuu.a $?
		$(RANLIB) libuu.a

cpsencode:	cpsencode.o libuu.a
		$(CC) $(CFLAGS) $(LDFLAGS) cpsencode.o -L. -luu -o cpsencode

cpsdecode:	cpsdecode.o libuu.a
		$(CC) $(CFLAGS) $(LDFLAGS) cpsdecode.o -L. -luu -o cpsdecode

.c.o:
		$(CC) -c $(CFLAGS) $<

cpsencode.c:	cps.h uu.h

cpsdecode.c:	cps.h uu.h
