# Generated automatically from Makefile.in by configure.
# HDF5 Library Makefile(.in)
#
# Copyright (C) 1997,2001
#                    National Center for Supercomputing Applications.
#                    All rights reserved.
#
# 
top_srcdir=../..
top_builddir=../..
srcdir=.
VPATH=.:.

##------------------------------------------------------------ -*- makefile -*-
## The following section of this makefile comes from the
## `./config/commence' file which was generated with config.status
## from `./config/commence.in'.
##-----------------------------------------------------------------------------

## Things that Make needs
.SUFFIXES:
.SUFFIXES: .c .o .lo


## Directories to search
VPATH=$(srcdir) $(top_builddir)/src $(top_srcdir)/src

## Programs
SHELL=/bin/sh
CC=gcc
CFLAGS=-O3  -pipe -mcpu=pentiumpro -march=i586 -ffast-math -fno-strength-reduce -fno-omit-frame-pointer  -ansi -pedantic -Wchar-subscripts -Wall -W -Wshadow -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Winline 
CPPFLAGS=-DH5_DEBUG_API -DNDEBUG -I/usr/include -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 
LDFLAGS=
ROOT=/home/ghibo/rpm/BUILD/hdf5-1.4.2-patch1
LIBS=-lssl -lcrypto -lz -lmfhdf -ldf -ljpeg -lz -lm 
AR=ar
RANLIB=ranlib
RM=rm -f
CP=cp
INSTALL=/usr/bin/install -c
INSTALL_PROGRAM=${INSTALL}
INSTALL_DATA=${INSTALL} -m 644
RUNSERIAL=
RUNPARALLEL=
RUNTEST=$(RUNSERIAL)
TRACE=:

## Installation points
prefix=/usr
exec_prefix=/usr
bindir=/usr/bin
libdir=/usr/lib
includedir=/usr/include
docdir=/usr/doc
PUB_LIB=$(LIB)

## Shared libraries
LT_STATIC_EXEC=
DYNAMIC_DIRS=
LT=$(top_builddir)/libtool
LT_COMPILE=$(LT) --mode=compile $(CC)
LT_LINK_LIB=$(LT) --mode=link $(CC) -rpath $(libdir) $(DYNAMIC_DIRS)
LT_LINK_EXE=$(LT) --mode=link $(CC) $(LT_STATIC_EXEC) -dlopen self -rpath $(bindir) $(DYNAMIC_DIRS)
LT_RUN=$(LT) --mode=execute
LT_INSTALL_PROG=$(LT) --mode=install $(INSTALL_PROGRAM)
LT_INSTALL_LIB=$(LT) --mode=install $(INSTALL_DATA)
LT_UNINSTALL=$(LT) --mode=uninstall $(RM)

## Optional variables. We must declare them here because Irix pmake
## complains if it sees a reference to a variable which has never been
## defined. The main makefile is free to redefine these to something else.
DOCDIR=$(docdir)
LIB=
LIB_SRC=
LIB_OBJ=
PUB_HDR=
PUB_PROGS=
PUB_DOCS=
PROGS=
TEST_PROGS=
TEST_FLAGS=
TEST_SCRIPTS=

## The default is to build the library and/or programs.  We must build
## them sequentially.
all:
	$(MAKE) lib
	$(MAKE) progs
	$(MAKE) tests

## The following rules insure that the Makefile is up-to-date by rerunning
## various autoconf components (although not all versions of make assume
## that the makefile is implicitly a target).  We use time stamp files to
## keep track of the most recent update of H5config.h.in and H5config.h
## because autoheader and config.status don't update the modification time
## if the contents don't change.
## Invoke it by "gmake reconfigure".
##
## Graphically, the dependencies are:
##
##		         configure.in
##                           |  |
##         +-----------------+  +------------+
##         |                                 |
##      stamp1                           configure
##   (H5config.h.in)                         |
##       |  |                                |
##       |  +---------------+    +-----------+
##       |                  |    |
##       |               config.status
##       |                     |
##       |  +------------------+
##       |  |
##      stamp2
##    (H5config.h)                   Makefile.in et al
##         |                                 |
##         +------------------+  +-----------+
##                            |  |
##                          Makefile
##
## A side effect of updating stamp1 is to generate H5config.h.in and a
## side effect of updating stamp2 is to generate H5config.h.  When using
## a version of make that doesn't treat the makefile as the initial target
## the user may want to occassionally type `make Makefile' in any source
## directory.
## The `Makefile' target has been renamed to `reconfigure' so that the
## autoconf and make depend processes do not start up automatically.
## One must do `make reconfigure' explicitedly to start the process.
## (When srcdir is used and if more than one machines are running,
## this automatic Makefile/autoconf can get things unstable.)
##
STAMP1=$(top_builddir)/config/stamp1
STAMP2=$(top_builddir)/config/stamp2

MAKEFILE_PARTS=$(srcdir)/Makefile.in		\
	       $(top_srcdir)/config/commence.in	\
	       $(top_srcdir)/config/conclude.in	\
	       $(top_srcdir)/config/depend1.in	\
	       $(top_srcdir)/config/depend2.in	\
	       $(top_srcdir)/config/depend3.in	\
	       $(top_srcdir)/config/depend4.in	\
	       $(top_srcdir)/config/dependN.in

$(STAMP1): $(top_srcdir)/configure.in
	touch $(STAMP1)
	-cd $(top_srcdir); autoheader

$(STAMP2): $(STAMP1) $(top_builddir)/config.status
	touch $(STAMP2)
	-cd $(top_builddir); \
	   CONFIG_FILES= CONFIG_HEADERS=src/H5config.h ./config.status

$(top_srcdir)/configure: $(top_srcdir)/configure.in
	-cd $(top_srcdir); autoconf

$(top_builddir)/config.status: $(top_srcdir)/configure $(STAMP1)
	-cd $(top_builddir); ./config.status --recheck

# rerun the autoconf process if any configure components have changed. 
reconfigure: $(MAKEFILE_PARTS) $(STAMP2)
	-cd $(top_builddir); CONFIG_HEADERS= ./config.status
	@for sub in c++ dummy; do					\
	  if test $$sub != dummy; then					\
	    -cd $$sub; $(MAKE) reconfigure;				\
	  fi;								\
	done;

##-----------------------------------------------------------------------------
## The following section of this makefile comes from the middle of
## `Makefile.in' from this directory.  It was generated by running
## `config.status'.
##-----------------------------------------------------------------------------

# Subdirectories in build-order (not including `examples')
SUBDIRS=ADGuide Graphics Intro PSandPDF TechNotes Tutor cpplus fortran
DOCDIR=$(docdir)/hdf5

# Public doc files (to be installed)...
PUB_DOCS=ADGuide.html Attributes.html Big.html Caching.html Chunk_f1.gif  \
         Chunk_f2.gif Chunk_f3.gif Chunk_f4.gif Chunk_f5.gif Chunk_f6.gif \
         Chunking.html Coding.html Copyright.html Datasets.html           \
         Dataspaces.html Datatypes.html DatatypesEnum.html Debugging.html \
         EnumMap.gif Environment.html Errors.html FF-IH_FileGroup.gif     \
         FF-IH_FileObject.gif Files.html Filters.html Glossary.html       \
         Groups.html H5.api_map.html H5.format.html H5.intro.html         \
         H5.sample_code.html H5.user.PrintGen.html H5.user.PrintTpg.html  \
         H5.user.html IH_map1.gif IH_map2.gif IH_map3.gif IH_map4.gif     \
         IH_mapFoot.gif IH_mapHead.gif IOPipe.html MountingFiles.html     \
         NCSAfooterlogo.gif Performance.html PredefDTypes.html            \
         Properties.html RM_H5.html RM_H5A.html RM_H5D.html RM_H5E.html   \
         RM_H5F.html RM_H5Front.html RM_H5G.html RM_H5I.html RM_H5P.html  \
         RM_H5R.html RM_H5S.html RM_H5T.html RM_H5Z.html References.html  \
         TechNotes.html Tools.html Version.html chunk1.gif compat.html    \
         dataset_p1.gif ddl.html extern1.gif extern2.gif group_p1.gif     \
         group_p2.gif group_p3.gif h5s.examples hdf2.jpg ph5design.html   \
         ph5example.c ph5implement.txt pipe1.gif pipe2.gif pipe3.gif      \
         pipe4.gif pipe5.gif index.html version.gif

# Other doc files (not to be installed)...
PRIVATE_DOCS=Chunk_f1.obj Chunk_f2.obj Chunk_f6.obj CodeReview.html      \
             ExternalFiles.html Lib_Maint.html MemoryManagement.html     \
             ObjectHeader.txt chunk1.obj dataset_p1.obj extern1.obj      \
             extern2.obj group_p1.obj group_p2.obj group_p3.obj heap.txt \
             move.html pipe1.obj pipe2.obj pipe3.obj pipe4.obj           \
             pipe5.obj review1.html review1a.html storage.html symtab    \
             version.obj


##------------------------------------------------------------ -*- makefile -*-
## The following section of this makefile comes from the
## `./config/conclude' file which was generated with config.status
## from `./config/conclude.in'.
##-----------------------------------------------------------------------------

## This is the target for the library described in the main body of the
## makefile.
##
lib: $(LIB)
$(LIB) __no_library__: $(LIB_OBJ)
	@$(LT_LINK_LIB) -o $@ $(CFLAGS) $(LIB_OBJ) $(LDFLAGS) $(LIBS)

progs: $(LIB) $(PROGS)

## Build a tags file in this directory.
TAGS: $(LIB_SRC)
	$(RM) $@
	-etags $(LIB_SRC)

## Runs each test in order, passing $(TEST_FLAGS) to the program.
## Since tests are done in a shell loop, "make -i" does apply inside it.
## Set HDF5_Make_Ignore to a non-blank string to ignore errors inside the loop.
tests: $(TEST_PROGS) $(LIB)
check test _test: tests
	@for test in $(TEST_PROGS) dummy; do                                  \
	   if test $$test != dummy; then				      \
	      echo "============================";			      \
	      echo "Testing $$test $(TEST_FLAGS)";			      \
	      echo "============================";			      \
	      srcdir="$(srcdir)"					      \
		 $(RUNTEST) ./$$test $(TEST_FLAGS) ||			      \
		 (test $$HDF5_Make_Ignore && echo "*** Error ignored") ||     \
		 break;							      \
	      echo "";							      \
	   fi;								      \
	done;								      \
	test $$test = dummy || false
	@for test in $(TEST_SCRIPTS) dummy; do                                \
	   if test $$test != dummy; then				      \
	      echo "============================";			      \
	      echo "Testing $$test $(TEST_FLAGS)";			      \
	      echo "============================";			      \
	      RUNSERIAL="$(RUNSERIAL)" RUNPARALLEL="$(RUNPARALLEL)"           \
	         srcdir="$(srcdir)"					      \
		 /bin/sh $$test $(TEST_FLAGS) ||		              \
		 (test $$HDF5_Make_Ignore && echo "*** Error ignored") ||     \
		 break;							      \
	      echo "";							      \
	   fi;								      \
	done;								      \
	test $$test = dummy || false

## Make installation directories directories if they don't exist.
$(libdir):
	mkdir $@ && chmod 755 $@

$(includedir):
	mkdir $@ && chmod 755 $@

$(bindir):
	mkdir $@ && chmod 755 $@

## Install the library, the public header files, and public programs.
install: $(PUB_LIB) $(PUB_HDR) $(PUB_PROGS) $(libdir) $(includedir) $(bindir)
	@for f in X $(PUB_LIB); do					      \
	   if test $$f != X; then					      \
	      ($(LT_INSTALL_LIB) $$f $(libdir)/. || exit 1);		      \
	   fi;								      \
	done
	@if test -f libhdf5.settings; then				      \
	   (set -x; $(INSTALL_DATA) libhdf5.settings $(libdir)/. || exit 1);  \
	fi
	@for f in X $(PUB_HDR); do					      \
	   if test $$f != X; then					      \
	      if test -f $$f; then					      \
		 (set -x; $(INSTALL_DATA) $$f $(includedir)/. || exit 1);     \
	      else							      \
	         (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(includedir)/. ||    \
		    exit 1);						      \
	      fi;							      \
	   fi;								      \
	done
	@for f in X $(PUB_PROGS); do					      \
	   if test $$f != X; then					      \
	     ($(LT_INSTALL_PROG) $$f $(bindir)/. || exit 1);		      \
	   fi;							              \
	done

## Install the documents.
install-doc: $(PUB_DOCS)
	@if test -d $(DOCDIR) ; then                                          \
	    :;                                                                \
	else                                                                  \
	   mkdir $(DOCDIR) && chmod 755 $(DOCDIR);                            \
	fi
	@for d in X $(SUBDIRS); do                                            \
	    if test $$d != X; then                                            \
	       (set -x; cd $$d && $(MAKE) $@) || exit 1;                      \
	    fi;                                                               \
	done
	@for f in X $(PUB_DOCS); do                                           \
	   if test $$f != X; then                                             \
	      if test -f $$f; then                                            \
		 (set -x; $(INSTALL_DATA) $$f $(DOCDIR)/. || exit 1);         \
	      else                                                            \
	         (set -x; $(INSTALL_DATA) $(srcdir)/$$f $(DOCDIR)/. ||        \
		    exit 1);                                                  \
	      fi;                                                             \
	   fi;                                                                \
	done

## Removes those things that `make install' (would have) installed.
uninstall:
	@for f in libhdf5.settings $(LIB); do				      \
            $(LT_UNINSTALL) $(libdir)/$$f;				      \
	done
	@if test "X$(PUB_HDR)" != "X"; then				      \
	   set -x; cd $(includedir) && $(RM) $(PUB_HDR);		      \
	fi
	@for f in X $(PUB_PROGS); do					      \
	    if test $$f != X; then					      \
	        $(LT_UNINSTALL) $(bindir)/$$f;				      \
	    fi;								      \
	done

## Removes those things that `make install-doc' (would have) installed.
uninstall-doc:
	@for d in X $(SUBDIRS); do					      \
	    if test $$d != X; then					      \
	       (set -x; cd $$d && $(MAKE) $@) || exit 1;                      \
	    fi;								      \
	done
	@if test "X$(PUB_DOCS)" != "X"; then				      \
	   set -x; cd $(DOCDIR) && $(RM) $(PUB_DOCS);			      \
	fi

## Removes temporary files without removing the final target files.  That is,
## remove things like object files but not libraries or executables.
##
mostlyclean:
	@for d in X $(SUBDIRS); do                                            \
	    if test $$d != X; then                                            \
		(set -x; cd $$d; $(MAKE) $@) || exit 1;                       \
	    fi;                                                               \
	done
	-$(RM) $(LIB_OBJ) $(LIB_OBJ:.lo=.o)
	-$(RM) $(TEST_OBJ) $(TEST_OBJ:.lo=.o)
	-$(RM) $(PROG_OBJ) $(PROG_OBJ:.lo=.o) $(MOSTLYCLEAN)

## Like `mostlyclean' except it also removes the final targets: things like
## libraries and executables.  This target doesn't remove any file that
## is part of the HDF5 distribution.
##
clean: mostlyclean
	@for d in X $(SUBDIRS); do                                            \
	    if test $$d != X; then                                            \
		(set -x; cd $$d; $(MAKE) $@) || exit 1;                       \
	    fi;                                                               \
	done
	-$(RM) $(LIB) $(TEST_PROGS) $(PROGS) $(CLEAN)
	-$(RM) -r .libs

## Like `clean' except it also removes files that were created by running
## configure.  If you've unpacked the source and built HDF5 without creating
## any other files, then `make distclean' will leave only the files that were
## in the distribution.
##
distclean: clean
	-$(RM) .depend TAGS *~ core *.core *.bak *.old *.new $(DISTCLEAN)
	@for d in X $(SUBDIRS); do                                            \
	    if test $$d != X; then                                            \
		(set -x; cd $$d; $(MAKE) $@) || exit 1;                       \
	    fi;                                                               \
	done
	@if test -f $(srcdir)/Makefile.in; then				      \
	   (set -x; $(RM) Makefile);					      \
	fi


## Like `distclean' except it deletes all files that can be regenerated from
## the makefile, including those generated from autoheader and autoconf.
##
maintainer-clean: distclean
	@for d in X $(SUBDIRS); do                                            \
	    if test $$d != X; then                                            \
		(set -x; cd $$d; $(MAKE) $@) || exit 1;                       \
	    fi;                                                               \
	done
	-$(RM) *~ core core.* *.core *.bak *.contrib gmon.out

## Implicit rules
##
.c.o:
	$(CC) $(CFLAGS) $(CPPFLAGS) -c $<

.c.lo:
	@$(LT_COMPILE) $(CFLAGS) $(CPPFLAGS) -c $<

##-----------------------------------------------------------------------------
## The following section of this makefile contains dependencies between the
## source files and the header files.
##-----------------------------------------------------------------------------
.PHONY: dep depend
dep depend: $(srcdir)/Dependencies


##                                                             -*- makefile -*-

## We keep a list of dependencies in `.depend' for each of the source
## files on which it depends.  When one of the source files is modified
## we remove its record from .depend and regenerate its dependencies,
## tacking them onto the end of .depend.  By including the .depend file
## into the makefile, we're telling make that the makefile depends on
## the dependency list in the .depend file.
##
## This is as fast as the `.d' method described in the GNU make manual
## for automatic dependencies, but has the added advantage that all
## dependencies are stored in one place.  The advantage over the
## `makedepend' program is that only those files that are out of date
## have dependency information rebuilt, and the Makefile is not
## modified.
##
## This is also where tracing information is updated.  The $(TRACE)
## program is run on each source file to make sure that the H5TRACE()
## macros are up to date.  If they are then the file is not modified,
## otherwise the file is changed and a backup is saved by appending a
## tilde to the file name.
##
$(srcdir)/Dependencies: .depend
	@if test "$(srcdir)" != "."; then				      \
	    echo '## This file is machine generated on GNU systems.' >$@;     \
	    echo '## Only temporary changes may be made here.' >>$@;	      \
	    echo >>$@;					      		      \
	    perl -p $(top_srcdir)/bin/distdep .depend >>$@;		      \
	else								      \
	    echo 'Dependencies cannot be built when $$srcdir == $$builddir';  \
	fi

.depend: $(LIB_SRC) $(TEST_SRC) $(PROG_SRC)
	@touch .depend
	@for dep in $? dummy; do					      \
	   if [ $$dep != "dummy" ]; then				      \
	      case "$$dep" in						      \
	         *.c)							      \
	            echo Building dependencies for $$dep;		      \
	            obj=`basename $$dep .c`.lo;				      \
	            sed '\%^'"$$obj"':%,\%[^\\]$$%d' <$@ >$@- && mv $@- $@;   \
	            $(TRACE) $$dep;					      \
	            $(CC) -MM -MG $(CPPFLAGS) $$dep 2>/dev/null |	      \
                        sed 's% $(srcdir)/% $$(srcdir)/%g' |		      \
                        sed 's% $(top_srcdir)/% $$(top_srcdir)/%g' |	      \
                        sed 's% $(top_builddir)/% $$(top_builddir)/%g' |      \
	                sed 's/\.o/.lo/' >>$@;				      \
	            ;;							      \
	      esac;							      \
	   fi;								      \
	done;

-include .depend
