1#	$Header: /usr/people/sam/tiff/libtiff/RCS/Makefile.gcc,v 1.5 1994/07/26 16:47:16 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#
27# This Makefile is for use with gcc (2.2.2 or later)
28#
29DESTDIR=.
30#
31AR=	ar
32RANLIB=	ranlib
33NULL=
34
35IPATH=	-I.
36CONF_LIBRARY=\
37	${NULL}
38CC=	gcc
39COPTS=	-ansi -O
40CFLAGS=	${COPTS} ${IPATH} ${CONF_LIBRARY}
41#
42INCS=	tiff.h tiffio.h
43SRCS=	tif_fax3.c \
44	tif_fax4.c \
45	tif_aux.c \
46	tif_ccittrle.c \
47	tif_close.c \
48	tif_compress.c \
49	tif_dir.c \
50	tif_dirinfo.c \
51	tif_dirread.c \
52	tif_dirwrite.c \
53	tif_dumpmode.c \
54	tif_error.c \
55	tif_getimage.c \
56	tif_jpeg.c \
57	tif_flush.c \
58	tif_lzw.c \
59	tif_next.c \
60	tif_open.c \
61	tif_packbits.c \
62	tif_print.c \
63	tif_read.c \
64	tif_swab.c \
65	tif_strip.c \
66	tif_thunder.c \
67	tif_tile.c \
68	tif_unix.c \
69	tif_version.c \
70	tif_warning.c \
71	tif_write.c \
72	${NULL}
73OBJS=	tif_fax3.o \
74	tif_fax4.o \
75	tif_aux.o \
76	tif_ccittrle.o \
77	tif_close.o \
78	tif_compress.o \
79	tif_dir.o \
80	tif_dirinfo.o \
81	tif_dirread.o \
82	tif_dirwrite.o \
83	tif_dumpmode.o \
84	tif_error.o \
85	tif_getimage.o \
86	tif_jpeg.o \
87	tif_flush.o \
88	tif_lzw.o \
89	tif_next.o \
90	tif_open.o \
91	tif_packbits.o \
92	tif_print.o \
93	tif_read.o \
94	tif_strip.o \
95	tif_swab.o \
96	tif_thunder.o \
97	tif_tile.o \
98	tif_unix.o \
99	tif_version.o \
100	tif_warning.o \
101	tif_write.o \
102	${NULL}
103ALL=	libtiff.a
104
105all:	 ${ALL}
106
107${ALL}:	${OBJS}
108	${AR} rc libtiff.a $?
109	${RANLIB} libtiff.a
110
111${OBJS}: tiffio.h tiff.h tiffcomp.h tiffiop.h tiffconf.h
112tif_fax3.o: tif_fax3.c g3states.h t4.h tif_fax3.h
113
114g3states.h: mkg3states.c t4.h
115	${CC} -o mkg3states ${CFLAGS} mkg3states.c
116	./mkg3states -c > g3states.h
117
118install: all installh
119	-for i in ${ALL}; do \
120		${INSTALL} -c -m 644 $$i ${DESTDIR}/lib/$$i; \
121		${RANLIB} ${DESTDIR}/lib/$$i; \
122	done
123
124installh: ${INCS}
125	-for i in ${INCS}; do \
126	    h=`basename $$i`; \
127	    cmp -s $$i ${DESTDIR}/include/$$h || \
128	        ${INSTALL} -c -m 444 $$i ${DESTDIR}/include/$$h; \
129	done
130
131clean:
132	rm -f ${ALL} ${OBJS} core a.out mkg3states g3states.h
133
134tags:	${SRCS}
135	${CTAGS} ${SRCS}
136