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

Last change on this file since 2803 was 2718, checked in by maronga, 7 years ago

deleting of deprecated files; headers updated where needed

  • Property svn:keywords set to Id
File size: 2.8 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-2018 Leibniz Universitaet Hannover
17# Copyright 2017-2018 Deutscher Wetterdienst Offenbach
18#------------------------------------------------------------------------------#
19#
20# Current revisions:
21# -----------------
22#
23#
24# Former revisions:
25# -----------------
26# $Id: Makefile.ifort 2718 2018-01-02 08:49:38Z thiele $
27# Initial revision
28#
29#
30#
31# Authors:
32# --------
33# @author Eckhard Kadasch
34#
35# Description:
36# ------------
37# This file serves as a templete makefile for compiling INIFOR with ifort.
38#------------------------------------------------------------------------------#
39PROJECT = inifor
40PROJECT_PATH = .
41BIN_PATH  = $(PROJECT_PATH)/bin
42SRC_PATH  = $(PROJECT_PATH)/src
43TEST_PATH = $(PROJECT_PATH)/tests
44
45MODULES = $(SRC_PATH)/defs.mod $(SRC_PATH)/control.mod $(SRC_PATH)/util.mod $(SRC_PATH)/types.mod $(SRC_PATH)/transform.mod $(SRC_PATH)/io.mod $(SRC_PATH)/grid.mod
46SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90
47OBJECTS = $(SOURCES:%.f90=%.o)
48
49FC      = ifort
50FFLAGS  = -g -real-size 64 -no-wrap-margin
51INCLUDE = -I/usr/local/pkg/netcdf/4.3.2/include
52LIBRARY = -L/usr/local/pkg/netcdf/4.3.2/lib -lnetcdff
53
54.PHONY: all clean doc run tags test test-verbose $(PROJECT)
55
56$(PROJECT): $(OBJECTS) $(MODULES)
57        @echo ""
58        mkdir -p $(BIN_PATH)
59        $(FC) $(FFLAGS) $(OBJECTS) -o $(BIN_PATH)/$(PROJECT) -I$(SRC_PATH) $(LIBRARY)
60
61$(SRC_PATH)/%.o: $(SRC_PATH)/%.f90
62        @echo ""
63        $(FC) $(FFLAGS) -c $< -o $@ -module $(SRC_PATH) $(INCLUDE)
64
65$(SRC_PATH)/%.mod: $(SRC_PATH)/%.f90
66        @echo ""
67        $(FC) $(FFLAGS) -c $< -o $(@:%.mod=%.o) -module $(SRC_PATH) $(INCLUDE)
68
69all: clean $(PROJECT) test doc
70
71clean:
72        @echo ""
73        rm -rf $(OBJECTS) $(MODULES) $(BIN_PATH)/$(PROJECT)
74        rm -rf *.mod *.o
75        rm -rf ./doc/latex ./doc/html
76        rm -f $(SRC_PATH)/tags
77        rm -f *.files
78        rm -f palm-hsurf.nc
79        $(MAKE) -C $(TEST_PATH) clean
80        $(MAKE) -C $(SRC_PATH) tags
81
82doc:
83        @echo ""
84        doxygen ./doc/doxygen.config
85
86run: $(PROJECT)
87        @echo ""
88        $(BIN_PATH)/$(PROJECT)
89
90tags:
91        @echo ""
92        $(MAKE) -C $(SRC_PATH) tags
93
94test:
95        @echo "Running tests"
96        $(MAKE) -C $(TEST_PATH) test | grep Test
97        @echo "...done testing"
98
99test-verbose:
100        @echo "Running tests"
101        $(MAKE) -C $(TEST_PATH) test
102        @echo "...done testing"
Note: See TracBrowser for help on using the repository browser.