# Main PDFlib Makefile
# $Id: Makefile.in,v 1.20.10.2 2001/05/17 13:34:13 tm Exp $

VERSION = @VERSION@

SHELL = @SHELL@
INSTALL = @INSTALL@

VPATH = @srcdir@
srcdir = @srcdir@

# installation directories
prefix 		= @prefix@
exec_prefix 	= @exec_prefix@
libdir 		= @libdir@
includedir 	= @includedir@
bindir      	= @bindir@

# ------------------------- default target  -------------------------------

all:	pdflib @LIBTARGETS@ @BINDINGS@

pdflib:: @LIBTARGETS@
	cd pdflib && $(MAKE)

libpdi:
	cd pdi && $(MAKE)

libtiff:
	cd tiff && $(MAKE)

libpng:
	cd png && $(MAKE)

libz:
	cd flate && $(MAKE)

clients: pdflib
	-cd clients && $(MAKE)

c: pdflib
	-cd bind/c && $(MAKE)

cpp: pdflib
	-cd bind/cpp && $(MAKE)

java: pdflib
	-cd bind/java && $(MAKE)

perl: pdflib
	-cd bind/perl && $(MAKE)

python: pdflib
	-cd bind/python && $(MAKE)

tcl: pdflib
	-cd bind/tcl && $(MAKE)

# --------------------------- test ---------------------------------

test: pdflib testprog @BINDINGS_TEST@

testprog:
	-cd test; $(MAKE) test

c_test:
	-cd bind/c && $(MAKE) test

cpp_test:
	-cd bind/cpp && $(MAKE) test

java_test:
	-cd bind/java && $(MAKE) test

perl_test:
	-cd bind/perl && $(MAKE) test

python_test:
	-cd bind/python && $(MAKE) test

tcl_test:
	-cd bind/tcl && $(MAKE) test


# --------------------------- pditest ---------------------------------

pditest: pdflib pdi_c_test pdi_cpp_test pdi_java_test pdi_perl_test pdi_python_test pdi_tcl_test

pdi_c_test:
	-cd bind/c && $(MAKE) pditest

pdi_cpp_test:
	-cd bind/cpp && $(MAKE) pditest

pdi_java_test:
	-cd bind/java && $(MAKE) pditest

pdi_perl_test:
	-cd bind/perl && $(MAKE) pditest

pdi_python_test:
	-cd bind/python && $(MAKE) pditest

pdi_tcl_test:
	-cd bind/tcl && $(MAKE) pditest


# --------------------------- install ---------------------------------

install: pdflib_install @BINDINGS_INSTALL@
	$(INSTALL) pdflib-config $(bindir)

pdflib_install:
	-cd pdflib && $(MAKE) install

# No install to be done for C and C++ bindings (this is done in the main PDFlib Makefile)

c_install:

cpp_install:

java_install:
	-cd bind/java && $(MAKE) install

perl_install:
	-cd bind/perl && $(MAKE) install

python_install:
	-cd bind/python && $(MAKE) install

tcl_install:
	-cd bind/tcl && $(MAKE) install

# --------------------------- uninstall ---------------------------------

uninstall: pdflib_uninstall @BINDINGS_UNINSTALL@

pdflib_uninstall:
	-cd pdflib && $(MAKE) uninstall

c_uninstall:

cpp_uninstall:

java_uninstall:
	-cd bind/java && $(MAKE) uninstall

perl_uninstall:
	-cd bind/perl && $(MAKE) uninstall

python_uninstall:
	-cd bind/python && $(MAKE) uninstall

tcl_uninstall:
	-cd bind/tcl && $(MAKE) uninstall

# --------------------------- clean ---------------------------------

clean: pdflib_clean @BINDINGS_CLEAN@

pdflib_clean:
	-cd pdflib && $(MAKE) clean
	-cd png && $(MAKE) clean
	-cd tiff && $(MAKE) clean
	-cd flate && $(MAKE) clean
	-cd pdi && $(MAKE) clean
	-cd test && $(MAKE) clean
	-cd clients && $(MAKE) clean
	-cd util && $(MAKE) clean

c_clean:
	-cd bind/c && $(MAKE) clean

cpp_clean:
	-cd bind/cpp && $(MAKE) clean

java_clean:
	-cd bind/java && $(MAKE) clean

perl_clean:
	-cd bind/perl && $(MAKE) clean

python_clean:
	-cd bind/python && $(MAKE) clean

tcl_clean:
	-cd bind/tcl && $(MAKE) clean

distclean: clean
	-$(RM) libtool pdflib-config config.cache config.log config.status Makefile dist.mak bind/c/Makefile bind/cpp/Makefile bind/java/Makefile bind/perl/Makefile bind/python/Makefile bind/tcl/Makefile test/Makefile pdflib/Makefile pdi/Makefile flate/Makefile png/Makefile tiff/Makefile clients/Makefile util/Makefile

# We don't bother with dependencies in the clients, sample, and wrapper files
# since these don't really change.

depend:
	-cd pdflib && $(MAKE) depend
	-cd pdi && $(MAKE) depend
	-cd png && $(MAKE) depend
	-cd tiff && $(MAKE) depend
	-cd flate && $(MAKE) depend
	-cd pdi && $(MAKE) depend
	-cd util && $(MAKE) depend
