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

Last change on this file since 1784 was 1693, checked in by lfita, 7 years ago

Adding skogul gcc compilation

File size: 4.1 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
17#DBGFLAGS = g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan
18NCLIBFOLD       = /usr/lib/x86_64-linux-gnu
19NCINCFOLD       = /usr/include
20LIB_NETCDF      = -L$(NCLIBFOLD) -lnetcdff -lnetcdf -I$(NCINCFOLD)
21
22FCFLAGS = $(FCF) $(DBGFLAGS)
23
24# Sources for f2py
25srcs = module_definitions.f90 module_basic.f90 module_generic.f90 module_scientific.f90
26distrisrcs = $(srcs) module_DistriCorrection.f90
27diagsrcs = $(srcs) module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90
28intsrcs = $(srcs) module_ForInterpolate.f90
29scisrcs = $(srcs)
30defsrcs = module_definitions.f90
31
32####### ###### ##### #### ### ## #
33
34MODULES = \
35        module_definitions.o \
36        module_basic.o \
37        module_generic.o \
38        module_NCgeneric.o \
39        module_scientific.o \
40        module_ForDiagnosticsVars.o \
41        module_ForDiagnostics.o \
42        module_DistriCorrection.o
43
44all : \
45        module_ForDiagnostics.o \
46        DistriCorrection.o \
47        interpolate.o \
48        pydistrimods.o \
49        pydiagmods.o \
50        pyintmods.o \
51        pyscimods.o \
52        pydefmods.o \
53        trajectories_overlap.o
54
55diags : \
56        module_ForDiagnostics.o
57
58clean :
59        $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
60
61########    #######
62##
63    ########
64
65module_definitions.o:
66        $(FC) $(FCFLAGS) module_definitions.f90
67
68module_basic.o: module_definitions.o
69        $(FC) $(FCFLAGS) module_basic.f90
70
71module_generic.o: module_definitions.o module_basic.o
72        $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90
73
74module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o
75        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90
76
77module_scientific.o: module_definitions.o module_basic.o module_generic.o
78        $(FC) $(FCFLAGS) module_scientific.f90
79
80module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o
81        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
82
83module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o
84        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90
85
86module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
87        $(FC) $(FCFLAGS) module_DistriCorrection.f90
88
89FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
90
91interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
92        $(FC) $(FCEXECFLAGS) interpolate.f90 -o interpolate
93
94DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o
95        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
96
97pydistrimods.o:
98        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
99
100pydiagmods.o:
101        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
102
103pyintmods.o:
104        $(F2PY) -c -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
105
106pyscimods.o:
107        $(F2PY) -c -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
108
109pydefmods.o:
110        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
111
112trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
113        $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap
Note: See TracBrowser for help on using the repository browser.