1 #***********************************************************************
2 #* GNU Lesser General Public License
4 #* This file is part of the GFDL Flexible Modeling System (FMS).
6 #* FMS is free software: you can redistribute it and/or modify it under
7 #* the terms of the GNU Lesser General Public License as published by
8 #* the Free Software Foundation, either version 3 of the License, or (at
9 #* your option) any later version.
11 #* FMS is distributed in the hope that it will be useful, but WITHOUT
12 #* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 #* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16 #* You should have received a copy of the GNU Lesser General Public
17 #* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18 #***********************************************************************
20 # This is the main automake file for FMS.
21 # Ed Hartnett 2/21/2019
23 # This directory stores libtool macros, put there by aclocal.
24 ACLOCAL_AMFLAGS = -I m4
26 # Directory to place all .mod files. Convienient place to look for these
28 #include $(top_srcdir)/mkmods.mk
30 # Does the user want to build documentation?
35 # Make targets will be run in each subdirectory. Order is significant.
76 include_HEADERS = include/file_version.h include/fms_platform.h
78 pkgconfigdir = $(libdir)/pkgconfig
79 pkgconfig_DATA = FMS.pc
81 ## Build libFMS module
82 AM_CPPFLAGS = -I${top_srcdir}/include
83 AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)
85 noinst_LTLIBRARIES = libFMS_mod.la
86 libFMS_mod_la_SOURCES = libFMS.F90
88 fms.$(FC_MODEXT): .mods/*_mod.$(FC_MODEXT)
90 nodist_include_HEADERS = .mods/fms.$(FC_MODEXT)
92 include $(top_srcdir)/mkmods.mk
94 # Prepare CMake files for installation. This is to help
95 # packages build using CMake to more easily use the libFMS
98 # A simple edit command
100 # -e 's|@PACKAGE_VERSION[@]|$(pkgdatadir)|g' \
101 # -e 's|@PACKAGE_CMAKE_INSTALL_PREFIX[@]|$(prefix)|g' \
102 # -e 's|@PACKAGE_CMAKE_INSTALL_INCLUDEDIR[@]|$(includedir)|g' \
103 # -e 's|@PACKAGE_CMAKE_INSTALL_LIBDIR[@]|$(libdir)|g' \
104 # -e '/@PACKAGE_INIT[@]/ {' -e 'r $(top_srcdir)/_package_init_cmake' -e 'd' -e '}'
105 #FMSConfig.cmake FMSConfigVersion.cmake: Makefile
107 # $(edit) $@.in >$@.tmp
109 #FMSConfig.cmake: FMSConfig.cmake.in
110 #FMSConfigVersion.cmake: FMSConfigVersion.cmake.in
112 #cmakedir = $(libdir)
113 #cmake_DATA = FMSConfig.cmake \
114 # FMSConfigVersion.cmake
117 # -rm -f FMSConfig.cmake FMSConfigVersion.cmake
118 EXTRA_DIST = README.md #_package_init_cmake
122 check-code-coverage: check
123 -cd ${top_builddir}/test_fms && chmod +x intel_coverage.sh && ./intel_coverage.sh
125 .PHONY: check-code-coverage
128 -rm -rf .mods coverage-data coverage-report
136 @echo '+-------------------------------------------------------------+'
137 @echo '| Congratulations! You have successfully installed the FMS |'
138 @echo '| Fortran library. |'
140 @echo '| After the installed include and link paths have been |'
141 @echo '| specified, code using FMS should be compiled using the |'
142 @echo '| "-lFMS" flag. |'
144 @echo '| FMS is developed and maintained at the GFDL publicly on |'
145 @echo '| Github. To report an issue or view available documentation, |'
146 @echo '| please see our page: https://www.github.com/NOAA-GFDL/FMS |'
147 @echo '+-------------------------------------------------------------+'