SRCDIR = ../..
include $(SRCDIR)/Make.Rules

TIFFSRCDIR	= .
JPEGDIR	= $(SRCDIR)/jpeg
ZIPDIR	= $(SRCDIR)/zlib
PORT	= ../port

#
# VERSION:	v3.4033
# DATE:		Tue Oct 29 23:07:23 EST 1996
# TARGET:	i586-unknown-linux
# CCOMPILER:	/usr/bin/gcc
#

#
# If JPEG support is to be included and the Independent JPEG
# Software distribution is not installed then DIR_JPEG must
# refer to the directory where the include files reside.
#
# Similarly, if the libgz distribution is not installed, then
# DIR_LIBGZ must refer to the directory where the include files
# are located.  Note that recent versions 
#
IPATH	= -I. -I${TIFFSRCDIR} -I${JPEGDIR} -I${ZIPDIR}
#
# To enable JPEG support include -DJPEG_SUPPORT here.
# To enable Deflate support add a -DZIP_SUPPORT here.
# Note that where the configure script is used these defines
# are automatically setup when JPEG/ZIP is set to "yes".
#
# Otherwise, consult tiffconf.h for information on controlling
# the configuration of optional library support.
#
CONF_LIBRARY=\
	 -DJPEG_SUPPORT \
	-DZIP_SUPPORT \
	${NULL}

CFLAGS	+= ${IPATH} ${CONF_LIBRARY}

ARLIB = libtiff.a

OBJS	= \
	tif_aux.o \
	tif_close.o \
	tif_codec.o \
	tif_compress.o \
	tif_dir.o \
	tif_dirinfo.o \
	tif_dirread.o \
	tif_dirwrite.o \
	tif_dumpmode.o \
	tif_error.o \
	tif_fax3.o \
	tif_fax3sm.o \
	tif_getimage.o \
	tif_jpeg.o \
	tif_flush.o \
	tif_lzw.o \
	tif_next.o \
	tif_open.o \
	tif_packbits.o \
	tif_pixarlog.o \
	tif_predict.o \
	tif_print.o \
	tif_read.o \
	tif_swab.o \
	tif_strip.o \
	tif_thunder.o \
	tif_tile.o \
	tif_unix.o \
	tif_version.o \
	tif_warning.o \
	tif_write.o \
	tif_zip.o \
	${NULL}
TARGETS	= libtiff.a

all:	${TARGETS}

MAJOR = 3
MINOR = 4
PATCH = 33

SHBASE=tiff

#${OBJS}: ${TIFFSRCDIR}/tiffio.h ${TIFFSRCDIR}/tiff.h ${TIFFSRCDIR}/tif_dir.h
#${OBJS}: ${TIFFSRCDIR}/tiffcomp.h ${TIFFSRCDIR}/tiffiop.h ${TIFFSRCDIR}/tiffconf.h

ALPHA	= .././dist/tiff.alpha 
VERSION	= .././VERSION 

version.h: ${VERSION} ${ALPHA} ${TIFFSRCDIR}/mkversion.c
	${CC} -o mkversion ${CFLAGS} ${TIFFSRCDIR}/mkversion.c
	rm -f version.h; ./mkversion -v ${VERSION} -a ${ALPHA} version.h
tif_version.o: version.h

#
# The finite state machine tables used by the G3/G4 decoders
# are generated by the mkg3states program.  On systems without
# make these rules have to be manually carried out.
#
tif_fax3sm.c: ${TIFFSRCDIR}/mkg3states.c ${TIFFSRCDIR}/tif_fax3.h
	${CC} -o mkg3states ${CFLAGS} ${TIFFSRCDIR}/mkg3states.c
	rm -f tif_fax3sm.c; ./mkg3states -c const tif_fax3sm.c


HDRS = tiff.h tiffio.h

include $(SRCDIR)/Make.Targets
