diff options
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/Makefile.am | 6 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 35 | ||||
-rwxr-xr-x | fortran/src/h5fc.in | 4 |
3 files changed, 26 insertions, 19 deletions
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am index 3a9c3f2..d2644a1 100644 --- a/fortran/src/Makefile.am +++ b/fortran/src/Makefile.am @@ -24,7 +24,7 @@ include $(top_srcdir)/config/lt_vers.am # Include src directory in both Fortran and C flags (C compiler is used # for linking). INCLUDES=-I$(top_srcdir)/src -AM_FCFLAGS=-I$(top_srcdir)/src -I$(top_srcdir)/fortran/src +AM_FCFLAGS+=-I$(top_srcdir)/src -I$(top_srcdir)/fortran/src AM_FCLIBS=$(LIBHDF5) @@ -32,14 +32,14 @@ AM_FCLIBS=$(LIBHDF5) lib_LTLIBRARIES=libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) -libhdf5_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) +libhdf5_fortran_la_LDFLAGS= -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) # Some Fortran compilers can't build shared libraries, so sometimes we # want to build a shared C library and a static Fortran library. If so, # pass the -static flag to the library linker. if FORTRAN_SHARED_CONDITIONAL else - AM_LDFLAGS=-static + AM_LDFLAGS+=-static endif # Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 0ddcefd..1b1132e 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -56,6 +56,11 @@ DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/h5fc.in $(top_srcdir)/config/commence.am \ $(top_srcdir)/config/conclude.am \ $(top_srcdir)/config/lt_vers.am + +# Some Fortran compilers can't build shared libraries, so sometimes we +# want to build a shared C library and a static Fortran library. If so, +# pass the -static flag to the library linker. +@FORTRAN_SHARED_CONDITIONAL_FALSE@am__append_1 = -static noinst_PROGRAMS = H5match_types$(EXEEXT) H5fortran_detect$(EXEEXT) \ H5test_kind$(EXEEXT) TESTS = @@ -160,6 +165,17 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = /home1/packages/automake/automake-1.9.6/bin/aclocal-1.9 -I /afs/ncsa/projects/hdf/packages/libtool_1.5.14/Linux_2.4/share/aclocal ADD_PARALLEL_FILES = @ADD_PARALLEL_FILES@ AMTAR = @AMTAR@ + +# H5_CFLAGS holds flags that should be used when building hdf5, +# but which should not be exported to h5cc for building other programs. +# AM_CFLAGS is an automake construct which should be used by Makefiles +# instead of CFLAGS, as CFLAGS is reserved solely for the user to define. +AM_CFLAGS = @AM_CFLAGS@ @H5_CFLAGS@ +AM_CPPFLAGS = @AM_CPPFLAGS@ @H5_CPPFLAGS@ +AM_CXXFLAGS = @AM_CXXFLAGS@ @H5_CXXFLAGS@ +AM_FCFLAGS = @AM_FCFLAGS@ @H5_FCFLAGS@ -I$(top_srcdir)/src \ + -I$(top_srcdir)/fortran/src +AM_LDFLAGS = @AM_LDFLAGS@ $(am__append_1) AM_MAKEFLAGS = @AM_MAKEFLAGS@ AR = @AR@ @@ -173,21 +189,18 @@ BYTESEX = @BYTESEX@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CC_VERSION = @CC_VERSION@ - -# H5_CFLAGS holds flags that should be used as CFLAGS when building hdf5, -# but which shouldn't be exported to h5cc for building other programs. -CFLAGS = @CFLAGS@ @H5_CFLAGS@ +CFLAGS = @CFLAGS@ CLEARFILEBUF = @CLEARFILEBUF@ CODESTACK = @CODESTACK@ CONFIG_DATE = @CONFIG_DATE@ CONFIG_MODE = @CONFIG_MODE@ CONFIG_USER = @CONFIG_USER@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ @H5_CPPFLAGS@ +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ @H5_CXXFLAGS@ +CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_PKG = @DEBUG_PKG@ DEFAULT_API_VERSION = @DEFAULT_API_VERSION@ @@ -210,7 +223,7 @@ F9XMODEXT = @F9XMODEXT@ F9XMODFLAG = @F9XMODFLAG@ F9XSUFFIXFLAG = @F9XSUFFIXFLAG@ FC = @FC@ -FCFLAGS = @FCFLAGS@ @H5_FCFLAGS@ +FCFLAGS = @FCFLAGS@ FCFLAGS_f90 = @FCFLAGS_f90@ FCLIBS = @FCLIBS@ FGREP = @FGREP@ @@ -417,19 +430,13 @@ LT_VERS_AGE = 0 # Include src directory in both Fortran and C flags (C compiler is used # for linking). INCLUDES = -I$(top_srcdir)/src -AM_FCFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/fortran/src AM_FCLIBS = $(LIBHDF5) # This is our main target, the fortran library lib_LTLIBRARIES = libhdf5_fortran.la # Add libtool numbers to the HDF5 Fortran library (from config/lt_vers.am) -libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) - -# Some Fortran compilers can't build shared libraries, so sometimes we -# want to build a shared C library and a static Fortran library. If so, -# pass the -static flag to the library linker. -@FORTRAN_SHARED_CONDITIONAL_FALSE@AM_LDFLAGS = -static +libhdf5_fortran_la_LDFLAGS = -version-info $(LT_VERS_INTERFACE):$(LT_VERS_REVISION):$(LT_VERS_AGE) $(AM_LDFLAGS) @BUILD_PARALLEL_CONDITIONAL_FALSE@PARALLEL_COND_SRC = HDF5.f90 # Include HDF5.f90 if parallel is disabled, HDF5mpiof* if parallel is enabled diff --git a/fortran/src/h5fc.in b/fortran/src/h5fc.in index 8c3e62b..5b915d5 100755 --- a/fortran/src/h5fc.in +++ b/fortran/src/h5fc.in @@ -54,10 +54,10 @@ get_output_file="no" SHOW="eval" FCBASE="@FC@" FLINKERBASE="@FC@" -FFLAGS="@FCFLAGS@" +FFLAGS="@AM_FCFLAGS@ @FCFLAGS@" F9XMODFLAG="@F9XMODFLAG@" F9XSUFFIXFLAG="@F9XSUFFIXFLAG@" -LDFLAGS="@LDFLAGS@" +LDFLAGS="@AM_LDFLAGS@ @LDFLAGS@" LIBS="@LIBS@" FC="${HDF5_FC:-$FCBASE}" |