[1046] | 1 | #--------------------------------------------------------------------------------# |
---|
| 2 | # This file is part of PALM. |
---|
[22] | 3 | # |
---|
[1046] | 4 | # PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 5 | # of the GNU General Public License as published by the Free Software Foundation, |
---|
| 6 | # either version 3 of the License, or (at your option) any later version. |
---|
| 7 | # |
---|
| 8 | # PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 9 | # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 10 | # A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 11 | # |
---|
| 12 | # You should have received a copy of the GNU General Public License along with |
---|
| 13 | # PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 14 | # |
---|
[4481] | 15 | # Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
[1046] | 16 | #--------------------------------------------------------------------------------# |
---|
| 17 | # |
---|
| 18 | # Current revisions: |
---|
[22] | 19 | # ----------------- |
---|
[1047] | 20 | # |
---|
| 21 | # Former revisions: |
---|
| 22 | # ----------------- |
---|
| 23 | # $Id: Makefile 4481 2020-03-31 18:55:54Z knoop $ |
---|
| 24 | # |
---|
| 25 | # 1046 2012-11-09 14:38:45Z maronga |
---|
[1046] | 26 | # code put under GPL (PALM 3.9) |
---|
| 27 | # |
---|
[503] | 28 | # utility programs are created separately for each block in the configuration |
---|
| 29 | # file, |
---|
[480] | 30 | # compare_palm_logs added |
---|
[492] | 31 | # added PROG3 in 'all:' statement (line 39, bugfix) |
---|
[22] | 32 | # |
---|
[480] | 33 | # Initial revision somewhere in 2003/04 |
---|
| 34 | # |
---|
[22] | 35 | # Description: |
---|
| 36 | # ------------ |
---|
| 37 | # Makefile for generating the utility programs needed by mrun and palm |
---|
[1046] | 38 | #--------------------------------------------------------------------------------# |
---|
[22] | 39 | |
---|
[503] | 40 | PROG1 = ../SCRIPTS/combine_plot_fields$(BLOCK).x |
---|
| 41 | PROG2 = ../SCRIPTS/compare_palm_logs$(BLOCK).x |
---|
| 42 | PROG3 = ../SCRIPTS/interpret_config$(BLOCK).x |
---|
[22] | 43 | |
---|
| 44 | OBJS1 = combine_plot_fields.o |
---|
[480] | 45 | OBJS2 = compare_palm_logs.o |
---|
| 46 | OBJS3 = interpret_config.o |
---|
[22] | 47 | |
---|
| 48 | CC = cc |
---|
| 49 | CFLAGS = -O |
---|
| 50 | |
---|
[2795] | 51 | F90 = mpif90 |
---|
| 52 | F90_SER = gfortran |
---|
| 53 | COPT = -cpp -DMPI_REAL=MPI_DOUBLE_PRECISION -DMPI_2REAL=MPI_2DOUBLE_PRECISION -D__netcdf |
---|
| 54 | F90FLAGS = -fcheck=all -fdefault-real-8 -fconvert=little-endian |
---|
| 55 | LDFLAGS = -fcheck=all -fdefault-real-8 -fconvert=little-endian |
---|
[22] | 56 | |
---|
[2795] | 57 | PKG_CONFIG := PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 pkg-config |
---|
| 58 | NETCDF_F90FLAGS != $(PKG_CONFIG) --cflags netcdf-fortran |
---|
| 59 | NETCDF_LDFLAGS != $(PKG_CONFIG) --libs netcdf-fortran |
---|
| 60 | F90FLAGS += $(NETCDF_F90FLAGS) |
---|
| 61 | LDFLAGS += $(NETCDF_LDFLAGS) |
---|
| 62 | |
---|
[22] | 63 | .SUFFIXES: $(SUFFIXES) .f90 |
---|
| 64 | |
---|
| 65 | |
---|
[492] | 66 | all: $(PROG1) $(PROG2) $(PROG3) |
---|
[22] | 67 | |
---|
| 68 | $(PROG1): $(OBJS1) |
---|
[27] | 69 | $(F90_SER) -o $(PROG1) $(OBJS1) $(LDFLAGS) |
---|
[22] | 70 | |
---|
| 71 | $(PROG2): $(OBJS2) |
---|
[27] | 72 | $(F90_SER) -o $(PROG2) $(OBJS2) $(LDFLAGS) |
---|
[22] | 73 | |
---|
[480] | 74 | $(PROG3): $(OBJS3) |
---|
| 75 | $(F90_SER) -o $(PROG3) $(OBJS3) $(LDFLAGS) |
---|
| 76 | |
---|
[22] | 77 | .f90.o: |
---|
[27] | 78 | $(F90_SER) $(F90FLAGS) $(COPT) -c $< |
---|
[22] | 79 | |
---|
| 80 | |
---|