1#	$Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.sgi,v 1.60 1994/09/28 00:54:41 sam Exp $
2#
3# Tag Image File Format Library
4#
5# Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994 Sam Leffler
6# Copyright (c) 1991, 1992, 1993, 1994 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 Sam Leffler 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#
27DESTDIR=.
28#
29AR=	/usr/bin/ar
30NULL=
31
32IPATH=	-I.
33CONF_LIBRARY=\
34	-DMMAP_SUPPORT \
35	${NULL}
36COPTS=	-O
37#
38# NB: add "-woff 24,269" for IRIX 4.x compilers
39# NB: add "-woff 262,617" for compilers based on the Edison front-end
40# NB: add "-woff 1174" for 6.0 compilers based
41# NB: add "-woff 1174,1412" for 6.0 compilers based on an R8000 when
42#     you believe the warnings about casting pointers to smaller datatypes
43#
44CFLAGS=	${COPTS} -ansi -fullwarn ${IPATH} ${CONF_LIBRARY}
45#
46INCS=	tiff.h tiffio.h
47SRCS=	tif_fax3.c \
48	tif_fax4.c \
49	tif_aux.c \
50	tif_ccittrle.c \
51	tif_close.c \
52	tif_compress.c \
53	tif_dir.c \
54	tif_dirinfo.c \
55	tif_dirread.c \
56	tif_dirwrite.c \
57	tif_dumpmode.c \
58	tif_error.c \
59	tif_getimage.c \
60	tif_jpeg.c \
61	tif_flush.c \
62	tif_lzw.c \
63	tif_next.c \
64	tif_open.c \
65	tif_packbits.c \
66	tif_print.c \
67	tif_read.c \
68	tif_swab.c \
69	tif_strip.c \
70	tif_thunder.c \
71	tif_tile.c \
72	tif_unix.c \
73	tif_version.c \
74	tif_warning.c \
75	tif_write.c \
76	${NULL}
77OBJS=	tif_fax3.o \
78	tif_fax4.o \
79	tif_aux.o \
80	tif_ccittrle.o \
81	tif_close.o \
82	tif_compress.o \
83	tif_dir.o \
84	tif_dirinfo.o \
85	tif_dirread.o \
86	tif_dirwrite.o \
87	tif_dumpmode.o \
88	tif_error.o \
89	tif_getimage.o \
90	tif_jpeg.o \
91	tif_flush.o \
92	tif_lzw.o \
93	tif_next.o \
94	tif_open.o \
95	tif_packbits.o \
96	tif_print.o \
97	tif_read.o \
98	tif_swab.o \
99	tif_strip.o \
100	tif_thunder.o \
101	tif_tile.o \
102	tif_unix.o \
103	tif_version.o \
104	tif_warning.o \
105	tif_write.o \
106	${NULL}
107ALL=	libtiff.a
108
109all:	 ${ALL}
110
111${ALL}:	${OBJS}
112	${AR} rc libtiff.a $?
113
114${OBJS}: tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
115tif_fax3.o: tif_fax3.c g3states.h t4.h tif_fax3.h
116
117g3states.h: mkg3states.c t4.h
118	${CC} -o mkg3states ${CFLAGS} mkg3states.c
119	./mkg3states -c > g3states.h
120
121install: all installh
122	-for i in ${ALL}; do \
123		${INSTALL} -c -m 644 $$i ${DESTDIR}/lib/$$i; \
124	done
125
126installh: ${INCS}
127	-for i in ${INCS}; do \
128	    h=`basename $$i`; \
129	    cmp -s $$i ${DESTDIR}/include/$$h || \
130	        ${INSTALL} -c -m 444 $$i ${DESTDIR}/include/$$h; \
131	done
132
133clean:
134	rm -f ${ALL} ${OBJS} core a.out mkg3states g3states.h
135
136tags:	${SRCS}
137	${CTAGS} ${SRCS}
138