source: CPL/oasis3-mct/branches/OASIS3-MCT_2.0_branch/examples/tutorial/Makefile @ 4775

Last change on this file since 4775 was 4775, checked in by aclsce, 5 years ago
  • Imported oasis3-mct from Cerfacs svn server (not suppotred anymore).

The version has been extracted from https://oasis3mct.cerfacs.fr/svn/branches/OASIS3-MCT_2.0_branch/oasis3-mct@1818

File size: 3.1 KB
Line 
1#
2include ../../util/make_dir/make.inc
3LIBPSMILE = $(ARCHDIR)/lib/libpsmile.${CHAN}.a $(ARCHDIR)/lib/libmct.a $(ARCHDIR)/lib/libmpeu.a $(ARCHDIR)/lib/libscrip.a
4#
5##### User configurable options #####
6#
7# CPP keys for model 1 (_M1) and for model 2 (_M2)
8# type of decomposition :
9# DECOMP_APPLE for 1D decomposition
10# DECOMP_BOX for 2D decomposition
11CPPKEYDECOMP_M1=DECOMP_APPLE
12CPPKEYDECOMP_M2=DECOMP_APPLE
13#
14# Precision for REAL: USE_DOUBLE_PRECISION or NO_USE_DOUBLE_PRECISION
15CPPKEYDP=USE_DOUBLE_PRECISION
16#
17### End User configurable options ###
18#
19# For single precision, add -DNO_USE_DOUBLE_PRECISION in CPPLOCAL_M1/M2
20CPPLOCAL_M1 =  -D${CPPKEYDECOMP_M1} -D${CPPKEYDP}
21CPPLOCAL_M2 = -D${CPPKEYDECOMP_M2} -D${CPPKEYDP}
22#
23OBJ_M1 =  routine_hdlerr.o read_dimgrid.o  \
24          read_grid.o decomp_def.o \
25          function_sent.o
26OBJ_M2 =  routine_hdlerr.o read_dimgrid.o  \
27          read_grid.o decomp_def_m2.o \
28          function_sent_m2.o
29#-------------------------------------------------------------------------------
30# General rules
31#-------------------------------------------------------------------------------
32#
33default: all
34#
35all: oasis3_psmile model1 model2
36#
37# Compile and link libaries
38oasis3_psmile:
39        (cd ../../util/make_dir ; $(MAKE) oasis3_psmile -f TopMakefileOasis3)
40#
41#
42#-------------------------------------------------------------------------------
43# Rules for executables
44#-------------------------------------------------------------------------------
45#
46model1: $(OBJ_M1) model1.o $(LIBPSMILE) Makefile
47        $(LD) $(LDFLAGS) -o $@ $(OBJ_M1) model1.o $(LIBPSMILE) $(FLIBS)
48model2: $(OBJ_M2) model2.o $(LIBPSMILE) Makefile
49        $(LD) $(LDFLAGS) -o $@ $(OBJ_M2) model2.o $(LIBPSMILE) $(FLIBS)
50#
51#-------------------------------------------------------------------------------
52# Rules for compilation
53#-------------------------------------------------------------------------------
54#
55routine_hdlerr.o :      routine_hdlerr.F90
56                                $(F90) $(F90FLAGS) -c routine_hdlerr.F90
57read_dimgrid.o :        read_dimgrid.F90
58                                $(F90) $(F90FLAGS) -c read_dimgrid.F90
59read_grid.o :           read_grid.F90
60                                $(F90) $(F90FLAGS) -c read_grid.F90
61decomp_def.o :          decomp_def.F90
62                                $(F90) $(F90FLAGS) $(CPPLOCAL_M1) -c decomp_def.F90
63function_sent.o :       function_sent.F90
64                                $(F90) $(F90FLAGS) $(CPPLOCAL_M1) -c function_sent.F90
65decomp_def_m2.o :       decomp_def.F90
66                                $(F90) $(F90FLAGS) $(CPPLOCAL_M2) -o decomp_def_m2.o -c decomp_def.F90
67function_sent_m2.o :    function_sent.F90
68                                $(F90) $(F90FLAGS) $(CPPLOCAL_M2) -o function_sent_m2.o -c function_sent.F90
69
70model1.o :      model1.F90 Makefile
71                $(F90) $(F90FLAGS) $(CPPLOCAL_M1) -c model1.F90
72model2.o :      model2.F90 Makefile
73                $(F90) $(F90FLAGS) $(CPPLOCAL_M2) -c model2.F90
74#
75#-------------------------------------------------------------------------------
76# Utilities
77#-------------------------------------------------------------------------------
78#
79help:
80        more Make.help
81#
82# Clean directory
83#
84clean:
85        -rm -f *.o *.mod *.MOD model1 model2
86        -rm -f i.*.F90 *.L
87        -rm -f core core.*
88#
89# Make sure to recompile everything
90#
91realclean: clean remove
92remove:
93        (cd ../../util/make_dir ; $(MAKE) realclean -f TopMakefileOasis3)
Note: See TracBrowser for help on using the repository browser.