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