/[MITgcm]/MITgcm_contrib/mlosch/optim_m1qn3/testbed/Makefile
ViewVC logotype

Annotation of /MITgcm_contrib/mlosch/optim_m1qn3/testbed/Makefile

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Wed May 2 12:27:42 2012 UTC (12 years ago) by mlosch
Branch: MAIN
simple testing environment for optim_m1qn3

1 mlosch 1.1 # $Header: $
2     # $Name: $
3     MAKEFILE=Makefile
4    
5     SRC = ddot.F \
6     optim_store_m1qn3.F \
7     m1qn3_offline.F \
8     mysimul.F \
9     offline_driver.F
10    
11     EXEDIR = .
12    
13     # default suffix for pre-processed fortran files is f
14     SUFF=f
15     # for case-insensitive file systems you may need this
16     # SUFF=for
17     # Location of cpp preprocessor
18     # default is (Linux)
19     CPP = cat $< | /lib/cpp -P -traditional
20     # Mac OS X
21     # CPP = cat $< | /usr/bin/cpp -P -traditional
22     # on SUNOS
23     # CPP = cat $< | /usr/ccs/lib/cpp
24    
25     INCLUDEDIRS = -I. -I..
26    
27     LIBDIRS =
28     LIBS =
29    
30     # The cpp flags.
31     CPPFLAGS = -DREAL_BYTE=4 \
32     -DMAX_INDEPEND=1000000 \
33     -D_RL='double precision' \
34     -D_RS='double precision'
35    
36     LN=ln -s
37     # -DMAX_INDEPEND=293570968 \
38     # FORTRAN compiler and its flags.
39     # default is gfortran
40     FC = gfortran
41     FFLAGS = -fconvert=big-endian
42    
43     # ifort compilers
44     #FC = ifort
45     #FFLAGS = -mieee-fp -132 -r8 -i4 -W0 -WB -CB -fpe0 -traceback -convert big_endian -assume byterecl
46    
47     # SGI o3k IRIX64
48     #FC = f77
49     #FFLAGS = -extend_source -bytereclen -mips4 -r8 -static
50    
51     # AER cluster
52     #FC = /opt/mpich/bin/mpif77
53     #FFLAGS = -byteswapio -r8 -Mnodclchk -Mextend
54    
55     SMALLF = $(SRC:.F=.$(SUFF))
56     OBJECTS = $(SRC:.F=.o)
57    
58     .SUFFIXES: .o .$(SUFF) .F
59    
60     all: small_f offline_driver model driver
61    
62     offline_driver: $(OBJECTS)
63     $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)
64     model: model.o mysimul.o
65     $(FC) -o $@ $(FFLAGS) model.o mysimul.o
66     driver: driver.o m1qn3.o ddot.o mysimul.o
67     $(FC) -o $@ $(FFLAGS) ddot.o m1qn3.o driver.o mysimul.o
68    
69     links: $(SRC)
70    
71     small_f: $(SMALLF)
72    
73     depend:
74     makedepend -o .f $(INCLUDEDIRS) $(SRC)
75    
76     # The normal chain of rules is ( .F - .f - .o )
77     .F.f:
78     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
79     .F.for:
80     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
81     .f.o:
82     $(FC) $(FFLAGS) -c $<
83     .for.o:
84     $(FC) $(FFLAGS) -c $<
85    
86     # Cleaning options.
87     scratch:
88     -rm -f OPWARM.* model_in model_out *.txt
89    
90     cleanlinks:
91     -find . -type l -exec rm {} \;
92    
93     clean:
94     -rm -f *.o *.f *.for
95    
96     Clean:
97     @make -f $(MAKEFILE) clean
98     @make -f $(MAKEFILE) cleanlinks
99     @make scratch
100    
101     CLEAN:
102     @make -f $(MAKEFILE) Clean
103     -rm -f offline_driver model driver
104    
105     ddot.F optim_store_m1qn3.F m1qn3_offline.F:
106     if [ ! -L $@ ]; then $(LN) ../$@ $@; fi
107    
108     # DO NOT DELETE
109    
110     optim_store_m1qn3.o: ../m1qn3_common.h
111     optim_store_m1qn3.o: ../m1qn3a_common.h
112     optim_store_m1qn3.o: ../mlis3_common.h
113     m1qn3_offline.o: ../m1qn3_common.h
114     m1qn3_offline.o: ../m1qn3a_common.h
115     m1qn3_offline.o: ../mlis3_common.h

  ViewVC Help
Powered by ViewVC 1.1.22