source: lmdz_wrf/trunk/tools/Makefile.camelot.gcc @ 1489

Last change on this file since 1489 was 1169, checked in by lfita, 9 years ago

Final working version of the compilation

File size: 2.0 KB
RevLine 
[1156]1# L. Fita, LMD. October 2016
2# Compilation of all required Fortran modules in `camelot' with gcc compilers
3# A following python 'library' creation is required
[1161]4
5# FOLLOWING: http://stackoverflow.com/questions/17156125/f2py-exposing-parameters-from-used-modules
6# FOLLOWING: http://osdir.com/ml/python.f2py.user/2006-08/msg00019.html
[1169]7# module load gnu/4.4.7
8# module load python/2.7-anaconda
9# export LD_LIBRARY_PATH=/opt/anaconda/lib/:$LD_LIBRARY_PATH
[1166]10# Diagnostics compilation _______
11# f2py -m module_ForDiag -h module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_wrapper.log
[1161]12# make
[1169]13# f2py -L/opt/anaconda/lib/ -m module_ForDiag -c --fcompiler=gnu95 module_ForDiag.pyf module_generic.F90 module_ForDiagnosticsVars.F90 module_ForDiagnostics.F90 >& run_f2py_ForDiag_compile.log
[1166]14# Interpolation compilation _______
15# f2py -m module_ForInt -h module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90  >& run_f2py_ForInt_wrapper.log
[1169]16# f2py -L/opt/anaconda/lib/ -m module_ForInt -c --fcompiler=gnu95 module_ForInt.pyf module_generic.F90 module_ForInterpolate.F90  >& run_f2py_ForInt_compile.log
[1166]17#
[1156]18
[1162]19FC              = /usr/bin/gfortran
[1156]20FCFLAGS         = -c -fPIC
[1169]21LIB_INC         =
[1156]22RM              = rm -f
23NCFOLD          = /usr
24LIB_NETCDF      = -L$(NCFOLD)/lib -lnetcdff -lnetcdf -I$(NCFOLD)/include
25
26####### ###### ##### #### ### ## #
27
28MODULES = \
29        module_generic.o
30
31all : \
32        interpolate.o \
33        module_ForDiagnostics.o
34
35diags : \
36        module_ForDiagnostics.o
37clean :
38        $(RM) *.mod *.o interpolate
39
40########    #######
41##
42    ########
43
44module_generic.o:
45        $(FC) $(FCFLAGS) $(LIB_NETCDF) $(LIB_INC) module_generic.F90
46
47module_ForDiagnosticsVars.o: module_generic.o
48        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnosticsVars.F90
49
50module_ForDiagnostics.o: module_generic.o module_ForDiagnosticsVars.o
51        $(FC) $(FCFLAGS) $(LIB_INC) module_ForDiagnostics.F90
52
53FCEXECFLAGS = $(MODULES) $(LIB_NETCDF) $(LIB_INC)
54
55interpolate.o: module_generic.o
56        $(FC) $(FCEXECFLAGS) interpolate.F90 -o interpolate
57
58
Note: See TracBrowser for help on using the repository browser.