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

Last change on this file since 1967 was 1824, checked in by lfita, 7 years ago

Updating Makefiles

File size: 4.4 KB
RevLine 
[1693]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 \
[1824]40        module_ForInterpolate.o \
[1693]41        module_ForDiagnosticsVars.o \
42        module_ForDiagnostics.o \
43        module_DistriCorrection.o
44
[1824]45FINTMODULES = \
46        module_definitions.o \
47        module_basic.o \
48        module_generic.o \
49        module_scientific.o \
50        module_ForInterpolate.o
51
[1693]52all : \
53        module_ForDiagnostics.o \
[1824]54        interpolate.o \
[1693]55        DistriCorrection.o \
56        pydistrimods.o \
57        pydiagmods.o \
58        pyintmods.o \
59        pyscimods.o \
60        pydefmods.o \
61        trajectories_overlap.o
62
63diags : \
64        module_ForDiagnostics.o
65
66clean :
67        $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so module_ForSci.so module_ForDef.so
68
69########    #######
70##
71    ########
72
73module_definitions.o:
74        $(FC) $(FCFLAGS) module_definitions.f90
75
76module_basic.o: module_definitions.o
77        $(FC) $(FCFLAGS) module_basic.f90
78
79module_generic.o: module_definitions.o module_basic.o
80        $(FC) $(FCFLAGS) $(LIB_INC) module_generic.f90
81
82module_NCgeneric.o: module_definitions.o module_basic.o module_generic.o
83        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_NCgeneric.f90
84
85module_scientific.o: module_definitions.o module_basic.o module_generic.o
86        $(FC) $(FCFLAGS) module_scientific.f90
87
[1824]88module_ForInterpolate.o: module_definitions.o module_generic.o
89        $(FC) $(FCFLAGS) $(LIB_INC) module_ForInterpolate.f90
90
[1693]91module_ForDiagnosticsVars.o: module_definitions.o module_basic.o module_generic.o
92        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90
93
94module_ForDiagnostics.o: module_definitions.o module_basic.o module_generic.o module_ForDiagnosticsVars.o
95        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90
96
97module_DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_scientific.o
98        $(FC) $(FCFLAGS) module_DistriCorrection.f90
99
[1824]100FCEXEFINTCFLAGS = $(FINTMODULES) $(LIB_NETCDF) $(LIB_INC)
[1693]101FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
102
[1824]103interpolate.o: module_definitions.o module_basic.o module_generic.o module_scientific.o module_ForInterpolate.o
104        $(FC) $(FCEXEFINTCFLAGS) interpolate.f90 -o interpolate
[1693]105
106DistriCorrection.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o module_DistriCorrection.o
107        $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection
108
109pydistrimods.o:
110        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDistriCorrect $(distrisrcs) -L$(NCLIBFOLD)
111
112pydiagmods.o:
113        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDiag $(diagsrcs) -L$(NCLIBFOLD)
114
115pyintmods.o:
116        $(F2PY) -c -I$(NCINCFOLD) -m module_ForInt $(intsrcs) -L$(NCLIBFOLD)
117
118pyscimods.o:
119        $(F2PY) -c -I$(NCINCFOLD) -m module_ForSci $(scisrcs) -L$(NCLIBFOLD)
120
121pydefmods.o:
122        $(F2PY) -c -I$(NCINCFOLD) -m module_ForDef $(defsrcs) -L$(NCLIBFOLD)
123
124trajectories_overlap.o: module_definitions.o module_basic.o module_generic.o module_NCgeneric.o module_scientific.o
125        $(FC) $(FCEXECFLAGS) trajectories_overlap.f90 -o trajectories_overlap
Note: See TracBrowser for help on using the repository browser.