summaryrefslogtreecommitdiff
path: root/libtiff/Makefile.in
blob: a329aa7f498d151aa39cb2533c8eb6dfffc3da5c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
#	$Header: /cvsroot/osrs/libtiff/libtiff/Makefile.in,v 1.3 1999/09/08 12:40:31 warmerda Exp $
#
# Tag Image File Format Library
#
# Copyright (c) 1988-1997 Sam Leffler
# Copyright (c) 1991-1997 Silicon Graphics, Inc.
# 
# Permission to use, copy, modify, distribute, and sell this software and 
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
# 
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
# 
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
# OF THIS SOFTWARE.
#

SRCDIR	= @LIBSRCDIR@

#
# VERSION:	@VERSION@
# DATE:		@DATE@
# TARGET:	@TARGET@
# CCOMPILER:	@CCOMPILER@
#
SHELL	= @SCRIPT_SH@
NULL	=
CC	= @CCOMPILER@
AR	= @AR@
AROPTS	= @AROPTS@
RANLIB	= @RANLIB@
INSTALL	= @INSTALL@

#
# 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${SRCDIR} @COPT_LIBINC@
#
# 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=@CONF_JPEG@ @CONF_ZIP@
COPTS	= @GCOPTS@
OPTIMIZER=-O
CFLAGS	= @ENVOPTS@ @LIBCOPTS@ ${COPTS} ${OPTIMIZER} ${IPATH} ${CONF_LIBRARY}
#
SRCS	= \
	tif_aux.c \
	tif_close.c \
	tif_codec.c \
	tif_compress.c \
	tif_dir.c \
	tif_dirinfo.c \
	tif_dirread.c \
	tif_dirwrite.c \
	tif_dumpmode.c \
	tif_error.c \
	tif_fax3.c \
	tif_fax3sm.c \
	tif_getimage.c \
	tif_jpeg.c \
	tif_flush.c \
	tif_luv.c \
	tif_lzw.c \
	tif_next.c \
	tif_open.c \
	tif_packbits.c \
	tif_pixarlog.c \
	tif_predict.c \
	tif_print.c \
	tif_read.c \
	tif_swab.c \
	tif_strip.c \
	tif_thunder.c \
	tif_tile.c \
	tif_unix.c \
	tif_version.c \
	tif_warning.c \
	tif_write.c \
	tif_zip.c \
	${NULL}
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_luv.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}
	if [ @DSO@dso != nodso ]; then \
	    ${MAKE} @DSO@dso; \
	else \
	    true; \
	fi

libtiff.a: ${OBJS}
	${AR} ${AROPTS} libtiff.a $?
	${RANLIB} libtiff.a

#
# NB: The configure script verifies that the configured
# tools are capable of producing a DSO before enabling
# their creation/use.  The following rules are effectively
# duplicated in the configure script to do this verification.
# This means that if you want to add support for building a
# DSO on another system you'll need to modify this file *and*
# configure if you want the right thing to happen automatically
# (should probably be fixed up).
#

# default IRIX DSO building rule
IRIXdso: ${OBJS}
	@if [ "`basename ${CC}`" = "gcc" ]; then \
	   ${LD} -n32 @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -rdata_shared \
	   ${OBJS}; \
	else \
	    ${CC} @ENVOPTS@ -o libtiff.@DSOSUF@ -shared -rdata_shared \
	        -check_registry ${SRCDIR}/../port/irix/so_locations \
	        -quickstart_info \
	        ${OBJS} @LIBJPEG@ @LIBGZ@; \
	fi
	touch $@
# special rule for IRIX 5.2
IRIX52dso: ${OBJS}
	${LD} -elf -o libtiff.@DSOSUF@ -shared -no_unresolved -all ${OBJS} \
	    @LIBJPEG@ @LIBGZ@ -lc -lm
	touch $@
# Solaris 2.x
SOLARISdso: ${OBJS}
	${LD} -L@DIR_LIB@ -G -h libtiff.@DSOSUF@ -o libtiff.@DSOSUF@ ${OBJS}
	touch $@
# HP-UX A.09.03
HPUXdso: ${OBJS}
	${LD} +b@DIR_LIB@ -b -o libtiff.@DSOSUF@ ${OBJS}
	touch $@
# AIX 2.3.5 and 4.1.1
AIXdso: ${OBJS}
	rm -f libtiff.syms shr.o
	echo "#!" > libtiff.syms
	/bin/dump -g libtiff.a | sed -n -e \
	      's/^[ 	]*[0-9][0-9]*[	 ]*\([^	 .][^ 	]*\)$$/\1/p' \
	      >> libtiff.syms
	${LD} -o shr.o libtiff.a -H512 -T512 -bM\:SRE \
	    -bE\:libtiff.syms @LIBJPEG@ @LIBGZ@ -lc -lm -L@DIR_LIB@
	rm -f libtiff.syms libtiff.@DSOSUF@
	${AR} ${AROPTS} libtiff.@DSOSUF@ shr.o
	rm -f shr.o
	touch $@
# NetBSD 1.1 or FreeBSD
NETBSDdso FREEBSDdso: ${OBJS}
	@rm -f libtiff_pic.a
	@${AR} cq libtiff_pic.a `lorder ${OBJS} | tsort -q`
	${RANLIB} libtiff_pic.a
	${LD} -x -Bshareable -Bforcearchive -o libtiff.@DSOSUF@ libtiff_pic.a
	rm -f libtiff_pic.a
	touch $@
# linux ELF shared lib rule
LINUXdso:  ${OBJS}
	${CC} -shared -Wl,-soname,libtiff.@DSOSUF@ \
	    -o libtiff.@DSOSUF_VERSION@  ${OBJS} @LIBJPEG@ @LIBGZ@ 
	rm -f libtiff.@DSOSUF@
	@LN@ @LN_S@ libtiff.@DSOSUF_VERSION@ libtiff.@DSOSUF@
	touch $@
# OSF/1 3.2 shared lib rule
OSFdso: ${OBJS}
	${LD} -o libtiff.@DSOSUF@ -shared -error_unresolved ${OBJS} @LIBJPEG@ @LIBGZ@ -lc -lm


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

ALPHA	= @ALPHAFILE@
VERSION	= @VERSIONFILE@

version.h: ${VERSION} ${ALPHA} ${SRCDIR}/mkversion.c
	${CC} -o mkversion ${CFLAGS} ${SRCDIR}/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: ${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

tif_aux.o: ${SRCDIR}/tif_aux.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_aux.c
tif_close.o: ${SRCDIR}/tif_close.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_close.c
tif_codec.o: ${SRCDIR}/tif_codec.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_codec.c
tif_compress.o: ${SRCDIR}/tif_compress.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_compress.c
tif_dir.o: ${SRCDIR}/tif_dir.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dir.c
tif_dirinfo.o: ${SRCDIR}/tif_dirinfo.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirinfo.c
tif_dirread.o: ${SRCDIR}/tif_dirread.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirread.c
tif_dirwrite.o: ${SRCDIR}/tif_dirwrite.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dirwrite.c
tif_dumpmode.o: ${SRCDIR}/tif_dumpmode.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_dumpmode.c
tif_error.o: ${SRCDIR}/tif_error.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_error.c
tif_fax3.o: ${SRCDIR}/tif_fax3.c ${SRCDIR}/t4.h ${SRCDIR}/tif_fax3.h
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_fax3.c
tif_getimage.o: ${SRCDIR}/tif_getimage.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_getimage.c
tif_jpeg.o: ${SRCDIR}/tif_jpeg.c @DEPEND_JPEGLIB@
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_jpeg.c
tif_flush.o: ${SRCDIR}/tif_flush.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_flush.c
tif_luv.o: ${SRCDIR}/tif_luv.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_luv.c
tif_lzw.o: ${SRCDIR}/tif_lzw.c ${SRCDIR}/tif_predict.h
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_lzw.c
tif_next.o: ${SRCDIR}/tif_next.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_next.c
tif_open.o: ${SRCDIR}/tif_open.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_open.c
tif_packbits.o: ${SRCDIR}/tif_packbits.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_packbits.c
tif_pixarlog.o: ${SRCDIR}/tif_pixarlog.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_pixarlog.c
tif_predict.o: ${SRCDIR}/tif_predict.c ${SRCDIR}/tif_predict.h
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_predict.c
tif_print.o: ${SRCDIR}/tif_print.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_print.c
tif_read.o: ${SRCDIR}/tif_read.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_read.c
tif_swab.o: ${SRCDIR}/tif_swab.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_swab.c
tif_strip.o: ${SRCDIR}/tif_strip.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_strip.c
tif_thunder.o: ${SRCDIR}/tif_thunder.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_thunder.c
tif_tile.o: ${SRCDIR}/tif_tile.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_tile.c
tif_unix.o: ${SRCDIR}/tif_unix.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_unix.c
tif_version.o: ${SRCDIR}/tif_version.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_version.c
tif_warning.o: ${SRCDIR}/tif_warning.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_warning.c
tif_write.o: ${SRCDIR}/tif_write.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_write.c
tif_zip.o: ${SRCDIR}/tif_zip.c ${SRCDIR}/tif_predict.h @DEPEND_ZLIB@
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_zip.c

tif_apple.o: ${SRCDIR}/tif_apple.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_apple.c
tif_atari.o: ${SRCDIR}/tif_atari.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_atari.c
tif_msdos.o: ${SRCDIR}/tif_msdos.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_msdos.c
tif_vms.o: ${SRCDIR}/tif_vms.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_vms.c
tif_win3.o: ${SRCDIR}/tif_win3.c
	${CC} -c ${CFLAGS} ${SRCDIR}/tif_win3.c

INCS	= ${SRCDIR}/tiff.h ${SRCDIR}/tiffio.h

installHdrs: ${INCS}
	${INSTALL} -idb tiff.sw.dev -m 755 -dir @DIR_INC@
	for i in ${INCS}; do						\
	    f=`basename $$i`;						\
	    ${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_INC@		\
		-src $$i -O $$f;					\
	done
installDSO: @DSO@dso
	if [ @DSOSUF_VERSION@ != @DSOSUF@ ]; then			\
	    ${INSTALL} -idb tiff.sw.tools -m 555 -F @DIR_LIB@		\
		-O libtiff.@DSOSUF_VERSION@;				\
	    ${INSTALL} -idb tiff.sw.tools -F @DIR_LIB@			\
		-ln libtiff.@DSOSUF_VERSION@ -O libtiff.@DSOSUF@;	\
	else								\
	    ${INSTALL} -idb tiff.sw.tools -m 555 -F @DIR_LIB@		\
		-O libtiff.@DSOSUF@;					\
	fi
install: all installHdrs
	${INSTALL} -idb tiff.sw.dev -m 755 -dir @DIR_LIB@
	${INSTALL} -idb tiff.sw.dev -m 444 -F @DIR_LIB@ -O libtiff.a
	if [ @DSO@dso != nodso ]; then					\
	    ${MAKE} installDSO;						\
	else								\
	    true;							\
	fi

clean:
	rm -f ${TARGETS} ${OBJS} core a.out \
	    mkg3states tif_fax3sm.c \
	    mkversion version.h \
	    libtiff.a libtiff.@DSOSUF@ libtiff.@DSOSUF_VERSION@ *dso