/[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.2 - (hide annotations) (download)
Tue Feb 12 15:51:48 2019 UTC (5 years, 2 months ago) by mlosch
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -3 lines
fix makefile so that it also works on systems with case-insensitve file
systems, such as MacOS X

1 mlosch 1.2 # $Header: /u/gcmpack/MITgcm_contrib/mlosch/optim_m1qn3/testbed/Makefile,v 1.1 2012/05/02 12:27:42 mlosch Exp $
2     # $Name: $
3 mlosch 1.1 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 mlosch 1.2 .SUFFIXES:
59 mlosch 1.1 .SUFFIXES: .o .$(SUFF) .F
60    
61     all: small_f offline_driver model driver
62    
63     offline_driver: $(OBJECTS)
64     $(FC) -o $@ $(FFLAGS) $(OBJECTS) $(LIBDIRS) $(LIBS)
65     model: model.o mysimul.o
66     $(FC) -o $@ $(FFLAGS) model.o mysimul.o
67     driver: driver.o m1qn3.o ddot.o mysimul.o
68     $(FC) -o $@ $(FFLAGS) ddot.o m1qn3.o driver.o mysimul.o
69    
70     links: $(SRC)
71    
72     small_f: $(SMALLF)
73    
74     depend:
75 mlosch 1.2 makedepend -o .$(SUFF) $(INCLUDEDIRS) $(SRC)
76 mlosch 1.1
77     # The normal chain of rules is ( .F - .f - .o )
78     .F.f:
79     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
80     .F.for:
81     $(CPP) $(CPPFLAGS) $(INCLUDEDIRS) > $@
82     .f.o:
83     $(FC) $(FFLAGS) -c $<
84     .for.o:
85     $(FC) $(FFLAGS) -c $<
86    
87     # Cleaning options.
88     scratch:
89     -rm -f OPWARM.* model_in model_out *.txt
90    
91     cleanlinks:
92     -find . -type l -exec rm {} \;
93    
94     clean:
95     -rm -f *.o *.f *.for
96    
97     Clean:
98     @make -f $(MAKEFILE) clean
99     @make -f $(MAKEFILE) cleanlinks
100     @make scratch
101    
102     CLEAN:
103     @make -f $(MAKEFILE) Clean
104     -rm -f offline_driver model driver
105    
106     ddot.F optim_store_m1qn3.F m1qn3_offline.F:
107     if [ ! -L $@ ]; then $(LN) ../$@ $@; fi
108    
109     # DO NOT DELETE
110    
111     optim_store_m1qn3.o: ../m1qn3_common.h
112     optim_store_m1qn3.o: ../m1qn3a_common.h
113     optim_store_m1qn3.o: ../mlis3_common.h
114     m1qn3_offline.o: ../m1qn3_common.h
115     m1qn3_offline.o: ../m1qn3a_common.h
116     m1qn3_offline.o: ../mlis3_common.h

  ViewVC Help
Powered by ViewVC 1.1.22