# Generated automatically from Makefile.in by configure.
#
# This file is a Makefile for IMG.  If it has the name "Makefile.in"
# then it is a template for a Makefile;  to generate the actual Makefile,
# run "./configure", which is a configuration script generated by the
# "autoconf" program (constructs like "@foo@" will get replaced in the
# actual Makefile.

# This is the master makefile to compile all the packages in this
# extensions in one go.

EXTENSION	=	Img
VERSION		=	1.3
CYGPATH		=	@CYGPATH@
SUBDIRS		=	 libz/tcl libpng/tcl libtiff/tcl libjpeg/tcl base bmp gif ico jpeg pcx pixmap png ppm ps sgi sun tga tiff window xbm xpm

#
#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
# site (you can make these changes in either Makefile.in or
# Makefile, but changes to Makefile will get lost if you re-run
# the configuration script).
#----------------------------------------------------------------

# Directory in which the source of this extension can be found
srcdir		=	.

# Default top-level directories in which to install architecture-
# specific files (exec_prefix) and machine-independent files such
# as scripts (prefix).  The values specified here may be overridden
# at configure-time with the --exec-prefix and --prefix options
# to the "configure" script.

prefix		=	/usr
exec_prefix	=	${prefix}
libdir          =	${exec_prefix}/lib
includedir      =	${prefix}/include

# Directory containing scripts supporting the work of this makefile
tool		=	$(srcdir)/tools

INSTALL		= /usr/bin/install -c
INSTALL_PROGRAM	= ${INSTALL}
INSTALL_DATA	= ${INSTALL} -m 644
INSTALL_SCRIPT	= ${INSTALL_PROGRAM}


# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =

# Directory where libimg.a is at run-time:
LIB_RUNTIME_DIR =	$(libdir)/$(EXTENSION)$(VERSION)

# Directory in which to install the archive libimg.a:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)$(LIB_RUNTIME_DIR)

# Directory in which to install the extended shell tclsh:
BIN_INSTALL_DIR =	$(INSTALL_ROOT)$(exec_prefix)/bin

# Directory in which to install the include file transform.h:
INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/include

# Top-level directory in which to install manual entries:
MAN_INSTALL_DIR =	$(INSTALL_ROOT)$(prefix)/man

# Directory where libz, libpng and libjpeg are (or will be) installed.
IMG_INSTALL_DIR	=	$(INSTALL_ROOT)$(IMG_RUNTIME_DIR)

# Some versions of make, like SGI's, use the following variable to
# determine which shell to use for executing commands:
SHELL =		/bin/sh

#----------------------------------------------------------------
# The information below is modified by the configure script when
# Makefile is generated from Makefile.in.  You shouldn't normally
# modify any of this stuff by hand.
#----------------------------------------------------------------

INSTALL_PROGRAM =	$(INSTALL) -m 744
INSTALL_DATA =		$(INSTALL) -m 644
INSTALL_SHLIB =		$(INSTALL) -m 555
RANLIB =		ranlib
SHLIB_SUFFIX =		@SHLIB_SUFFIX@

#----------------------------------------------------------------

#-------------------------------------------------------#

default:	all

all:
	for sub in $(SUBDIRS) ; \
	do	\
		here=`pwd` ; \
		cd $$sub ; \
		$(MAKE) all ; \
		cd $$here ; \
	done

test:	all
	for sub in $(SUBDIRS) ; \
	do	\
		here=`pwd` ; \
		cd $$sub ; \
		$(MAKE) test ; \
		cd $$here ; \
	done

collate: all
	rm -f pkgIndex.tcl
	touch pkgIndex.tcl
	for sub in $(SUBDIRS) ; \
	do	\
		here=`pwd` ; \
		cd $$sub ; \
		$(MAKE) install \
			exec_prefix=$$here/Img/exec_prefix		\
			prefix=$$here/Img/prefix			\
			pkglibdir=$$here/Img/exec_prefix/lib/Img	\
			;						\
		cd $$here ; \
		cat Img/exec_prefix/lib/Img/pkgIndex.tcl >> pkgIndex.tcl ; \
	done
	mv pkgIndex.tcl Img/exec_prefix/lib/Img/pkgIndex.tcl

install: collate
	mkdir -p    $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)
	for p in Img/exec_prefix/lib/Img/* ; do \
		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(LIB_RUNTIME_DIR)/`basename $$p` ; \
	done
	mkdir -p $(INSTALL_ROOT)$(libdir)
	for p in Img/exec_prefix/lib/*.sh ; do \
		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(libdir)/`basename $$p` ; \
	done
	mkdir -p $(INSTALL_ROOT)$(includedir)
	for p in Img/prefix/include/* ; do \
		$(INSTALL_PROGRAM) $$p $(INSTALL_ROOT)$(includedir)/`basename $$p` ; \
	done


bindist:

#-------------------------------------------------------#

clean:
	for sub in $(SUBDIRS) ; \
	do	\
		here=`pwd` ; \
		cd $$sub ; \
		$(MAKE) clean ; \
		cd $$here ; \
	done
	rm -rf Img

distclean:	clean
	rm -f config.* $(jpegdir)/config.log $(jpegdir)/config.status
	rm -f Makefile
	for sub in $(SUBDIRS) ; \
	do	\
		here=`pwd` ; \
		cd $$sub ; \
		$(MAKE) distclean ; \
		cd $$here ; \
	done

#-------------------------------------------------------#
# DO NOT DELETE THIS LINE -- make depend depends on it.
