1#
2# This file is a Makefile for IMG.  If it has the name "Makefile.in"
3# then it is a template for a Makefile;  to generate the actual Makefile,
4# run "./configure", which is a configuration script generated by the
5# "autoconf" program (constructs like "@foo@" will get replaced in the
6# actual Makefile.
7
8# This is the master makefile to compile all the packages in this
9# extensions in one go.
10
11PACKAGE_NAME	=	@PACKAGE_NAME@
12PACKAGE_VERSION	=	@PACKAGE_VERSION@
13CYGPATH		=	@CYGPATH@
14SUBDIRS		=	@subdirs@
15
16#
17#----------------------------------------------------------------
18# Things you can change to personalize the Makefile for your own
19# site (you can make these changes in either Makefile.in or
20# Makefile, but changes to Makefile will get lost if you re-run
21# the configuration script).
22#----------------------------------------------------------------
23
24# Directory in which the source of this extension can be found
25srcdir		=	@srcdir@
26
27# Default top-level directories in which to install architecture-
28# specific files (exec_prefix) and machine-independent files such
29# as scripts (prefix).  The values specified here may be overridden
30# at configure-time with the --exec-prefix and --prefix options
31# to the "configure" script.
32
33prefix		= @prefix@
34exec_prefix	= @exec_prefix@
35libdir      = @libdir@
36datarootdir	= @datarootdir@
37includedir  = @includedir@
38mandir      = @mandir@
39
40# Directory containing scripts supporting the work of this makefile
41tool		=	$(srcdir)/tools
42
43INSTALL		= @INSTALL@
44INSTALL_PROGRAM	= @INSTALL_PROGRAM@
45INSTALL_DATA	= @INSTALL_DATA@
46INSTALL_SCRIPT	= @INSTALL_SCRIPT@
47
48
49# The following definition can be set to non-null for special systems
50# like AFS with replication.  It allows the pathnames used for installation
51# to be different than those used for actually reference files at
52# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
53# when installing files.
54INSTALL_ROOT =
55
56# Directory where libimg.a is at run-time:
57LIB_RUNTIME_DIR =	$(libdir)/$(PACKAGE_NAME)$(PACKAGE_VERSION)
58
59# Directory in which to install the archive libimg.a:
60LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
61
62# Directory in which to install the extended shell tclsh:
63BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin
64
65# Directory in which to install the include file transform.h:
66INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include
67
68# Top-level directory in which to install manual entries:
69MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(mandir)
70
71# Directory where libz, libpng and libjpeg are (or will be) installed.
72IMG_INSTALL_DIR	=	$(INSTALL_ROOT)$(IMG_RUNTIME_DIR)
73
74# Some versions of make, like SGI's, use the following variable to
75# determine which shell to use for executing commands:
76SHELL =		/bin/sh
77
78#----------------------------------------------------------------
79# The information below is modified by the configure script when
80# Makefile is generated from Makefile.in.  You shouldn't normally
81# modify any of this stuff by hand.
82#----------------------------------------------------------------
83
84INSTALL_PROGRAM =	$(INSTALL) -m 744
85INSTALL_DATA =		$(INSTALL) -m 644
86INSTALL_SHLIB =		$(INSTALL) -m 555
87RANLIB =		@RANLIB@
88SHLIB_SUFFIX =		@SHLIB_SUFFIX@
89SHARED_BUILD	= @SHARED_BUILD@
90
91#----------------------------------------------------------------
92
93#-------------------------------------------------------#
94
95default:	all
96
97all:
98	for sub in $(SUBDIRS) ; \
99	do	\
100		here=`pwd` && \
101		cd $$sub && \
102		$(MAKE) all || exit $$? && \
103		cd $$here ; \
104	done
105
106test:	all
107	for sub in $(SUBDIRS) ; \
108	do	\
109		test -d $(srcdir)/$$sub/tests || continue ; \
110		here=`pwd` && \
111		cd $$sub && \
112		$(MAKE) top_builddir=$$here test || exit $$? && \
113		cd $$here ; \
114	done
115
116install-man:
117	mkdir -p $(MAN_INSTALL_DIR)/mann
118	for i in $(srcdir)/doc/*.man ; \
119	do	\
120		dtplite -ext n -o $(MAN_INSTALL_DIR)/mann nroff $$i ; \
121	done
122
123collate: all
124	rm -f pkgIndex.tcl
125	touch pkgIndex.tcl
126	for sub in $(SUBDIRS) ; \
127	do	\
128		here=`pwd` && \
129		cd $$sub && \
130		$(MAKE) install \
131			exec_prefix=$$here/Img/exec_prefix		\
132			prefix=$$here/Img/prefix			\
133			pkglibdir=$$here/Img/exec_prefix/lib/Img	\
134			libdir=$$here/Img/exec_prefix/lib		\
135			includedir=$$here/Img/prefix/include		\
136			DESTDIR=					\
137			|| exit $$? &&					\
138		cd $$here && \
139		if test "x$(SHARED_BUILD)" = "x1"; then \
140		cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
141		fi ; \
142	done
143	mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl
144	for p in Img/exec_prefix/lib/*.sh ; do \
145		sed -e 's#$(libdir)/[^/ ]*\([/ ]\)#$(LIB_RUNTIME_DIR)\1#' \
146			$$p > $$p.1 && mv -f $$p.1 $$p ; \
147	done
148
149install: collate
150	mkdir -p    $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
151	for p in Img/exec_prefix/lib/Img/* ; do \
152		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)/`basename $$p` ; \
153	done
154	mkdir -p $(INSTALL_ROOT)$(libdir)
155	for p in Img/exec_prefix/lib/*.sh ; do \
156		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(libdir)/`basename $$p` ; \
157	done
158	if [ -n "`ls Img/prefix/include`" ]; then \
159	mkdir -p $(INSTALL_ROOT)$(includedir) && \
160	for p in Img/prefix/include/* ; do \
161		$(INSTALL_DATA) $$p $(INSTALL_ROOT)$(includedir)/`basename $$p` ; \
162	done; fi
163
164
165bindist:
166
167#-------------------------------------------------------#
168
169clean:
170	for sub in $(SUBDIRS) ; \
171	do	\
172		here=`pwd` && \
173		cd $$sub && \
174		$(MAKE) clean || exit $$? && \
175		cd $$here ; \
176	done
177	rm -rf Img
178
179distclean:	clean
180	rm -f config.* $(jpegdir)/config.log $(jpegdir)/config.status
181	rm -f Makefile
182	for sub in $(SUBDIRS) ; \
183	do	\
184		here=`pwd` && \
185		cd $$sub && \
186		$(MAKE) distclean || exit $$? && \
187		cd $$here ; \
188	done
189
190#-------------------------------------------------------#
191# DO NOT DELETE THIS LINE -- make depend depends on it.
192