[1155] | 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 |
---|
[1172] | 4 | # Diagnostics compilation _______ |
---|
[1607] | 5 | # f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.f90 module_ForDiagnosticsVars.f90 module_ForDiagnostics.f90 >& run_f2py_ForDiag_wrapper.log |
---|
[1172] | 6 | # make |
---|
[1607] | 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 |
---|
[1172] | 8 | # Interpolation compilation _______ |
---|
[1607] | 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 |
---|
[1155] | 11 | |
---|
| 12 | FC = gfortran-4.7 |
---|
| 13 | FCFLAGS = -c |
---|
| 14 | LIB_INC = |
---|
| 15 | RM = rm -f |
---|
[1611] | 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 |
---|
[1155] | 17 | NCFOLD = /usr |
---|
| 18 | LIB_NETCDF = -L$(NCFOLD)/lib -lnetcdff -lnetcdf -I$(NCFOLD)/include |
---|
| 19 | |
---|
[1611] | 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 | |
---|
[1155] | 27 | ####### ###### ##### #### ### ## # |
---|
| 28 | |
---|
| 29 | MODULES = \ |
---|
[1611] | 30 | module_definitions.o \ |
---|
| 31 | module_scientific.o \ |
---|
| 32 | module_generic.o \ |
---|
| 33 | module_ForDiagnosticsVars.o \ |
---|
| 34 | module_ForDiagnostics.o \ |
---|
| 35 | module_DistriCorrection.o |
---|
[1155] | 36 | |
---|
| 37 | all : \ |
---|
[1611] | 38 | module_ForDiagnostics.o \ |
---|
| 39 | DistriCorrection.o \ |
---|
[1155] | 40 | interpolate.o \ |
---|
[1611] | 41 | pydistrimods.o \ |
---|
| 42 | pydiagmods.o \ |
---|
| 43 | pyintmods.o |
---|
[1155] | 44 | |
---|
| 45 | diags : \ |
---|
| 46 | module_ForDiagnostics.o |
---|
[1611] | 47 | |
---|
[1155] | 48 | clean : |
---|
[1611] | 49 | $(RM) *.mod *.o interpolate module_ForDiag.so module_ForInt.so module_ForDistriCorrect.so |
---|
[1155] | 50 | |
---|
| 51 | ######## ####### |
---|
| 52 | ## |
---|
| 53 | ######## |
---|
| 54 | |
---|
[1611] | 55 | module_definitions.o: |
---|
| 56 | $(FC) $(FCFLAGS) module_definitions.f90 |
---|
| 57 | |
---|
| 58 | module_generic.o: module_definitions.o |
---|
[1607] | 59 | $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_generic.f90 |
---|
[1155] | 60 | |
---|
[1611] | 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 |
---|
[1607] | 65 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.f90 |
---|
[1155] | 66 | |
---|
[1611] | 67 | module_ForDiagnostics.o: module_definitions.o module_generic.o module_ForDiagnosticsVars.o |
---|
[1607] | 68 | $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.f90 |
---|
[1155] | 69 | |
---|
[1611] | 70 | module_DistriCorrection.o: module_definitions.o module_generic.o module_scientific.o |
---|
| 71 | $(FC) $(FCFLAGS) $(LIB_NETCDF) module_DistriCorrection.f90 |
---|
| 72 | |
---|
[1155] | 73 | FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC) |
---|
| 74 | |
---|
[1611] | 75 | interpolate.o: module_definitions.o module_generic.o module_scientific.o |
---|
[1607] | 76 | $(FC) $(FCEXECFLAGS) interpolate.f90 -o interpolate |
---|
[1155] | 77 | |
---|
[1611] | 78 | DistriCorrection.o: module_definitions.o module_generic.o module_scientific.o module_DistriCorrection.o |
---|
| 79 | $(FC) $(FCEXECFLAGS) DistriCorrection.f90 -o DistriCorrection |
---|
[1155] | 80 | |
---|
[1611] | 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 | |
---|