summaryrefslogtreecommitdiffstats
path: root/hl/fortran/examples/Makefile.am
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2005-12-09 20:59:11 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2005-12-09 20:59:11 (GMT)
commitb1fd3f565750a18246239cdac50e433d6d668524 (patch)
treef09179e1fb2a04e01983c85f9a3873c159fefda7 /hl/fortran/examples/Makefile.am
parent9124030f911f002bd49ec8bccd4c051df410cc72 (diff)
downloadhdf5-b1fd3f565750a18246239cdac50e433d6d668524.zip
hdf5-b1fd3f565750a18246239cdac50e433d6d668524.tar.gz
hdf5-b1fd3f565750a18246239cdac50e433d6d668524.tar.bz2
[svn-r11780] Purpose:
Added high-level example directories Description: Refactored common code out of examples Makefiles.am, added high-level example directories, added packet table examples. Solution: Examples now draw from a common config/examples.am file, which contains rules for installing, uninstalling, and cleaning examples. High-level example directories are mostly empty, except for the C and C++ packet table tests. Platforms tested: mir, sleipnir, copper, shanti
Diffstat (limited to 'hl/fortran/examples/Makefile.am')
-rw-r--r--hl/fortran/examples/Makefile.am61
1 files changed, 61 insertions, 0 deletions
diff --git a/hl/fortran/examples/Makefile.am b/hl/fortran/examples/Makefile.am
new file mode 100644
index 0000000..168d677
--- /dev/null
+++ b/hl/fortran/examples/Makefile.am
@@ -0,0 +1,61 @@
+#
+# 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.
+##
+## Makefile.am
+## Run automake to generate a Makefile.in from this file.
+##
+#
+# HDF5-Fortran Examples Makefile(.in)
+#
+
+include $(top_srcdir)/config/commence.am
+
+# Compile parallel fortran examples only if parallel is enabled
+if BUILD_PARALLEL_CONDITIONAL
+ TEST_PROG_PARA=
+endif
+
+# These are the programs that 'make all' or 'make tests' will build and
+# that 'make check' will run. List them in the order in which they should
+# be run.
+# We don't tell automake about these programs so that it doesn't try to
+# compile them with the regular fortran compiler.
+TEST_PROG=
+
+# List files to be installed here
+INSTALL_FILES=
+
+# Mark this directory as part of the Fortran API
+HDF_FORTRAN=yes
+
+# Tell automake how to build examples using h5fc
+# Additional dependencies for the examples are listed below
+$(EXTRA_PROG): $(LIBHDF5) $(LIBH5F) $(LIBH5F_HL)
+if BUILD_PARALLEL_CONDITIONAL
+ $(H5FC_PP) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+else
+ $(H5FC) $(FCFLAGS) -o $@ $(srcdir)/$@.f90;
+endif
+
+# Tell automake how to install examples
+EXAMPLEDIR=$(docdir)/hdf5/examples/hl/fortran
+
+# List dependencies for each example. Normally, automake would take
+# care of this for us, but if we tell automake about the programs it
+# will try to build them with the normal C compiler, not h5cc. This is
+# an inelegant way of solving the problem.
+# All programs share the same build rule and a dependency on the main hdf5
+# and fortran libraries above.
+
+include $(top_srcdir)/config/examples.am
+include $(top_srcdir)/config/conclude.am