# HDF5 Library Makefile(.in) # # Copyright by the Board of Trustees of the University of Illinois. # All rights reserved. # # This file is part of HDF5. The full HDF5 copyright notice, including # terms governing use, modification, and redistribution, is contained in # the files COPYING and Copyright.html. COPYING can be found at the root # of the source code distribution tree; Copyright.html can be found at the # root level of an installed copy of the electronic HDF5 document set and # is linked from the top-level documents page. It can also be found at # http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html. If you do not have # access to either file, you may request a copy from hdfhelp@ncsa.uiuc.edu. # 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=-O2 -fsigned-char -frename-registers -mcpu=750 -mtune=7450 -pipe -ansi -pedantic -Wall -W -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline CPPFLAGS=-DH5_DEBUG_API -DNDEBUG -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_POSIX_SOURCE -D_BSD_SOURCE LDFLAGS= ROOT=/home/stew/rpm-rebuilder/RPM/BUILD/hdf5-1.4.4 LIBS=-lz -lm AR=ar RANLIB=ranlib PERL=perl 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 $(libdir) $(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_PROGS_PARA= 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 SUBDIRS= DOCDIR=$(docdir)/hdf5/Intro # Public doc files (to be installed)... PUB_DOCS=IntroExamples.html # Other doc files (not to be installed)... PRIVATE_DOCS= ##------------------------------------------------------------ -*- 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) $(TEST_PROGS_PARA) $(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_PROGS_PARA) dummy; do \ if test $$test != dummy; then \ echo "============================"; \ echo "Testing $$test $(TEST_FLAGS)"; \ echo "============================"; \ srcdir="$(srcdir)" \ $(RUNPARALLEL) ./$$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): $(top_srcdir)/bin/mkdirs $@ $(includedir): $(top_srcdir)/bin/mkdirs $@ $(bindir): $(top_srcdir)/bin/mkdirs $@ ## 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) $(TEST_PROGS_PARA) $(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 test $$dep != "dummy" -a -n "$(PERL)"; 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 >>$@; \ $(PERL) -w $(top_srcdir)/bin/dependencies --srcdir=$(srcdir) --top_srcdir=$(top_srcdir) --top_builddir=$(top_builddir) $@; \ ;; \ esac; \ fi; \ done -include .depend