source: palm/trunk/UTIL/inifor/tests/builds/Makefile.gnu_debug @ 4749

Last change on this file since 4749 was 4737, checked in by eckhard, 4 years ago

Added INIFOR integration test

File size: 3.1 KB
Line 
1#------------------------------------------------------------------------------#
2# This file is part of the PALM model system.
3#
4# PALM is free software: you can redistribute it and/or modify it under the
5# terms of the GNU General Public License as published by the Free Software
6# Foundation, either version 3 of the License, or (at your option) any later
7# version.
8#
9# PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License along with
14# PALM. If not, see <http://www.gnu.org/licenses/>.
15#
16# Copyright 2017-2020 Leibniz Universitaet Hannover
17# Copyright 2017-2020 Deutscher Wetterdienst Offenbach
18#------------------------------------------------------------------------------#
19#
20# Current revisions:
21# -----------------
22#
23#
24# Former revisions:
25# -----------------
26#
27# Initial revision
28#
29#
30#
31#
32# Authors:
33# --------
34# @author Eckhard Kadasch
35#
36# Description:
37# ------------
38# Makefile to produce a gfortran INIFOR build with debugging flags for the
39# INIFOR integration test
40#------------------------------------------------------------------------------#
41PROJECT = inifor
42PROJECT_PATH = .
43BIN_PATH  = $(PROJECT_PATH)/bin
44SRC_PATH  = $(PROJECT_PATH)/src
45TEST_PATH = $(PROJECT_PATH)/tests
46
47MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \
48                  $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \
49                  $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \
50                  $(SRC_PATH)/inifor_grid.mod
51SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90
52OBJECTS = $(SOURCES:%.f90=%.o)
53
54FC      = gfortran
55FFLAGS  = -Og -g -mtune=native -march=native -cpp -fconvert=little-endian -fcheck=bounds -Wall -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__lc -D__netcdf -D__netcdf4 -D__parallel -ffree-line-length-none
56INCLUDE = -I/home/ekadasch/local/include
57LIBRARY = -L/home/ekadasch/local/lib64 -lnetcdff
58
59.PHONY: all clean doc run tags test test-verbose $(PROJECT)
60
61$(PROJECT): $(OBJECTS) $(MODULES) tags
62        @echo ""
63        mkdir -p $(BIN_PATH)
64        $(FC) $(FFLAGS) $(OBJECTS) -o $(BIN_PATH)/$(PROJECT) -I$(SRC_PATH) $(LIBRARY)
65
66$(SRC_PATH)/%.o: $(SRC_PATH)/%.f90
67        @echo ""
68        $(FC) $(FFLAGS) -c $< -o $@ -J$(SRC_PATH) $(INCLUDE)
69
70$(SRC_PATH)/%.mod: $(SRC_PATH)/%.f90
71        @echo ""
72        $(FC) $(FFLAGS) -c $< -o $(@:%.mod=%.o) -J$(SRC_PATH) $(INCLUDE)
73
74all: clean $(PROJECT) test doc
75
76clean:
77        @echo ""
78        rm -rf $(OBJECTS) $(MODULES) $(BIN_PATH)/$(PROJECT)
79        rm -rf *.mod *.o
80        rm -rf ./doc/latex ./doc/html
81        rm -f $(SRC_PATH)/tags
82        rm -f *.files
83        rm -f palm-hsurf.nc
84        $(MAKE) -C $(TEST_PATH) clean
85        $(MAKE) -C $(SRC_PATH) clean
86
87doc:
88        @echo ""
89        doxygen ./doc/doxygen.config
90
91run: $(PROJECT)
92        @echo ""
93        $(BIN_PATH)/$(PROJECT)
94
95tags:
96        @echo ""
97        $(MAKE) -C $(SRC_PATH) tags
98
99test:
100        @echo "Running tests"
101        $(MAKE) -C $(TEST_PATH) test | grep Test
102        @echo "...done testing"
103
104test-verbose:
105        @echo "Running tests"
106        $(MAKE) -C $(TEST_PATH) test
107        @echo "...done testing"
Note: See TracBrowser for help on using the repository browser.