#------------------------------------------------------------------------------# # This file is part of the PALM model system. # # PALM is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation, either version 3 of the License, or (at your option) any later # version. # # PALM is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along with # PALM. If not, see . # # Copyright 2017-2019 Leibniz Universitaet Hannover # Copyright 2017-2019 Deutscher Wetterdienst Offenbach #------------------------------------------------------------------------------# # # Current revisions: # ----------------- # # # Former revisions: # ----------------- # $Id: Makefile.ifort 3785 2019-03-06 10:41:14Z banzhafs $ # Updated copyright note # # # 3716 2019-02-05 17:02:38Z eckhard # Added __netcdf preprocessor flag # # # 3447 2018-10-29 15:52:54Z eckhard # Renamed source files for compatibilty with PALM build system # # 3395 2018-10-22 17:32:49Z eckhard # Updated build order # # 3183 2018-07-27 14:25:55Z suehring # Added __netcdf4 preprocessor flag # Corrected compilation order # # # 3182 2018-07-27 13:36:03Z suehring # Initial revision # # # # Authors: # -------- # @author Eckhard Kadasch # # Description: # ------------ # This file serves as a templete makefile for compiling INIFOR with ifort. #------------------------------------------------------------------------------# PROJECT = inifor PROJECT_PATH = . BIN_PATH = $(PROJECT_PATH)/../../SCRIPTS SRC_PATH = $(PROJECT_PATH)/src TEST_PATH = $(PROJECT_PATH)/tests MODULES = $(SRC_PATH)/inifor_defs.mod $(SRC_PATH)/inifor_types.mod \ $(SRC_PATH)/inifor_util.mod $(SRC_PATH)/inifor_control.mod \ $(SRC_PATH)/inifor_transform.mod $(SRC_PATH)/inifor_io.mod \ $(SRC_PATH)/inifor_grid.mod SOURCES = $(MODULES:%.mod=%.f90) $(SRC_PATH)/$(PROJECT).f90 OBJECTS = $(SOURCES:%.f90=%.o) FC = ifort FFLAGS = -g -real-size 64 -no-wrap-margin -cpp -D__netcdf4 -D__netcdf INCLUDE = -I/usr/local/pkg/netcdf/4.3.2/include LIBRARY = -L/usr/local/pkg/netcdf/4.3.2/lib -lnetcdff .PHONY: all clean doc run tags test test-verbose $(PROJECT) $(PROJECT): $(OBJECTS) $(MODULES) tags @echo "" mkdir -p $(BIN_PATH) $(FC) $(FFLAGS) $(OBJECTS) -o $(BIN_PATH)/$(PROJECT) -I$(SRC_PATH) $(LIBRARY) $(SRC_PATH)/%.o: $(SRC_PATH)/%.f90 @echo "" $(FC) $(FFLAGS) -c $< -o $@ -module $(SRC_PATH) $(INCLUDE) $(SRC_PATH)/%.mod: $(SRC_PATH)/%.f90 @echo "" $(FC) $(FFLAGS) -c $< -o $(@:%.mod=%.o) -module $(SRC_PATH) $(INCLUDE) all: clean $(PROJECT) test doc clean: @echo "" rm -rf $(OBJECTS) $(MODULES) $(BIN_PATH)/$(PROJECT) rm -rf *.mod *.o rm -rf ./doc/latex ./doc/html rm -f $(SRC_PATH)/tags $(MAKE) -C $(TEST_PATH) clean $(MAKE) -C $(SRC_PATH) clean doc: @echo "" doxygen ./doc/doxygen.config run: $(PROJECT) @echo "" $(BIN_PATH)/$(PROJECT) tags: @echo "" $(MAKE) -C $(SRC_PATH) tags test: @echo "Running tests" $(MAKE) -C $(TEST_PATH) test | grep Test @echo "...done testing" test-verbose: @echo "Running tests" $(MAKE) -C $(TEST_PATH) test @echo "...done testing"