#
# Makefile for Sun Rasterfile and HDF conversion utilities
#
# 				NO WARRANTY
#  
#  This software is distributed free of charge and is in the public domain.
#  Anyone may use, duplicate or modify this program.  Thinking Machines
#  Corporation does not restrict in any way the use of this software by
#  anyone.
#  
#  Thinking Machines Corporation provides absolutely no warranty of any kind.
#  The entire risk as to the quality and performance of this program is with
#  you.  In no event will Thinking Machines Corporation be liable to you for
#  damages, including any lost profits, lost monies, or other special,
#  incidental or consequential damages arising out of the use of this program.
# 
# Jim Salem 9/26/89
# Please keep this notice with the file.
#
#------------------------------------------------------------------------------
# RCS: $Id: Makefile,v 2.1 90/08/01 11:37:22 salem Exp $
#------------------------------------------------------------------------------

CFLAGS= -g
RASLIBS= -lpixrect -ldf
TIFFLIBS= -ltiff -ldf
DESTS= hdf2ras ras2hdf hdf2tiff tiff2hdf
OBJS= hdf2ras.o ras2hdf.o hdf2tiff.o tiff2hdf.o
RASUTILS = rasutils.o utils.o
TIFFUTILS = tiffutils.o utils.o
SOURCES= README hdf2ras.c ras2hdf.c rasutils.c hdf2tiff.c tiff2hdf.c \
         tiffutils.c utils.c utils.h Makefile

all: $(DESTS)

hdf2ras: hdf2ras.c $(RASUTILS)
	$(CC) $(CFLAGS) hdf2ras.c $(RASUTILS) -o hdf2ras $(RASLIBS)

hdf2tiff: hdf2tiff.c $(TIFFUTILS)
	$(CC) $(CFLAGS) hdf2tiff.c $(TIFFUTILS) -o hdf2tiff $(TIFFLIBS)

ras2hdf: ras2hdf.c $(RASUTILS)
	$(CC) $(CFLAGS) ras2hdf.c $(RASUTILS) -o ras2hdf $(RASLIBS)

tiff2hdf: tiff2hdf.c $(TIFFUTILS)
	$(CC) $(CFLAGS) tiff2hdf.c $(TIFFUTILS) -o tiff2hdf $(TIFFLIBS)

clean:
	rm -f $(DESTS) $(OBJS) $(RASUTILS) $(TIFFUTILS)

checkin: 
	-ci -u $(SOURCES)

revision:
	co -l $(SOURCES)
	ci -u -f -r$(REV).0 -m"Bump to next release, no changes" $(SOURCES)
	rm -f PATCHLEVEL
	echo $REV | cat > PATCHLEVEL

shar:
	shar $(SOURCES) PATCHLEVEL > hdf_convert.shar
	compress < hdf_convert.shar > hdf_convert.shar.Z
