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

Last change on this file since 4459 was 3785, checked in by eckhard, 6 years ago

inifor: Removed unused variables, improved coding style

  • Property svn:keywords set to Id
File size: 3.3 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#
[3785]16# Copyright 2017-2019 Leibniz Universitaet Hannover
17# Copyright 2017-2019 Deutscher Wetterdienst Offenbach
[2696]18#------------------------------------------------------------------------------#
19#
20# Current revisions:
21# -----------------
[3183]22#
23#
24# Former revisions:
25# -----------------
26# $Id: Makefile.ifort 3785 2019-03-06 10:41:14Z oliver.maas $
[3785]27# Updated copyright note
28#
29#
30# 3716 2019-02-05 17:02:38Z eckhard
[3716]31# Added __netcdf preprocessor flag
32#
33#
34# 3447 2018-10-29 15:52:54Z eckhard
[3447]35# Renamed source files for compatibilty with PALM build system
36#
37# 3395 2018-10-22 17:32:49Z eckhard
[3395]38# Updated build order
39#
40# 3183 2018-07-27 14:25:55Z suehring
[3182]41# Added __netcdf4 preprocessor flag
42# Corrected compilation order
43#
[2696]44#
[3183]45# 3182 2018-07-27 13:36:03Z suehring
[2696]46# Initial revision
47#
48#
49#
50# Authors:
51# --------
52# @author Eckhard Kadasch
53#
54# Description:
55# ------------
56# This file serves as a templete makefile for compiling INIFOR with ifort.
57#------------------------------------------------------------------------------#
58PROJECT = inifor
59PROJECT_PATH = .
[3395]60BIN_PATH  = $(PROJECT_PATH)/../../SCRIPTS
[2696]61SRC_PATH  = $(PROJECT_PATH)/src
62TEST_PATH = $(PROJECT_PATH)/tests
63
[3447]64MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \
65                  $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \
66                  $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \
67                  $(SRC_PATH)/inifor_grid.mod
[2696]68SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90
69OBJECTS = $(SOURCES:%.f90=%.o)
70
71FC      = ifort
[3716]72FFLAGS  = -g -real-size 64 -no-wrap-margin -cpp -D__netcdf4 -D__netcdf
[2696]73INCLUDE = -I/usr/local/pkg/netcdf/4.3.2/include
74LIBRARY = -L/usr/local/pkg/netcdf/4.3.2/lib -lnetcdff
75
76.PHONY: all clean doc run tags test test-verbose $(PROJECT)
77
[3182]78$(PROJECT): $(OBJECTS) $(MODULES) tags
[2696]79        @echo ""
80        mkdir -p $(BIN_PATH)
81        $(FC) $(FFLAGS) $(OBJECTS) -o $(BIN_PATH)/$(PROJECT) -I$(SRC_PATH) $(LIBRARY)
82
83$(SRC_PATH)/%.o: $(SRC_PATH)/%.f90
84        @echo ""
85        $(FC) $(FFLAGS) -c $< -o $@ -module $(SRC_PATH) $(INCLUDE)
86
87$(SRC_PATH)/%.mod: $(SRC_PATH)/%.f90
88        @echo ""
89        $(FC) $(FFLAGS) -c $< -o $(@:%.mod=%.o) -module $(SRC_PATH) $(INCLUDE)
90
91all: clean $(PROJECT) test doc
92
93clean:
94        @echo ""
95        rm -rf $(OBJECTS) $(MODULES) $(BIN_PATH)/$(PROJECT)
96        rm -rf *.mod *.o
97        rm -rf ./doc/latex ./doc/html
98        rm -f $(SRC_PATH)/tags
99        $(MAKE) -C $(TEST_PATH) clean
[3182]100        $(MAKE) -C $(SRC_PATH) clean
[2696]101
102doc:
103        @echo ""
104        doxygen ./doc/doxygen.config
105
106run: $(PROJECT)
107        @echo ""
108        $(BIN_PATH)/$(PROJECT)
109
110tags:
111        @echo ""
112        $(MAKE) -C $(SRC_PATH) tags
113
114test:
115        @echo "Running tests"
116        $(MAKE) -C $(TEST_PATH) test | grep Test
117        @echo "...done testing"
118
119test-verbose:
120        @echo "Running tests"
121        $(MAKE) -C $(TEST_PATH) test
122        @echo "...done testing"
Note: See TracBrowser for help on using the repository browser.