source: lmdz_wrf/trunk/tools/Makefile.skogul.gcc @ 2318

Last change on this file since 2318 was 2220, checked in by lfita, 6 years ago

Updating Makefiles

File size: 4.6 KB
Line 
1# L. Fita, CIMA. October 2017
2# Compilation of all required Fortran modules in `hydra' with gcc compilers
3# A following python 'library' creation is required
4# Diagnostics compilation _______
5# f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 >& run_f2py_ForDiag_wrapper.log
6# make
7# f2py -m module_ForDiag -c --f90exec=/usr/bin/gfortran-6 module_ForDiag.pyf module_generic.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 >& run_f2py_ForDiag_compile.log
8# Interpolation compilation _______
9# f2py -m module_ForInt -h module_ForInt.pyf module_generic.f90 module_ForInterpolate.f90  >& run_f2py_ForInt_wrapper.log
10# f2py -m module_ForInt -c --f90exec=/usr/bin/gfortran-6 module_ForInt.pyf module_generic.f90 module_ForInterpolate.f90  >& run_f2py_ForInt_compile.log
11
12FC              = /usr/bin/gfortran
13FCF     = -c
14LIB_INC =
15RM              = rm -f
16F2PY            = /usr/bin/f2py2.7
17F2PYF   =
18#DBGFLAGS = g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
19NCLIBFOLD       = /usr/lib/x86_64-linux-gnu
20NCINCFOLD       = /usr/include
21NCLIBFFOLD      = /usr/lib/x86_64-linux-gnu
22NCINCFFOLD      = /usr/include
23LIB_NETCDF      = -L$(NCLIBFOLD) -L$(NCLIBFFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD) -I$(NCINCFFOLD)
24
25FCFLAGS = $(FCF) $(DBGFLAGS)
26
27# Sources for f2py
28srcs = module_definitions.f90 module_basic.f90 module_generic.f90 module_scientific.f90
29distrisrcs = $(srcs) module_DistriCorrection.f90
30diagsrcs = $(srcs) module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90
31intsrcs = $(srcs) module_ForInterpolate.f90
32scisrcs = $(srcs)
33defsrcs = module_definitions.f90
34
35####### ###### ##### #### ### ## #
36
37MODULES = \
38        module_definitions.o \
39        module_basic.o \
40        module_generic.o \
41        module_NCgeneric.o \
42        module_scientific.o \
43        module_ForInterpolate.o \
44        module_ForDiagnosticsVars.o \
45        module_ForDiagnostics.o \
46        module_DistriCorrection.o
47
48FINTMODULES = \
49        module_definitions.o \
50        module_basic.o \
51        module_generic.o \
52        module_scientific.o \
53        module_ForInterpolate.o
54
55all : \
56        module_ForDiagnostics.o \
57        interpolate.o \
58        DistriCorrection.o \
59        pydistrimods.o \
60        pydiagmods.o \
61        pyintmods.o \
62        pyscimods.o \
63        pydefmods.o \
64        trajectories_overlap.o
65
66diags : \
67        module_ForDiagnostics.o
68
69clean :
70        $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
71
72########    #######
73##
74    ########
75
76module_definitions.o:
77        $(FC) $(FCFLAGS) module_definitions.f90
78
79module_basic.o: module_definitions.o
80        $(FC) $(FCFLAGS) module_basic.f90
81
82module_generic.o: module_definitions.o module_basic.o
83        $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90
84
85module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o
86        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90
87
88module_scientific.o: module_definitions.o module_basic.o module_generic.o
89        $(FC) $(FCFLAGS) module_scientific.f90
90
91module_ForInterpolate.o: module_definitions.o module_generic.o
92        $(FC) $(FCFLAGS) $(LIB_INC) module_ForInterpolate.f90
93
94module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
95        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
96
97module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o
98        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90
99
100module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
101        $(FC) $(FCFLAGS) module_DistriCorrection.f90
102
103FCEXEFINTCFLAGS = $(FINTMODULES) $(LIB_NETCDF) $(LIB_INC)
104FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
105
106interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForInterpolate.o
107        $(FC) $(FCEXEFINTCFLAGS) interpolate.f90 -o interpolate
108
109DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o
110        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
111
112pydistrimods.o:
113        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
114
115pydiagmods.o:
116        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
117
118pyintmods.o:
119        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
120
121pyscimods.o:
122        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
123
124pydefmods.o:
125        $(F2PY) -c $(F2PYF) -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
126
127trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
128        $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap
129
Note: See TracBrowser for help on using the repository browser.