Commit 5a568679 authored by Lorenz Huedepohl's avatar Lorenz Huedepohl
Browse files

Proper installation of .mod files

Previously it was tacitly assumed that module files are named *.mod,
this is no longer necessary.
parent 56b85764
......@@ -2,7 +2,7 @@ AUTOMAKE_OPTIONS = subdir-objects
ACLOCAL_AMFLAGS = ${ACLOCAL_FLAGS} -I m4
AM_CFLAGS = @AM_CFLAGS@ $(OPENMP_CFLAGS)
AM_LDFLAGS = -L$(libdir) -Wl,-rpath -Wl,$(libdir) @AM_LDFLAGS@ $(OPENMP_CFLAGS)
AM_FCFLAGS = @AM_FCFLAGS@ $(OPENMP_FCFLAGS)
AM_FCFLAGS = @AM_FCFLAGS@ $(OPENMP_FCFLAGS) @FC_MODINC@modules @FC_MODOUT@modules
# libraries
lib_LTLIBRARIES = libftimings-@API_VERSION@-@FCNAME@.la libftimings_perflib-@API_VERSION@-@FCNAME@.la
......@@ -34,9 +34,9 @@ libftimings_@API_VERSION@_@FCNAME@_la_LDFLAGS = -version-info @FTIMINGS_SO_VERSI
libftimings_perflib_@API_VERSION@_@FCNAME@_la_SOURCES = \
perf_wrapper/perf_wrapper.F90
libftimings_perflib_@API_VERSION@_@FCNAME@_la_LDFLAGS = -version-info @FTIMINGS_SO_VERSION@
libftimings_perflib_@API_VERSION@_@FCNAME@_la_LIBADD = libftimings-@API_VERSION@-@FCNAME@.la
ftimings_includedir = $(includedir)/ftimings-@API_VERSION@-@FCNAME@
nobase_ftimings_include_HEADERS = ftimings.mod
ftimings_include_HEADERS = ftimings/ftimings.h ftimings/ftimings_generated.h
ftimings_libincludedir = $(libdir)/ftimings-@API_VERSION@-@FCNAME@/include
......@@ -103,7 +103,7 @@ files_DATA = examples/example.F90
include doxygen.am
clean-local:
rm *.mod
rm -f modules/*
distclean-local:
rm config-f90.h
......@@ -112,3 +112,7 @@ distclean-local:
# them again after installation
install-exec-hook:
rm -f $(DESTDIR)$(libdir)/*.la
# install .mod files (or whatever your compiler calls them) in $(includedir)
install-data-hook:
cp modules/* $(DESTDIR)$(ftimings_includedir)/
......@@ -7,6 +7,7 @@ API_VERSION=1
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AM_SILENT_RULES([yes])
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
AC_PROG_EGREP
......@@ -16,6 +17,7 @@ AC_PROG_FC
AC_FC_LIBRARY_LDFLAGS
AC_FC_FREEFORM
AC_FC_MODULE_FLAG
AC_FC_MODULE_OUTPUT_FLAG
AC_OPENMP
AC_LANG([C])
......@@ -86,6 +88,7 @@ AC_SUBST([FTIMINGS_SO_VERSION], [$API_VERSION:0:0])
AC_SUBST([AM_CFLAGS])
AC_SUBST([AM_FCFLAGS])
AC_SUBST([FC_MODINC])
AC_SUBST([FC_MODOUT])
AC_SUBST([AM_LDFLAGS])
AC_SUBST([DOXYGEN_OUTPUT_DIR], [docs])
......@@ -100,3 +103,5 @@ echo "Generating config-f90.h..."
grep "^#define" config.h > config-f90.h
echo "Generating ftimings/ftimings_generated.h..."
grep "^ *!c>" $srcdir/ftimings/ftimings.F90 | sed 's/^ *!c>//;' > ftimings/ftimings_generated.h
rm -rf modules/ .fortran_dependencies/
mkdir modules
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment