1
# $Header: /cvsroot/osrs/libtiff/tools/Makefile.in,v 1.14 2003/11/26 07:41:42 dron Exp $
7
# Copyright (c) 1988-1997 Sam Leffler
8
# Copyright (c) 1991-1997 Silicon Graphics, Inc.
10
# Permission to use, copy, modify, distribute, and sell this software and
11
# its documentation for any purpose is hereby granted without fee, provided
12
# that (i) the above copyright notices and this permission notice appear in
13
# all copies of the software and related documentation, and (ii) the names of
14
# Sam Leffler and Silicon Graphics may not be used in any advertising or
15
# publicity relating to the software without the specific, prior written
16
# permission of Stanford and Silicon Graphics.
18
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
19
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
20
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
22
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
23
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
24
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
25
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
26
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
31
SRCDIR = @RELSRCDIR@/tools
32
LIBDIR = @RELSRCDIR@/libtiff
38
# CCOMPILER: @CCOMPILER@
41
SCRIPT_SH = @SCRIPT_SH@
48
IPATH = -I. -I${SRCDIR} -I${LIBDIR}
49
CFLAGS = @ENVOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH}
51
TIFFLIB = ${DEPTH}/libtiff/libtiff.@DSOSUF@
54
LIBTIFF = @TIFFLIBREF@
56
MACHLIBS= @MACHDEPLIBS@
57
LIBS = ${LIBTIFF} ${LIBJPEG} ${LIBGZ} ${LIBPORT} ${MACHLIBS}
107
@if [ "@LIBIMAGE@" = yes ]; then \
108
${MAKE} -${MAKEFLAGS} sgi2tiff; \
112
@if [ "@LIBGL@" = yes ]; then \
113
${MAKE} -${MAKEFLAGS} tiffgt tiffsv; \
118
${INSTALL} -idb tiff.sw.tools -m 755 \
119
-dir ${DESTDIR}@DIR_BIN@
120
${INSTALL} -idb tiff.sw.tools -m 755 \
121
-F ${DESTDIR}@DIR_BIN@ -O ${TARGETS}
122
@if [ "@LIBIMAGE@" = yes ]; then \
123
${INSTALL} -idb tiff.sw.tools -m 755 \
124
-F ${DESTDIR}@DIR_BIN@ -O sgi2tiff; \
128
@if [ "@LIBGL@" = yes ]; then \
129
${INSTALL} -idb tiff.sw.tools -m 755 -F ${DESTDIR}@DIR_BIN@ \
135
rm -f ${TARGETS} ${OBJS} tiffgt.o tiffgt sgisv.o tiffsv \
136
sgi2tiff.o sgi2tiff core a.out ycbcr
139
# System-independent tools
142
tiffinfo: tiffinfo.o ${TIFFLIB}
143
${CC} -o tiffinfo ${CFLAGS} tiffinfo.o ${LIBS}
144
tiffinfo.o: ${SRCDIR}/tiffinfo.c
145
${CC} -c ${CFLAGS} ${SRCDIR}/tiffinfo.c
147
tiffcmp:tiffcmp.o ${TIFFLIB}
148
${CC} -o tiffcmp ${CFLAGS} tiffcmp.o ${LIBS}
149
tiffcmp.o: ${SRCDIR}/tiffcmp.c
150
${CC} -c ${CFLAGS} ${SRCDIR}/tiffcmp.c
152
tiffcp: tiffcp.o ${TIFFLIB}
153
${CC} -o tiffcp ${CFLAGS} tiffcp.o ${LIBS}
154
tiffcp.o: ${SRCDIR}/tiffcp.c
155
${CC} -c ${CFLAGS} ${SRCDIR}/tiffcp.c
158
${CC} -o tiffdump ${CFLAGS} tiffdump.o ${LIBS}
159
tiffdump.o: ${SRCDIR}/tiffdump.c
160
${CC} -c ${CFLAGS} ${SRCDIR}/tiffdump.c
162
tiffmedian: tiffmedian.o ${TIFFLIB}
163
${CC} -o tiffmedian ${CFLAGS} tiffmedian.o ${LIBS}
164
tiffmedian.o: ${SRCDIR}/tiffmedian.c
165
${CC} -c ${CFLAGS} ${SRCDIR}/tiffmedian.c
167
tiffsplit: tiffsplit.o ${TIFFLIB}
168
${CC} -o tiffsplit ${CFLAGS} tiffsplit.o ${LIBS}
169
tiffsplit.o: ${SRCDIR}/tiffsplit.c
170
${CC} -c ${CFLAGS} ${SRCDIR}/tiffsplit.c
172
tiff2pdf: tiff2pdf.o ${TIFFLIB}
173
${CC} -o tiff2pdf ${CFLAGS} tiff2pdf.o ${LIBS}
174
tiff2pdf.o: ${SRCDIR}/tiff2pdf.c
175
${CC} -c ${CFLAGS} ${SRCDIR}/tiff2pdf.c
177
tiff2ps: tiff2ps.o ${TIFFLIB}
178
${CC} -o tiff2ps ${CFLAGS} tiff2ps.o ${LIBS}
179
tiff2ps.o: ${SRCDIR}/tiff2ps.c
180
${CC} -c ${CFLAGS} ${SRCDIR}/tiff2ps.c
182
tiffset: tiffset.o ${TIFFLIB}
183
${CC} -o tiffset ${CFLAGS} tiffset.o ${LIBS}
184
tiffset.o: ${SRCDIR}/tiffset.c
185
${CC} -c ${CFLAGS} -I../libtiff ${SRCDIR}/tiffset.c
188
# Junky stuff... programs that are more examples of how
189
# to use the library than full-blown useful tools.
192
# convert RGB image to B&W
193
tiff2bw: tiff2bw.o ${TIFFLIB}
194
${CC} -o tiff2bw ${CFLAGS} tiff2bw.o ${LIBS}
195
tiff2bw.o: ${SRCDIR}/tiff2bw.c
196
${CC} -c ${CFLAGS} ${SRCDIR}/tiff2bw.c
198
# convert anything to RGBA.
199
tiff2rgba: tiff2rgba.o ${TIFFLIB}
200
${CC} -o tiff2rgba ${CFLAGS} tiff2rgba.o ${LIBS}
201
tiff2rgba.o: ${SRCDIR}/tiff2rgba.c
202
${CC} -c ${CFLAGS} ${SRCDIR}/tiff2rgba.c
204
# convert B&W image to bilevel w/ FS dithering
205
tiffdither: tiffdither.o ${TIFFLIB}
206
${CC} -o tiffdither ${CFLAGS} tiffdither.o ${LIBS}
207
tiffdither.o: ${SRCDIR}/tiffdither.c
208
${CC} -c ${CFLAGS} ${SRCDIR}/tiffdither.c
210
# simple Sun rasterfile converter
211
ras2tiff: ras2tiff.o ${TIFFLIB}
212
${CC} -o ras2tiff ${CFLAGS} ras2tiff.o ${LIBS}
213
ras2tiff.o: ${SRCDIR}/ras2tiff.c
214
${CC} -c ${CFLAGS} ${SRCDIR}/ras2tiff.c
216
# convert raw images to TIFFs
217
raw2tiff: raw2tiff.o ${TIFFLIB}
218
${CC} -o raw2tiff ${CFLAGS} raw2tiff.o ${LIBS}
219
raw2tiff.o: ${SRCDIR}/raw2tiff.c
220
${CC} -c ${CFLAGS} ${SRCDIR}/raw2tiff.c
222
# simple GIF converter
223
gif2tiff: gif2tiff.o ${TIFFLIB}
224
${CC} -o gif2tiff ${CFLAGS} gif2tiff.o ${LIBS}
225
gif2tiff.o: ${SRCDIR}/gif2tiff.c
226
${CC} -c ${CFLAGS} ${SRCDIR}/gif2tiff.c
228
# very limited PBM converter
229
ppm2tiff: ppm2tiff.o ${TIFFLIB}
230
${CC} -o ppm2tiff ${CFLAGS} ppm2tiff.o ${LIBS}
231
ppm2tiff.o: ${SRCDIR}/ppm2tiff.c
232
${CC} -c ${CFLAGS} ${SRCDIR}/ppm2tiff.c
234
# Group 3/4 FAX file converter
235
fax2tiff: fax2tiff.o ${TIFFLIB}
236
${CC} -o fax2tiff ${CFLAGS} fax2tiff.o ${LIBS}
237
fax2tiff.o: ${SRCDIR}/fax2tiff.c
238
${CC} -c -I${LIBDIR} -I${DEPTH}/libtiff ${CFLAGS} ${SRCDIR}/fax2tiff.c
240
# Group 3/4 FAX to encoded PS converter
241
fax2ps: fax2ps.o ${TIFFLIB}
242
${CC} -o fax2ps ${CFLAGS} fax2ps.o ${LIBS}
243
fax2ps.o: ${SRCDIR}/fax2ps.c
244
${CC} -c ${CFLAGS} ${SRCDIR}/fax2ps.c
246
# convert Palette image to RGB
247
pal2rgb: pal2rgb.o ${TIFFLIB}
248
${CC} -o pal2rgb ${CFLAGS} pal2rgb.o ${LIBS}
249
pal2rgb.o: ${SRCDIR}/pal2rgb.c
250
${CC} -c ${CFLAGS} ${SRCDIR}/pal2rgb.c
252
# convert RGB image to YCbCr
253
rgb2ycbcr: rgb2ycbcr.o ${TIFFLIB}
254
${CC} -o rgb2ycbcr ${CFLAGS} rgb2ycbcr.o ${LIBS}
255
rgb2ycbcr.o: ${SRCDIR}/rgb2ycbcr.c
256
${CC} -c ${CFLAGS} ${SRCDIR}/rgb2ycbcr.c
258
# generate thumbnail images from fax (example of SubIFD usage)
259
thumbnail: thumbnail.o ${TIFFLIB}
260
${CC} -o thumbnail ${CFLAGS} thumbnail.o ${LIBS}
261
thumbnail.o: ${SRCDIR}/thumbnail.c
262
${CC} -c ${CFLAGS} ${SRCDIR}/thumbnail.c
265
# System-specific tools.
269
# sgi2tiff converts SGI RGB images to TIFF; it requires
270
# the SGI image library -limage.
272
sgi2tiff: sgi2tiff.o ${TIFFLIB}
273
${CC} -o sgi2tiff ${CFLAGS} sgi2tiff.o -limage ${LIBS}
274
sgi2tiff.o: ${SRCDIR}/sgi2tiff.c
275
${CC} -c ${CFLAGS} ${SRCDIR}/sgi2tiff.c
277
# SGI versions of tiffgt & tiffsv that require -lgl
278
tiffgt: tiffgt.o ${TIFFLIB}
279
${CC} -o tiffgt ${CFLAGS} tiffgt.o -lGL -lglut ${LIBS}
280
tiffgt.o: ${SRCDIR}/tiffgt.c
281
${CC} -c ${CFLAGS} ${SRCDIR}/tiffgt.c
283
tiffsv: sgisv.o ${TIFFLIB}
284
${CC} -o tiffsv ${CFLAGS} sgisv.o -lgutil -lgl ${LIBS}
285
sgisv.o: ${SRCDIR}/sgisv.c
286
${CC} -c ${CFLAGS} ${SRCDIR}/sgisv.c