#include "defines.imake"

  STD_DEFINES = StandardDefines -D$(WIDGETSET) \
		-I$(TIFFDIR) $(CONF_LIBRARY)

#
# Library-wide configuration defines:
#    MMAP_SUPPORT	add support for memory mapping read-only files
#    COLORIMETRY_SUPPORT add support for 6.0 colorimetry tags
#    JPEG_SUPPORT	add support for 6.0 JPEG tags & JPEG algorithms
#    YCBCR_SUPPORT	add support for 6.0 YCbCr tags
#    CMYK_SUPPORT	add support for 6.0 CMYK tags
#
# Compression configuration defines:
#    CCITT_SUPPORT	add support for CCITT Group 3 & 4 algorithms
#    PACKBITS_SUPPORT	add support for Macintosh PackBits algorithm
#    LZW_SUPPORT	add support for LZW algorithm
#    THUNDER_SUPPORT	add support for ThunderScan 4-bit RLE algorithm
#    NEXT_SUPPORT	add support for NeXT 2-bit RLE algorithm
#    JPEG_SUPPORT	add support for JPEG DCT algorithm
#
# Note that if you change the library-wide configuration, you'll
# need to manual force a full rebuild.  Changing the configuration
# of which compression algorithms are included in the library is
# automatically handled (i.e. tif_compress.o has a dependency on
# the Makefile).
#
NULL=

CONF_COMPRESSION=\
	-DPACKBITS_SUPPORT \
	-DLZW_SUPPORT \
	-DCCITT_SUPPORT \
	-DTHUNDER_SUPPORT  \
	-DNEXT_SUPPORT  \
	-DJPEG_SUPPORT \
	${NULL}

#
# ASSUMED VALUES IN TIFFCOMPAT.H:
# a couple lines of tiffcompat.h were modified to get this to work
# on sun's and sgi machines
#
ASSUMED_VALUES=\
	-DUSE_CONST=? \
	-DUSE_VARARGS=? \
	-DUSE_PROTOTYPES=?

CONF_LIBRARY=\
	-DHAVE_IEEEFP=1 \
	-DCOLORIMETRY_SUPPORT \
	-DYCBCR_SUPPORT \
	${NULL}

HEADERS=

SRCS=	\
	fax2tiff.c \
	gif2tiff.c \
	pal2rgb.c \
	ppm2tiff.c \
	rgb2ycbcr.c \
	tiff2bw.c \
	tiff2ps.c \
	tiffcmp.c \
	tiffcp.c \
	tiffdither.c \
	tiffdump.c \
	tiffinfo.c \
	tiffmedian.c \
	tiffsplit.c \
	ras2tiff.c \
	getopt.c

OBJS=	\
	fax2tiff.o \
	gif2tiff.o \
	pal2rgb.o \
	ppm2tiff.o \
	rgb2ycbcr.o \
	tiff2bw.o \
	tiff2ps.o \
	tiffcmp.o \
	tiffcp.o \
	tiffdither.o \
	tiffdump.o \
	tiffinfo.o \
	tiffmedian.o \
	tiffsplit.o \
	ras2tiff.o \
	getopt.o

        DEPLIBS =  getopt.o $(TIFFLIB)
LOCAL_LIBRARIES =  getopt.o $(TIFFLIB)
  SYS_LIBRARIES = -lm
    XTIFFDEPENDS = tiffinfo tiffcmp tiffcp tiffdump tiffmedian \
		   tiffsplit tiff2ps tiff2bw tiffdither fax2tiff \
		   gif2tiff ppm2tiff pal2rgb rgb2ycbcr

       XTIFFSRCS = tiffinfo.c tiffcmp.c tiffcp.c tiffdump.c tiffmedian.c \
		   tiffsplit.c tiff2ps.c tiff2bw.c tiffdither.c fax2tiff.c \
		   gif2tiff.c ppm2tiff.c pal2rgb.c rgb2ycbcr.c


AllTarget($(XTIFFDEPENDS))

NormalProgramTarget(tiffinfo,tiffinfo.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffinfo,$(CPBINDIR))


NormalProgramTarget(tiffcmp,tiffcmp.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffcmp,$(CPBINDIR))


NormalProgramTarget(tiffcp,tiffcp.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffcp,$(CPBINDIR))


NormalProgramTarget(tiffdump,tiffdump.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffdump,$(CPBINDIR))


NormalProgramTarget(tiffmedian,tiffmedian.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffmedian,$(CPBINDIR))


NormalProgramTarget(tiffsplit,tiffsplit.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffsplit,$(CPBINDIR))


NormalProgramTarget(tiff2ps,tiff2ps.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiff2ps,$(CPBINDIR))


NormalProgramTarget(tiff2bw,tiff2bw.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiff2bw,$(CPBINDIR))


NormalProgramTarget(tiffdither,tiffdither.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(tiffdither,$(CPBINDIR))


NormalProgramTarget(fax2tiff,fax2tiff.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(fax2tiff,$(CPBINDIR))


NormalProgramTarget(gif2tiff,gif2tiff.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(gif2tiff,$(CPBINDIR))


NormalProgramTarget(ppm2tiff,ppm2tiff.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(ppm2tiff,$(CPBINDIR))


NormalProgramTarget(pal2rgb,pal2rgb.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(pal2rgb,$(CPBINDIR))


NormalProgramTarget(rgb2ycbcr,rgb2ycbcr.o,$(DEPLIBS),$(LOCAL_LIBRARIES),/* SYS_LIBARIES */)

InstallProgram(rgb2ycbcr,$(CPBINDIR))

depend::
	$(DEPEND) -s "# DO NOT DELETE" -- $(ALLDEFINES) -- $(XTIFFSRCS)
