1 | # L. Fita, LMD. October 2016 |
---|
2 | # Compilation of all required Fortran modules in `foudre' 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-4.7 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-4.7 module_ForInt.pyf module_generic.f90 module_ForInterpolate.f90 >& run_f2py_ForInt_compile.log |
---|
11 | |
---|
12 | FC = gfortran-4.7 |
---|
13 | FCFLAGS = -c |
---|
14 | LIB_INC = |
---|
15 | RM = rm -f |
---|
16 | #DBGFLAGS = -g -Wall -Wextra -Warray-temporaries -Wconversion -fimplicit-none -fbacktrace -ffree-line-length-0 -fcheck=all -ffpe-trap=zero,overflow,underflow -finit-real=nan |
---|
17 | NCFOLD = /usr |
---|
18 | LIB_NETCDF = -L$(NCFOLD)/lib -lnetcdff -lnetcdf -I$(NCFOLD)/include |
---|
19 | |
---|
20 | FCFLAGS = $(FCF) $(DBGFLAGS) |
---|
21 | |
---|
22 | # Sources for f2py |
---|
23 | distrisrcs = module_definitions.f90 module_generic.f90 module_scientific.f90 module_DistriCorrection.f90 |
---|
24 | diagsrcs = module_definitions.f90 module_generic.f90 module_scientific.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 |
---|
25 | intsrcs = module_definitions.f90 module_generic.f90 module_scientific.f90 module_ForInterpolate.f90 |
---|
26 | |
---|
27 | ####### ###### ##### #### ### ## # |
---|
28 | |
---|
29 | MODULES = \ |
---|
30 | module_definitions.o \ |
---|
31 | module_scientific.o \ |
---|
32 | module_generic.o \ |
---|
33 | module_ForDiagnosticsVars.o \ |
---|
34 | module_ForDiagnostics.o \ |
---|
35 | module_DistriCorrection.o |
---|
36 | |
---|
37 | all : \ |
---|
38 | module_ForDiagnostics.o \ |
---|
39 | DistriCorrection.o \ |
---|
40 | interpolate.o \ |
---|
41 | pydistrimods.o \ |
---|
42 | pydiagmods.o \ |
---|
43 | pyintmods.o |
---|
44 | |
---|
45 | diags : \ |
---|
46 | module_ForDiagnostics.o |
---|
47 | |
---|
48 | clean : |
---|
49 | $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so |
---|
50 | |
---|
51 | ######## ####### |
---|
52 | ## |
---|
53 | ######## |
---|
54 | |
---|
55 | module_definitions.o: |
---|
56 | $(FC) $(FCFLAGS) module_definitions.f90 |
---|
57 | |
---|
58 | module_generic.o: module_definitions.o |
---|
59 | $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_generic.f90 |
---|
60 | |
---|
61 | module_scientific.o: module_definitions.o module_generic.o |
---|
62 | $(FC) $(FCFLAGS) module_scientific.f90 |
---|
63 | |
---|
64 | module_ForDiagnosticsVars.o: module_definitions.o module_generic.o |
---|
65 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90 |
---|
66 | |
---|
67 | module_ForDiagnostics.o: module_definitions.o module_generic.o module_ForDiagnosticsVars.o |
---|
68 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90 |
---|
69 | |
---|
70 | module_DistriCorrection.o: module_definitions.o module_generic.o module_scientific.o |
---|
71 | $(FC) $(FCFLAGS) $(LIB_NETCDF) module_DistriCorrection.f90 |
---|
72 | |
---|
73 | FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC) |
---|
74 | |
---|
75 | interpolate.o: module_definitions.o module_generic.o module_scientific.o |
---|
76 | $(FC) $(FCEXECFLAGS) interpolate.f90 -o interpolate |
---|
77 | |
---|
78 | DistriCorrection.o: module_definitions.o module_generic.o module_scientific.o module_DistriCorrection.o |
---|
79 | $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection |
---|
80 | |
---|
81 | pydistrimods.o: |
---|
82 | f2py -c -m module_ForDistriCorrect $(distrisrcs) |
---|
83 | |
---|
84 | pydiagmods.o: |
---|
85 | f2py -c -m module_ForDiag $(diagsrcs) |
---|
86 | |
---|
87 | pyintmods.o: |
---|
88 | f2py -c -m module_ForInt $(intsrcs) |
---|
89 | |
---|