Back to home page

MITgcm

 
 

    


File indexing completed on 2024-03-02 06:10:01 UTC

view on githubraw file Latest commit 5cf43646 on 2024-03-01 18:50:49 UTC
5cf4364659 Mart*0001 
                0002 #***********************************************************************
                0003 # Makefile Template for the ECCO off-line large scale optimization.
                0004 #  started: Patrick Heimbach heimbach@mit.edu 19-Jun-2000
                0005 #***********************************************************************
                0006 
                0007 # The optimization routines.
                0008 SRC        =    optim_main.F                    \
                0009                 optim_sub.F                     \
                0010                 optim_numbmod.F                 \
                0011                 optim_initmod.F                 \
                0012                 optim_readdata.F                \
                0013                 optim_writedata.F               \
                0014                 ctrl_convert_header.F           \
                0015                 optim_write_control.F           \
                0016                 xerbla.F                        \
                0017                 simul.F
                0018 
                0019 EXEDIR     = .
                0020 TOOLSDIR   = ../tools
                0021 
                0022 INCLUDES   = -I. -I_GET_BLD_DIR
                0023 
                0024 EXTRA_OPT  = _GET_EXTRA_OPT
                0025 EXECUTABLE = $(EXEDIR)/optim.x
                0026 
                0027 # CPP preprocessor command:
                0028 _GET_CPPCMD
                0029 
                0030 # Suffix of preprocessed *.F files:
                0031 SUFX=_GET_SFX_
                0032 
                0033 # The CPP flags.
                0034 DEFINES    = -DREAL_BYTE=4 -DMAX_INDEPEND=1000000 -D$(EXTRA_OPT)
                0035 
                0036 MAKEDEPEND=makedepend
                0037 # this works after you have built xmakedepend
                0038 #MAKEDEPEND=$(TOOLSDIR)/xmakedepend
                0039 
                0040 # FORTRAN compiler and flags.
                0041 _GET_FC
                0042 _GET_FFLAGS
                0043 _GET_FOPTIM
                0044 
                0045 # Lib path and libs
                0046 LIBDIRS    = -L.  -L../lsopt/
                0047 LIBS       = -llsopt_ecco -lblas
                0048 
                0049 # File removal.
                0050 RM         = rm -f
                0051 
                0052 #--- rules ----
                0053 
                0054 SMALLF     = $(SRC:.F=.$(SUFX))
                0055 OBJECTS    = $(SRC:.F=.o)
                0056 
                0057 .SUFFIXES:
                0058 .SUFFIXES: .o .$(SUFX) .F
                0059 
                0060 all: small_f $(EXECUTABLE)
                0061 $(EXECUTABLE): $(OBJECTS)
                0062         $(FC) -o $@ $(FFLAGS) $(FOPTIM) $(OBJECTS) $(LIBDIRS) $(LIBS)
                0063 
                0064 small_f: $(SMALLF)
                0065 
                0066 depend:
                0067         $(MAKEDEPEND) -o .$(SUFX) $(INCLUDES) $(SRC)
                0068 
                0069 # The normal chain of rules is (  .F - ._GET_SFX_ - .o  )
                0070 .F._GET_SFX_:
                0071         $(CPPCMD) > $@
                0072 ._GET_SFX_.o:
                0073         $(FC) $(FFLAGS) $(FOPTIM) -c $<
                0074 
                0075 # Cleaning options.
                0076 clean:
                0077         $(RM) $(EXEDIR)/optim.x *.o *.$(SUFX)
                0078 
                0079 scratch:
                0080         $(RM) OPWARMD OPWARMI $(EXEDIR)/optim.x $(OBJ)
                0081 
                0082 # DO NOT DELETE