include ../Make.Rules

SRCDIR	= .
JPEGDIR	= ../jpeg
ZIPDIR	= ../zlib
PORT	= .

#
# VERSION:	v3.4beta018
# DATE:		Thu Aug 17 23:02:18 EDT 1995
# TARGET:	i386-unknown-linux
# CCOMPILER:	/usr/bin/gcc
#

#
# If JPEG support is to be included and the Independent JPEG
# Software distribution is not installed then INC_JPEG will
# refer to the directory where the include files reside.
#
IPATH	= -I. -I${SRCDIR} -I${JPEGDIR} -I${ZIPDIR}
#
# To enable JPEG support (with the default configuration), include
# -DJPEG_SUPPORT here, setup the include search path above, and
# configure the tools to locate the appropriate libjpeg.  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_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}


all:	${TARGETS}

MAJOR = 3
MINOR = 4
PATCH = 18

SHBASE=tiff

SLDFLAGS = -L../jpeg -ljpeg -L../zlib -lgz

ALPHA	= ./ALPHA
VERSION	= ./VERSION

version.h: ${VERSION} ${ALPHA}
	VERSION=`cat ${VERSION}`; \
	VERSION="$${VERSION}`awk '{print $$3}' ${ALPHA}`"; \
	rm -f version.h; \
	echo '#define VERSION "LIBTIFF, Version' $$VERSION '\\nCopyright (c) 1988-1995 Sam Leffler\\nCopyright (c) 1991-1995 Silicon Graphics, Inc."' >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: ${SRCDIR}/mkg3states.c ${SRCDIR}/tif_fax3.h
	${CC} -o mkg3states ${CFLAGS} ${SRCDIR}/mkg3states.c
	rm -f tif_fax3sm.c; ./mkg3states -c const tif_fax3sm.c

HDRS	= tiff.h tiffio.h

include ../Make.Targets
