# Multithreaded + multi-processing makefile for:
#    Linux GLACIER3.MIT.EDU 2.6.32-754.17.1.el6.x86_64 #1 SMP Tue Jul 2 12:42:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
# This makefile was generated automatically on
#    Tue Aug  6 05:39:31 EDT 2019
# by the command:
#    ../../../tools/genmake2 -ds -m make -mods=../code_ad -optfile=/net/confucius/raid13/home/gforget/MITgcm/tools/build_options/linux_amd64_gfortran -ieee -mpi
# executed by:
#    gforget@GLACIER3.MIT.EDU:/net/confucius/raid13/home/gforget/MITgcm/verification/global_oce_llc90/build
#
# OPTFILE="/net/confucius/raid13/home/gforget/MITgcm/tools/build_options/linux_amd64_gfortran"
#
# BUILDDIR     : Directory where object files are written
# SOURCEDIRS   : Directories containing the source (.F) files
# INCLUDEDIRS  : Directories containing the header-source (.h) files
# EXEDIR       : Directory where executable that is generated is written
# EXECUTABLE   : Full path of executable binary
#
# CPP          : C-preprocessor command
# INCLUDES     : Directories searched for header files
# DEFINES      : Macro definitions for CPP
# MAKEDEPEND   : Dependency generator
# FC           : Fortran compiler command
# FFLAGS       : Configuration/debugging options for FC
# FOPTIM       : Optimization options for FC
# LINK         : Command for link editor program
# LIBS         : Library flags /or/ additional optimization/debugging flags

ROOTDIR     = ../../..
BUILDDIR    = .
SOURCEDIRS  =  ../code_ad $(ROOTDIR)/pkg/autodiff $(ROOTDIR)/pkg/cal $(ROOTDIR)/pkg/cost $(ROOTDIR)/pkg/ctrl $(ROOTDIR)/pkg/debug $(ROOTDIR)/pkg/diagnostics $(ROOTDIR)/pkg/ecco $(ROOTDIR)/pkg/exch2 $(ROOTDIR)/pkg/exf $(ROOTDIR)/pkg/generic_advdiff $(ROOTDIR)/pkg/ggl90 $(ROOTDIR)/pkg/gmredi $(ROOTDIR)/pkg/grdchk $(ROOTDIR)/pkg/mdsio $(ROOTDIR)/pkg/mom_common $(ROOTDIR)/pkg/mom_vecinv $(ROOTDIR)/pkg/monitor $(ROOTDIR)/pkg/profiles $(ROOTDIR)/pkg/rw $(ROOTDIR)/pkg/salt_plume $(ROOTDIR)/pkg/sbo $(ROOTDIR)/pkg/seaice $(ROOTDIR)/pkg/smooth $(ROOTDIR)/pkg/timeave $(ROOTDIR)/eesupp/src $(ROOTDIR)/model/src
INCLUDEDIRS =  /usr/include/openmpi-x86_64 ../code_ad $(ROOTDIR)/pkg/autodiff $(ROOTDIR)/pkg/cal $(ROOTDIR)/pkg/cost $(ROOTDIR)/pkg/ctrl $(ROOTDIR)/pkg/debug $(ROOTDIR)/pkg/diagnostics $(ROOTDIR)/pkg/ecco $(ROOTDIR)/pkg/exch2 $(ROOTDIR)/pkg/exf $(ROOTDIR)/pkg/generic_advdiff $(ROOTDIR)/pkg/ggl90 $(ROOTDIR)/pkg/gmredi $(ROOTDIR)/pkg/grdchk $(ROOTDIR)/pkg/mdsio $(ROOTDIR)/pkg/mom_common $(ROOTDIR)/pkg/mom_vecinv $(ROOTDIR)/pkg/monitor $(ROOTDIR)/pkg/profiles $(ROOTDIR)/pkg/rw $(ROOTDIR)/pkg/salt_plume $(ROOTDIR)/pkg/sbo $(ROOTDIR)/pkg/seaice $(ROOTDIR)/pkg/smooth $(ROOTDIR)/pkg/timeave $(ROOTDIR)/eesupp/inc $(ROOTDIR)/model/inc
EXEDIR      = .
EXECUTABLE  = $(EXEDIR)/mitgcmuv
TOOLSDIR    = $(ROOTDIR)/tools
OADTOOLS    = 

#eh3  new defines for the adjoint work
AUTODIFF    = $(ROOTDIR)/pkg/autodiff
EXE_AD      = mitgcmuv_ad
EXE_FTL     = mitgcmuv_ftl
EXE_SVD     = mitgcmuv_svd

ENABLED_PACKAGES =  -DALLOW_AUTODIFF -DALLOW_CAL -DALLOW_COST -DALLOW_CTRL -DALLOW_DEBUG -DALLOW_DIAGNOSTICS -DALLOW_ECCO -DALLOW_EXCH2 -DALLOW_EXF -DALLOW_GENERIC_ADVDIFF -DALLOW_GGL90 -DALLOW_GMREDI -DALLOW_GRDCHK -DALLOW_MDSIO -DALLOW_MOM_COMMON -DALLOW_MOM_VECINV -DALLOW_MONITOR -DALLOW_PROFILES -DALLOW_RW -DALLOW_SALT_PLUME -DALLOW_SBO -DALLOW_SEAICE -DALLOW_SMOOTH -DALLOW_TIMEAVE
DISABLED_PACKAGES =  -UALLOW_ADMTLM -UALLOW_AIM_V23 -UALLOW_ATM2D -UALLOW_ATM_COMMON -UALLOW_ATM_COMPON_INTERF -UALLOW_ATM_OCN_COUPLER -UALLOW_ATM_PHYS -UALLOW_BBL -UALLOW_BLING -UALLOW_BULK_FORCE -UALLOW_CD_CODE -UALLOW_CFC -UALLOW_CHEAPAML -UALLOW_CHRONOS -UALLOW_COMPON_COMMUNIC -UALLOW_DIC -UALLOW_DOWN_SLOPE -UALLOW_EBM -UALLOW_EMBED_FILES -UALLOW_FIZHI -UALLOW_FLT -UALLOW_FRAZIL -UALLOW_GCHEM -UALLOW_GRIDALT -UALLOW_ICEFRONT -UALLOW_KL10 -UALLOW_KPP -UALLOW_LAND -UALLOW_LAYERS -UALLOW_LONGSTEP -UALLOW_MATRIX -UALLOW_MNC -UALLOW_MOM_FLUXFORM -UALLOW_MY82 -UALLOW_MYPACKAGE -UALLOW_OBCS -UALLOW_OCN_COMPON_INTERF -UALLOW_OFFLINE -UALLOW_OPENAD -UALLOW_OPPS -UALLOW_PP81 -UALLOW_PTRACERS -UALLOW_RBCS -UALLOW_REGRID -UALLOW_RUNCLOCK -UALLOW_SHAP_FILT -UALLOW_SHELFICE -UALLOW_SHOWFLOPS -UALLOW_SPHERE -UALLOW_STREAMICE -UALLOW_THSICE -UALLOW_ZONAL_FILT

# These files are created by Makefile
SPECIAL_FILES = PACKAGES_CONFIG.h AD_CONFIG.h FC_NAMEMANGLE.h BUILD_INFO.h
EMBEDDED_FILES = 
# Unix ln (link)
LN = ln -s
# Dependency generator
MAKEDEPEND = $(TOOLSDIR)/xmakedepend
# Special preprocessor (KAP on DECs, FPP on Crays)
KPP = 
# Fortran compiler
FC = mpif77
# Fortran compiler
F90C = mpif90
# C compiler
CC = mpicc
# Link editor
LINK = mpif77 

# Defines for CPP
DEFINES = -DWORDLENGTH=4 -DNML_TERMINATOR -DALLOW_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME_SBR -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT -DHAVE_NETCDF -DHAVE_FLUSH 
# Includes for CPP
INCLUDES = -I/usr/local/netcdf/include -I/usr/include/openmpi-x86_64
# default CPP includes for makedepend
CPPINCLUDES =  -I/usr/local/include -I/usr/lib/gcc/x86_64-redhat-linux/4.4.7/include -I/usr/include
# Flags for KPP
KFLAGS1 = 
KFLAGS2 = 
# Optim./debug for FC
FFLAGS =  -fconvert=big-endian -fimplicit-none -mcmodel=medium -Wall
FOPTIM = -O0 
# Optim./debug for FC
F90FLAGS =  -fconvert=big-endian -fimplicit-none -mcmodel=medium -Wall
F90OPTIM = -O0
F90FIXEDFORMAT = -ffixed-form
# Flags for CC
CFLAGS = -O0 -mcmodel=medium
# Files that should not be optimized
NOOPTFILES = 
NOOPTFLAGS = -O0
# Flags and libraries needed for linking
LIBS = -L/usr/local/netcdf/lib -lnetcdff -lnetcdf
# Name of the makefile
MAKEFILE = Makefile
# Name of the make program
MAKE = make

F77_SRC_FILES =  \
 mom_calc_visc.F \
 rotate_uv2en.F \
 active_file_ad.F \
 active_file_control.F \
 active_file_control_slice.F \
 active_file.F \
 active_file_gen_ad.F \
 active_file_gen.F \
