summaryrefslogtreecommitdiffstats
path: root/fortran/src/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src/Makefile.am')
-rw-r--r--fortran/src/Makefile.am157
1 files changed, 42 insertions, 115 deletions
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index a4b3843..734f46e 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -42,42 +42,13 @@ else
AM_LDFLAGS+=-static
endif
-# Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled
-if BUILD_PARALLEL_CONDITIONAL
- PARALLEL_COND_SRC = H5FDmpiof.c HDF5mpio.f90 H5FDmpioff.f90
-else
- PARALLEL_COND_SRC = HDF5.f90
-endif
-
-# Check if the compiler supports the Fortran 2003 standard
-# which should include the intrinsic module iso_c_binding
-if FORTRAN_2003_CONDITIONAL_F
- F_STATUS = _F03
-else
- F_STATUS = _F90
-endif
-
-# Condition for including/excluding the DBLE interfaces for when the
-# default REAL is of type DOUBLE PRECISION.
-# We do not include the double precision interfaces if the defaut REAL is
-# DOUBLE PRECISION since this would lead to a non-unique conflict with the
-# generic interfaces declared as REAL.
-if FORTRAN_DEFAULT_REALisDBLE_F
- F_DBLE = Exclude
-else
- F_DBLE = Include
-endif
-
# Source files for the library.
-libhdf5_fortran_la_SOURCES=H5f90global.f90 \
- H5fortran_types.f90 H5_ff$(F_STATUS).f90 H5_ff.f90 H5Aff.f90 H5Dff.f90 H5Eff.f90 \
- H5Fff.f90 H5Gff.f90 H5Iff.f90 H5Lff.f90 H5Off.f90 H5Pff.f90 H5Rff.f90 H5Sff.f90 \
- H5Tff.f90 H5Zff.f90 \
- H5_DBLE_Interface$(F_DBLE).f90 \
+libhdf5_fortran_la_SOURCES=H5f90global.F90 \
+ H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
+ H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
+ H5Tff.F90 H5Zff.F90 H5_gen.f90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
- H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c \
- H5Aff$(F_STATUS).f90 H5Dff$(F_STATUS).f90 H5Eff$(F_STATUS).f90 H5Fff$(F_STATUS).f90 H5Lff$(F_STATUS).f90 \
- H5Off$(F_STATUS).f90 H5Pff$(F_STATUS).f90 H5Rff$(F_STATUS).f90 H5Tff$(F_STATUS).f90 $(PARALLEL_COND_SRC)
+ H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.f90
# HDF5 Fortran library depends on HDF5 Library.
libhdf5_fortran_la_LIBADD=$(LIBHDF5)
@@ -86,11 +57,10 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5)
# Remove it only when distclean.
DISTCLEANFILES=h5fc
-# H5fortran_types.f90 and H5f90i.h are automatically generaed by
+# H5fortran_types.F90 and H5f90i.h are automatically generaed by
# H5match_types, and must be cleaned explicitly. H5fort_type_defines.h
# is generated by H5fortran_detect
-MOSTLYCLEANFILES=H5fortran_types.f90 H5f90i_gen.h H5fort_type_defines.h \
- H5fortran_detect.f90
+MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
@@ -136,55 +106,35 @@ endif
# programs.
# It's a bit tricky to make sure that Automake builds things in the right
# order (especially when using 'gmake -j ...')
-# H5test_kind is compiled and run to produce H5fortran_detect.f90.
-# H5fortran_detect is compiled and run to produce H5fort_type_defines.h.
-# H5match_types.c then includes this file and can be compiled into
+# H5_buildiface is compiled and run to produce H5_gen.F90.
+# H5match_types.c then includes H5fort_type_defines.h and can be compiled into
# H5match_types. When H5match_types is run, it creates H5f90i_gen.h
-# and H5fortran_types.f90, which are included in the Fortran library.
+# and H5fortran_types.F90, which are included in the Fortran library.
# These are the helper programs we need to build.
-noinst_PROGRAMS = H5match_types H5fortran_detect H5test_kind
+noinst_PROGRAMS = H5match_types H5_buildiface
# Tell Automake to create H5f90i_gen.h before it builds the library
# sources. When it creates H5f90i_gen.h, it will create
-# H5fortran_types.f90 as a side effect.
+# H5fortran_types.F90 as a side effect.
BUILT_SOURCES = H5f90i_gen.h
#Specify what Automake needs to create: first the H5fort_type_defines.h
# header, then H5match_types which includes that header, then
# it needs to run H5match_types.
-H5fortran_types.f90 H5f90i_gen.h: H5match_types$(EXEEXT)
+H5fortran_types.F90 H5f90i_gen.h: H5match_types$(EXEEXT)
$(RUNSERIAL) ./H5match_types$(EXEEXT)
-# H5fort_type_defines.h is created by running H5fortran_detect.
-# Obviously, H5fortran_detect needs to be built first.
-H5fort_type_defines.h: H5fortran_detect$(EXEEXT)
- $(RUNSERIAL) ./H5fortran_detect$(EXEEXT) > H5fort_type_defines.h
-
-H5match_types.$(OBJEXT): H5fort_type_defines.h
-
-# Automake knows how to build fortran programs if we tell it the source
-# files.
-H5fortran_detect_SOURCES = H5fortran_detect.f90
+# H5_buildiface.F90 generates all the APIs that have a KIND type associated
+# with them.
-# H5test_kind.f90 generates H5Fortran_detect.f90 depending on if
-# intrinsic function SIZEOF is available.
+H5_gen.F90: H5_buildiface$(EXEEXT)
+ $(RUNSERIAL) ./H5_buildiface$(EXEEXT)
-H5fortran_detect.f90: H5test_kind$(EXEEXT)
- $(RUNSERIAL) ./H5test_kind$(EXEEXT) > H5fortran_detect.f90
-
-# H5test_kind.f90 is included in the distribution, and Automake knows
+# H5_buildiface.F90 is included in the distribution, and Automake knows
# how to compile a fortran program given its sources.
-if FORTRAN_HAVE_STORAGE_SIZE
- H5test_kind_SOURCES = H5test_kind_STORAGE_SIZE.f90
-else
-if FORTRAN_HAVE_SIZEOF
- H5test_kind_SOURCES = H5test_kind_SIZEOF.f90
-else
- H5test_kind_SOURCES = H5test_kind.f90
-endif
-endif
+H5_buildiface_SOURCES = H5_buildiface.F90
# Mark this directory as part of the Fortran API
FORTRAN_API=yes
@@ -193,51 +143,28 @@ FORTRAN_API=yes
# determining this automagically (like we do with the C files). So, when
# doing a parallel make, some modules could be made way before the
# modules they depend upon are actually made. *sigh*
-H5f90global.lo: $(srcdir)/H5f90global.f90 H5fortran_types.lo
-H5fortran_types.lo: H5fortran_types.f90
-H5fortran_detect.lo: H5fortran_detect.f90
-H5test_kind.lo: $(srcdir)/H5test_kind.f90
-H5test_kind_SIZEOF.lo: $(srcdir)/H5test_kind_SIZEOF.f90
-H5_ff$(F_STATUS).lo: $(srcdir)/H5_ff$(F_STATUS).f90 H5f90global.lo
-H5_ff.lo: $(srcdir)/H5_ff.f90 H5f90global.lo H5_ff$(F_STATUS).lo
-H5Aff.lo: $(srcdir)/H5Aff.f90 H5f90global.lo
-H5Dff.lo: $(srcdir)/H5Dff.f90 H5f90global.lo
-H5Aff$(F_STATUS).lo: $(srcdir)/H5Aff$(F_STATUS).f90 H5f90global.lo
-H5Dff$(F_STATUS).lo: $(srcdir)/H5Dff$(F_STATUS).f90 H5f90global.lo
-H5Eff$(F_STATUS).lo: $(srcdir)/H5Eff$(F_STATUS).f90 H5f90global.lo
-H5Fff$(F_STATUS).lo: $(srcdir)/H5Fff$(F_STATUS).f90 H5f90global.lo
-H5Lff$(F_STATUS).lo: $(srcdir)/H5Lff$(F_STATUS).f90 H5f90global.lo
-H5Off$(F_STATUS).lo: $(srcdir)/H5Off$(F_STATUS).f90 H5f90global.lo
-H5Pff$(F_STATUS).lo: $(srcdir)/H5Pff$(F_STATUS).f90 H5f90global.lo
-H5Rff$(F_STATUS).lo: $(srcdir)/H5Rff$(F_STATUS).f90 H5f90global.lo
-H5Tff$(F_STATUS).lo: $(srcdir)/H5Tff$(F_STATUS).f90 H5f90global.lo
-H5Eff.lo: $(srcdir)/H5Eff.f90 H5f90global.lo
-H5Fff.lo: $(srcdir)/H5Fff.f90 H5f90global.lo
-H5Gff.lo: $(srcdir)/H5Gff.f90 H5f90global.lo
-H5Iff.lo: $(srcdir)/H5Iff.f90 H5f90global.lo
-H5Lff.lo: $(srcdir)/H5Lff.f90 H5f90global.lo
-H5Off.lo: $(srcdir)/H5Off.f90 H5f90global.lo
-H5Pff.lo: $(srcdir)/H5Pff.f90 H5f90global.lo
-H5Rff.lo: $(srcdir)/H5Rff.f90 H5f90global.lo
-H5Sff.lo: $(srcdir)/H5Sff.f90 H5f90global.lo
-H5Tff.lo: $(srcdir)/H5Tff.f90 H5f90global.lo
-H5Zff.lo: $(srcdir)/H5Zff.f90 H5f90global.lo
-H5_DBLE_Interface$(F_DBLE).lo: $(srcdir)/H5_DBLE_Interface$(F_DBLE).f90 H5Aff$(F_STATUS).lo H5Dff$(F_STATUS).lo H5Fff$(F_STATUS).lo H5Eff$(F_STATUS).lo H5Pff$(F_STATUS).lo
-HDF5.lo: $(srcdir)/HDF5.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo H5Aff.lo H5Aff$(F_STATUS).lo \
- H5Dff.lo H5Dff$(F_STATUS).lo \
- H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
- H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
- H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
- H5_DBLE_Interface$(F_DBLE).lo
-H5FDmpioff.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo
-HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo H5_ff.lo \
- H5Aff.lo H5Aff$(F_STATUS).lo \
- H5Dff.lo H5Dff$(F_STATUS).lo \
- H5Eff.lo H5Eff$(F_STATUS).lo \
- H5Fff.lo H5Fff$(F_STATUS).lo H5Gff.lo H5Iff.lo H5Lff.lo H5Lff$(F_STATUS).lo \
- H5Off.lo H5Off$(F_STATUS).lo H5Pff.lo H5Pff$(F_STATUS).lo H5Rff$(F_STATUS).lo H5Rff.lo \
- H5Sff.lo H5Tff.lo H5Tff$(F_STATUS).lo H5Zff.lo \
- H5_DBLE_Interface$(F_DBLE).lo H5FDmpioff.lo
+H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo
+H5_buildiface.lo: $(srcdir)/H5_buildiface.F90
+H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo
+H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo
+H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo
+H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo
+H5Fff.lo: $(srcdir)/H5Fff.F90 H5f90global.lo
+H5Gff.lo: $(srcdir)/H5Gff.F90 H5f90global.lo
+H5Iff.lo: $(srcdir)/H5Iff.F90 H5f90global.lo
+H5Lff.lo: $(srcdir)/H5Lff.F90 H5f90global.lo
+H5Off.lo: $(srcdir)/H5Off.F90 H5f90global.lo
+H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo
+H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo
+H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo
+H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo
+H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo
+H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo
+HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \
+ H5Dff.lo \
+ H5Eff.lo \
+ H5Fff.lo H5Gff.lo H5Iff.lo H5Lff.lo \
+ H5Off.lo H5Pff.lo H5Rff.lo \
+ H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo
include $(top_srcdir)/config/conclude.am