source: palm/trunk/UTIL/inifor/Makefile.ifort @ 3184

Last change on this file since 3184 was 3183, checked in by suehring, 6 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 2.9 KB
RevLine 
[2696]1#------------------------------------------------------------------------------#
[2718]2# This file is part of the PALM model system.
[2696]3#
[2718]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
[2696]7# version.
8#
[2718]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.
[2696]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#
[2718]16# Copyright 2017-2018 Leibniz Universitaet Hannover
17# Copyright 2017-2018 Deutscher Wetterdienst Offenbach
[2696]18#------------------------------------------------------------------------------#
19#
20# Current revisions:
21# -----------------
[3183]22#
23#
24# Former revisions:
25# -----------------
26# $Id: Makefile.ifort 3183 2018-07-27 14:25:55Z suehring $
[3182]27# Added __netcdf4 preprocessor flag
28# Corrected compilation order
29#
[2696]30#
[3183]31# 3182 2018-07-27 13:36:03Z suehring
[2696]32# Initial revision
33#
34#
35#
36# Authors:
37# --------
38# @author Eckhard Kadasch
39#
40# Description:
41# ------------
42# This file serves as a templete makefile for compiling INIFOR with ifort.
43#------------------------------------------------------------------------------#
44PROJECT = inifor
45PROJECT_PATH = .
46BIN_PATH  = $(PROJECT_PATH)/bin
47SRC_PATH  = $(PROJECT_PATH)/src
48TEST_PATH = $(PROJECT_PATH)/tests
49
[3182]50MODULES = $(SRC_PATH)/defs.mod $(SRC_PATH)/util.mod $(SRC_PATH)/control.mod $(SRC_PATH)/types.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod
[2696]51SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90
52OBJECTS = $(SOURCES:%.f90=%.o)
53
54FC      = ifort
[3182]55FFLAGS  = -g -real-size 64 -no-wrap-margin -cpp -D__netcdf4
[2696]56INCLUDE = -I/usr/local/pkg/netcdf/4.3.2/include
57LIBRARY = -L/usr/local/pkg/netcdf/4.3.2/lib -lnetcdff
58
59.PHONY: all clean doc run tags test test-verbose $(PROJECT)
60
[3182]61$(PROJECT): $(OBJECTS) $(MODULES) tags
[2696]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 $@ -module $(SRC_PATH) $(INCLUDE)
69
70$(SRC_PATH)/%.mod: $(SRC_PATH)/%.f90
71        @echo ""
72        $(FC) $(FFLAGS) -c $< -o $(@:%.mod=%.o) -module $(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        $(MAKE) -C $(TEST_PATH) clean
[3182]83        $(MAKE) -C $(SRC_PATH) clean
[2696]84
85doc:
86        @echo ""
87        doxygen ./doc/doxygen.config
88
89run: $(PROJECT)
90        @echo ""
91        $(BIN_PATH)/$(PROJECT)
92
93tags:
94        @echo ""
95        $(MAKE) -C $(SRC_PATH) tags
96
97test:
98        @echo "Running tests"
99        $(MAKE) -C $(TEST_PATH) test | grep Test
100        @echo "...done testing"
101
102test-verbose:
103        @echo "Running tests"
104        $(MAKE) -C $(TEST_PATH) test
105        @echo "...done testing"
Note: See TracBrowser for help on using the repository browser.