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 grib_api and emoslib installed on standard paths |
---|
10 | # full debugging |
---|
11 | # |
---|
12 | ############################################################################### |
---|
13 | |
---|
14 | |
---|
15 | EXE = calc_etadot_fast.out |
---|
16 | |
---|
17 | GRIB_API_LIB= -Bstatic -lgrib_api_f90 -lgrib_api -Bdynamic -lm -ljasper |
---|
18 | EMOSLIB=-lemosR64 |
---|
19 | LIB = $(GRIB_API_LIB) $(EMOSLIB) |
---|
20 | |
---|
21 | GRIB_API_INCLUDE_DIR=/usr/include |
---|
22 | INC = -I. -I$(GRIB_API_INCLUDE_DIR) |
---|
23 | |
---|
24 | FC = gfortran |
---|
25 | OPT = -O3 -march=native |
---|
26 | FFLAGS = $(OPT) $(LIB) $(INC) -fdefault-real-8 -fopenmp -fconvert=big-endian |
---|
27 | LDFLAGS = $(OPT) $(LIB) -fopenmp |
---|
28 | SRC = ./rwgrib2.f90 ./calc_etadot.f90 ./ftrafo.f90 ./grphreal.f90 ./posnam.f90 ./phgrreal.f90 |
---|
29 | OBJ = rwgrib2.o calc_etadot.o ftrafo.o grphreal.o posnam.o phgrreal.o |
---|
30 | MOD = ftrafo.mod grtoph.mod phtogr.mod rwgrib2.mod |
---|
31 | |
---|
32 | .DEFAULT: |
---|
33 | -echo $@ does not exist. |
---|
34 | |
---|
35 | all: ${EXE} |
---|
36 | ftrafo.o: ./ftrafo.f90 phgrreal.o |
---|
37 | $(FC) $(FFLAGS) -c ./ftrafo.f90 |
---|
38 | grphreal.o: ./grphreal.f90 phgrreal.o |
---|
39 | $(FC) $(FFLAGS) -c ./grphreal.f90 |
---|
40 | phgrreal.o: ./phgrreal.f90 |
---|
41 | $(FC) $(FFLAGS) -c ./phgrreal.f90 |
---|
42 | posnam.o: ./posnam.f90 |
---|
43 | $(FC) $(FFLAGS) -c ./posnam.f90 |
---|
44 | calc_etadot.o: ./calc_etadot.f90 phgrreal.o grphreal.o ftrafo.o rwgrib2.o |
---|
45 | $(FC) $(FFLAGS) -c ./calc_etadot.f90 |
---|
46 | rwgrib2.o: ./rwgrib2.f90 |
---|
47 | $(FC) $(FFLAGS) -c ./rwgrib2.f90 |
---|
48 | |
---|
49 | clean: |
---|
50 | -rm -f $(OBJ) ${EXE} $(MOD) |
---|
51 | |
---|
52 | ${EXE}: $(OBJ) |
---|
53 | $(FC) $(OBJ) -o ${EXE} $(LDFLAGS) |
---|