#	Makefile.hpbsd	1.9	90/05/02
#
# TIFF Library Tools
#
# Copyright (c) 1988 by Sam Leffler.
# All rights reserved.
#
# This file is provided for unrestricted use provided that this
# legend is included on all tape media and as a part of the
# software program in whole or part.  Users may copy, modify or
# distribute this file at will.
#
PIXAR=	/usr/pixar
IPATH=	-I../libtiff
COPTS=	
CFLAGS=	-O ${COPTS} ${IPATH}
#
LIBTIFF=../libtiff/libtiff.a
LIBS=	${LIBTIFF}
SRCS=	cg8gt.c fax2tiff.c pal2rgb.c picio2tiff.c pixargt.c \
	ras2tiff.c \
	tiff2bw.c tiff2ps.c tiffcmp.c tiffcp.c tiffdither.c \
	tiffdump.c tiffinfo.c tiffmedian.c
MACHALL=
ALL=	tiffinfo tiffcmp tiffcp tiffdump tiffmedian \
	tiff2bw tiffdither fax2tiff pal2rgb ${MACHALL}

all:	 ${ALL}

tiffinfo: tiffinfo.c ${LIBTIFF}
	${CC} -o tiffinfo ${CFLAGS} tiffinfo.c ${LIBS}
tiffcmp:tiffcmp.c ${LIBTIFF}
	${CC} -o tiffcmp ${CFLAGS} tiffcmp.c ${LIBS}
tiffcp:	tiffcp.c ${LIBTIFF}
	${CC} -o tiffcp ${CFLAGS} tiffcp.c ${LIBS}
tiffdump: tiffdump.c
	${CC} -o tiffdump ${CFLAGS} tiffdump.c
tiffmedian: tiffmedian.c ${LIBTIFF}
	${CC} -o tiffmedian ${CFLAGS} tiffmedian.c ${LIBS}
# junky stuff...
tiff2ps: tiff2ps.c ${LIBTIFF}
	${CC} -o tiff2ps ${CFLAGS} tiff2ps.c ${LIBS}
# convert RGB image to B&W
tiff2bw: tiff2bw.c ${LIBTIFF}
	${CC} -o tiff2bw ${CFLAGS} tiff2bw.c ${LIBS}
# convert B&W image to bilevel w/ FS dithering
tiffdither: tiffdither.c ${LIBTIFF}
	${CC} -o tiffdither ${CFLAGS} tiffdither.c ${LIBS}
# Group 3 FAX file converter
fax2tiff: fax2tiff.c ${LIBTIFF}
	${CC} -o fax2tiff ${CFLAGS} fax2tiff.c ${LIBS}
# convert Palette image to RGB
pal2rgb: pal2rgb.c ${LIBTIFF}
	${CC} -o pal2rgb ${CFLAGS} pal2rgb.c ${LIBS}
# Sun rasterfile converter
#ras2tiff: ras2tiff.c ${LIBTIFF}
#	${CC} -o ras2tiff ${CFLAGS} ras2tiff.c ${LIBS}
# Sun version of tiffgt
#tiffgt:	cg8gt.c ${LIBTIFF}
#	${CC} -o tiffgt ${CFLAGS} cg8gt.c ${LIBS} \
#	    -lsuntool -lsunwindow -lpixrect
# Pixar/picio related programs
picio2tiff: picio2tiff.c ${LIBTIFF}
	${CC} -o picio2tiff ${CFLAGS} -I${PIXAR}/include picio2tiff.c \
	    ${PIXAR}/host/lib/libpicio.a ${LIBS}
hist:	hist.c ${LIBTIFF}
	${CC} -o hist ${CFLAGS} hist.c ${LIBS}
pixargt: pixargt.c ${LIBTIFF}
	${CC} -o pixargt ${CFLAGS} -I${PIXAR}/include pixargt.c \
	    ${PIXAR}/host/lib/libchad.a \
	    ${PIXAR}/host/lib/libpixar.a \
	    ${PIXAR}/host/lib/libport.a \
	    ${LIBS}
# fixit is only needed to patch files created by the old library
fixit:	fixit.c
	${CC} -o fixit ${CFLAGS} fixit.c
# test programs
lzwcodes:	lzwcodes.c ${LIBTIFF}
	${CC} -o lzwcodes ${CFLAGS} lzwcodes.c ${LIBS}

install: all installh

installh:

clean:
	rm -f ${ALL} ${OBJS} core a.out \
	    fixit tiff2ps tiff2bw picio2tiff hist pixargt lzwcodes
 
tags:	${SRCS}
	${CTAGS} ${SRCS}
