1 | ############################################################################### |
---|
2 | # |
---|
3 | # Makefile for flex_extract, Fortran code to calculate etadot |
---|
4 | # Makefile created using by mkmf 19.3.0 |
---|
5 | # |
---|
6 | # Copyright: Leopold Haimberger, Petra Seibert |
---|
7 | # SPDX-License-Identifier: GPL-2.0 |
---|
8 | # |
---|
9 | # Version for a machine with eccodes and emoslib installed on standard paths |
---|
10 | # with optimisation |
---|
11 | # |
---|
12 | ############################################################################### |
---|
13 | |
---|
14 | |
---|
15 | EXE = calc_etadot_fast.out |
---|
16 | |
---|
17 | ECCODES_LIB = -Bstatic -leccodes_f90 -leccodes -Bdynamic -lm |
---|
18 | EMOSLIB=-lemosR64 |
---|
19 | LIB = $(ECCODES_LIB) $(EMOSLIB) |
---|
20 | |
---|
21 | ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15 |
---|
22 | #/usr/local/include/ #oldstable |
---|
23 | |
---|
24 | INC = -I. -I$(ECCODES_INCLUDE_DIR) |
---|
25 | |
---|
26 | FC = gfortran |
---|
27 | OPT = -O3 # -O3 -march=native |
---|
28 | FFLAGS = $(OPT) $(LIB) $(INC) -fdefault-real-8 -fopenmp -fconvert=big-endian |
---|
29 | LDFLAGS = $(OPT) $(LIB) -fopenmp |
---|
30 | SRC = ./rwgrib2.f90 ./calc_etadot.f90 ./ftrafo.f90 ./grphreal.f90 ./posnam.f90 ./phgrreal.f90 |
---|
31 | OBJ = rwgrib2.o calc_etadot.o ftrafo.o grphreal.o posnam.o phgrreal.o |
---|
32 | MOD = ftrafo.mod grtoph.mod phtogr.mod rwgrib2.mod |
---|
33 | |
---|
34 | .DEFAULT: |
---|
35 | -echo $@ does not exist. |
---|
36 | |
---|
37 | all: ${EXE} |
---|
38 | ftrafo.o: ./ftrafo.f90 phgrreal.o |
---|
39 | $(FC) $(FFLAGS) -c ./ftrafo.f90 |
---|
40 | grphreal.o: ./grphreal.f90 phgrreal.o |
---|
41 | $(FC) $(FFLAGS) -c ./grphreal.f90 |
---|
42 | phgrreal.o: ./phgrreal.f90 |
---|
43 | $(FC) $(FFLAGS) -c ./phgrreal.f90 |
---|
44 | posnam.o: ./posnam.f90 |
---|
45 | $(FC) $(FFLAGS) -c ./posnam.f90 |
---|
46 | calc_etadot.o: ./calc_etadot.f90 phgrreal.o grphreal.o ftrafo.o rwgrib2.o |
---|
47 | $(FC) $(FFLAGS) -c ./calc_etadot.f90 |
---|
48 | rwgrib2.o: ./rwgrib2.f90 |
---|
49 | $(FC) $(FFLAGS) -c ./rwgrib2.f90 |
---|
50 | |
---|
51 | clean: |
---|
52 | -rm -f $(OBJ) ${EXE} $(MOD) calc_etadot |
---|
53 | |
---|
54 | ${EXE}: $(OBJ) |
---|
55 | $(FC) $(OBJ) -o ${EXE} $(LDFLAGS) |
---|
56 | ln -sf ${EXE} calc_etadot |
---|