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.
77 include_HEADERS = include/file_version.h include/fms_platform.h
79 pkgconfigdir = $(libdir)/pkgconfig
80 pkgconfig_DATA = FMS.pc
82 ## Build libFMS module
83 AM_CPPFLAGS = -I${top_srcdir}/include
84 AM_FCFLAGS = $(FC_MODINC). $(FC_MODOUT)$(MODDIR)
86 noinst_LTLIBRARIES = libFMS_mod.la
87 libFMS_mod_la_SOURCES = libFMS.F90
89 fms.$(FC_MODEXT): .mods/*_mod.$(FC_MODEXT)
91 nodist_include_HEADERS = .mods/fms.$(FC_MODEXT)
93 include $(top_srcdir)/mkmods.mk
95 # Prepare CMake files for installation. This is to help
96 # packages build using CMake to more easily use the libFMS
99 # A simple edit command
101 # -e 's|@PACKAGE_VERSION[@]|$(pkgdatadir)|g' \
102 # -e 's|@PACKAGE_CMAKE_INSTALL_PREFIX[@]|$(prefix)|g' \
103 # -e 's|@PACKAGE_CMAKE_INSTALL_INCLUDEDIR[@]|$(includedir)|g' \
104 # -e 's|@PACKAGE_CMAKE_INSTALL_LIBDIR[@]|$(libdir)|g' \
105 # -e '/@PACKAGE_INIT[@]/ {' -e 'r $(top_srcdir)/_package_init_cmake' -e 'd' -e '}'
106 #FMSConfig.cmake FMSConfigVersion.cmake: Makefile
108 # $(edit) $@.in >$@.tmp
110 #FMSConfig.cmake: FMSConfig.cmake.in
111 #FMSConfigVersion.cmake: FMSConfigVersion.cmake.in
113 #cmakedir = $(libdir)
114 #cmake_DATA = FMSConfig.cmake \
115 # FMSConfigVersion.cmake
118 # -rm -f FMSConfig.cmake FMSConfigVersion.cmake
119 EXTRA_DIST = README.md #_package_init_cmake
123 check-code-coverage: check
124 -cd ${top_builddir}/test_fms && chmod +x intel_coverage.sh && ./intel_coverage.sh
126 .PHONY: check-code-coverage
129 -rm -rf .mods coverage-data coverage-report test.nc
132 -rm -rf .mods test.nc
137 @echo '+-------------------------------------------------------------+'
138 @echo '| Congratulations! You have successfully installed the FMS |'
139 @echo '| Fortran library. |'
141 @echo '| After the installed include and link paths have been |'
142 @echo '| specified, code using FMS should be compiled using the |'
143 @echo '| "-lFMS" flag. |'
145 @echo '| FMS is developed and maintained at the GFDL publicly on |'
146 @echo '| Github. To report an issue or view available documentation, |'
147 @echo '| please see our page: https://www.github.com/NOAA-GFDL/FMS |'
148 @echo '+-------------------------------------------------------------+'