xref: /libtiff-4.0.7/tools/Makefile.lcc (revision 30366c9f)
1# $Header: /cvs/maptools/cvsroot/libtiff/tools/Makefile.lcc,v 1.5 2016-06-05 19:54:03 bfriesen Exp $
2#
3# TIFF Library Tools
4#
5# Copyright (c) 1988-1997 Sam Leffler
6# Copyright (c) 1991-1997 Silicon Graphics, Inc.
7#
8# Permission to use, copy, modify, distribute, and sell this software and
9# its documentation for any purpose is hereby granted without fee, provided
10# that (i) the above copyright notices and this permission notice appear in
11# all copies of the software and related documentation, and (ii) the names of
12# Sam Leffler and Silicon Graphics may not be used in any advertising or
13# publicity relating to the software without the specific, prior written
14# permission of Stanford and Silicon Graphics.
15#
16# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
17# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
18# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
19#
20# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
21# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
22# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
24# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
25# OF THIS SOFTWARE.
26#
27NULL=
28IPATH=    -I..\libtiff
29#
30# If you don't want the public domain getopt code, then
31# simply null this out and you'll get whatever is in your
32# libc (or similar).
33#
34GETOPT=	getopt.o
35#
36# Library-wide configuration defines:
37# Note that if you change the library-wide configuration, you'll
38# need to manual force a full rebuild.
39#
40CONF_LIBRARY=\
41	${NULL}
42COPTS=	-Oloop -cwagshf -d1 -b0 -v -DNDEBUG -rr -j135i
43CFLAGS=	${COPTS} ${IPATH}
44#
45LIBTIFF=..\libtiff\tiffrnb.lib
46LIBS=	-l${LIBTIFF} -lm
47MACHALL=ras2tiff.ttp
48OBJS=\
49	fax2tiff.o \
50	pal2rgb.o \
51	ppm2tiff.o \
52	rgb2ycbcr.o \
53	tiff2bw.o \
54	tiff2rgba.o \
55	tiff2ps.o \
56	tiffcmp.o \
57	tiffcp.o \
58	tiffdither.o \
59	tiffdump.o \
60	tiffinfo.o \
61	tiffmedian.o \
62	tiffsplit.o \
63	raw2tiff.o \
64	${GETOPT} \
65	${NULL}
66ALL=\
67	fax2tiff.ttp \
68	pal2rgb.ttp \
69	ppm2tiff.ttp \
70	rgb2ycbcr.ttp \
71	tiff2bw.ttp \
72	tiff2rgba.ttp \
73	tiff2ps.ttp \
74	tiffcmp.ttp \
75	tiffcp.ttp \
76	tiffdither.ttp \
77	tiffdump.ttp \
78	tiffinfo.ttp \
79	tiffmedian.ttp \
80	tiffsplit.ttp \
81	raw2tiff.ttp \
82	${MACHALL} \
83	${NULL}
84
85all:	${ALL}
86
87tiffinfo.ttp: tiffinfo.c ${GETOPT} ${LIBTIFF}
88	${CC} -o tiffinfo.ttp ${CFLAGS} tiffinfo.c ${GETOPT} ${LIBS}
89tiffcmp.ttp: tiffcmp.c ${GETOPT} ${LIBTIFF}
90	${CC} -o tiffcmp.ttp ${CFLAGS} tiffcmp.c ${GETOPT} ${LIBS}
91tiffcp.ttp:   tiffcp.c ${LIBTIFF}
92	${CC} -o tiffcp.ttp ${CFLAGS} tiffcp.c ${LIBS}
93tiffdump.ttp: tiffdump.c
94	${CC} -o tiffdump.ttp ${CFLAGS} tiffdump.c -lm ${LIBS}
95tiffmedian.ttp: tiffmedian.c ${LIBTIFF}
96	${CC} -o tiffmedian.ttp ${CFLAGS} tiffmedian.c ${LIBS}
97tiffsplit.ttp: tiffsplit.c ${LIBTIFF}
98	${CC} -o tiffsplit.ttp ${CFLAGS} tiffsplit.c ${LIBS}
99tiff2ps.ttp: tiff2ps.c ${LIBTIFF}
100	${CC} -o tiff2ps.ttp ${CFLAGS} tiff2ps.c ${LIBS}
101# junky stuff...
102# convert RGB image to B&W
103tiff2bw.ttp: tiff2bw.c ${GETOPT} ${LIBTIFF}
104	${CC} -o tiff2bw.ttp ${CFLAGS} tiff2bw.c ${GETOPT} ${LIBS}
105# convert anything to RGBA
106tiff2rgba.ttp: tiff2rgba.c ${GETOPT} ${LIBTIFF}
107	${CC} -o tiff2rgba.ttp ${CFLAGS} tiff2rgba.c ${GETOPT} ${LIBS}
108# convert B&W image to bilevel w/ FS dithering
109tiffdither.ttp: tiffdither.c ${LIBTIFF}
110	${CC} -o tiffdither.ttp ${CFLAGS} tiffdither.c ${LIBS}
111# Group 3 FAX file converter
112fax2tiff.ttp: fax2tiff.c ${GETOPT} ${LIBTIFF}
113	${CC} -o fax2tiff.ttp ${CFLAGS} ${CONF_LIBRARY} fax2tiff.c ${GETOPT} ${LIBS}
114# convert Palette image to RGB
115pal2rgb.ttp: pal2rgb.c ${LIBTIFF}
116	${CC} -o pal2rgb.ttp ${CFLAGS} pal2rgb.c ${LIBS}
117# convert RGB image to YCbCr
118rgb2ycbcr.ttp: rgb2ycbcr.c ${GETOPT} ${LIBTIFF}
119	${CC} -o rgb2ycbcr.ttp ${CFLAGS} rgb2ycbcr.c ${GETOPT} ${LIBS}
120# PBM converter
121ppm2tiff.ttp: ppm2tiff.c ${LIBTIFF}
122	${CC} -o ppm2tiff.ttp ${CFLAGS} ppm2tiff.c ${LIBS}
123# convert raw images to TIFFs
124raw2tiff.ttp: raw2tiff.c ${LIBTIFF}
125	${CC} -o raw2tiff.ttp ${CFLAGS} raw2tiff.c ${LIBS}
126# generate thumbnail images from fax
127thumbnail: thumbnail.c ${LIBTIFF}
128	${CC} -o thumbnail ${CFLAGS} thumbnail.c ${LIBS} -lm
129
130install: all
131
132clean:
133	rm -f ${ALL} ${OBJS} ycbcr.ttp
134