# Multithreaded + multi-processing makefile for:
#    Linux compute-3-23.local 2.6.18-128.1.6.el5 #1 SMP Wed Apr 1 09:10:25 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
# This makefile was generated automatically on
#    Sun May 30 03:54:57 EDT 2010
# by the command:
#    ../../../tools/genmake2 -ds -m make -mods=../code -optfile=/scratch/jahn/src/testreport/MITgcm_ifort-mpi-noieee/tools/build_options/linux_amd64_ifort+mpi_beagle -mpi
# executed by:
#    jahn@compute-3-23.local:/scratch/jahn/src/testreport/MITgcm_ifort-mpi-noieee/verification/advect_xz/build
#
# OPTFILE="/scratch/jahn/src/testreport/MITgcm_ifort-mpi-noieee/tools/build_options/linux_amd64_ifort+mpi_beagle"
#
# 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
# KPP          : Special preprocessor command (specific to platform)
# KFLAGS       : Flags for KPP
# 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 ../../../pkg/debug ../../../pkg/diagnostics ../../../pkg/generic_advdiff ../../../pkg/mdsio ../../../pkg/monitor ../../../pkg/rw ../../../eesupp/src ../../../model/src
INCLUDEDIRS =  ../code ../../../pkg/debug ../../../pkg/diagnostics ../../../pkg/generic_advdiff ../../../pkg/mdsio ../../../pkg/monitor ../../../pkg/rw ../../../eesupp/inc ../../../model/inc
EXEDIR      = .
EXECUTABLE  = $(EXEDIR)/mitgcmuv
TOOLSDIR    = ../../../tools

#eh3  new defines for the adjoint work
AUTODIFF    = ../../../pkg/autodiff
EXE_AD      = mitgcmuv_ad
EXE_FTL     = mitgcmuv_ftl
EXE_SVD     = mitgcmuv_svd

ENABLED_PACKAGES =  -DALLOW_DEBUG -DALLOW_DIAGNOSTICS -DALLOW_GENERIC_ADVDIFF -DALLOW_MDSIO -DALLOW_MONITOR -DALLOW_RW
DISABLED_PACKAGES =  -UALLOW_ADMTLM -UALLOW_AIM_COMPON_INTERF -UALLOW_AIM_V23 -UALLOW_ATM2D -UALLOW_ATM_COMMON -UALLOW_ATM_OCN_COUPLER -UALLOW_AUTODIFF -UALLOW_BULK_FORCE -UALLOW_CAL -UALLOW_CD_CODE -UALLOW_CFC -UALLOW_CHEAPAML -UALLOW_CHRONOS -UALLOW_COMPON_COMMUNIC -UALLOW_COST -UALLOW_CTRL -UALLOW_DIC -UALLOW_DOWN_SLOPE -UALLOW_EBM -UALLOW_ECCO -UALLOW_EMBED_FILES -UALLOW_EXCH2 -UALLOW_EXF -UALLOW_FIZHI -UALLOW_FLT -UALLOW_GCHEM -UALLOW_GGL90 -UALLOW_GMREDI -UALLOW_GRDCHK -UALLOW_GRIDALT -UALLOW_ICEFRONT -UALLOW_KPP -UALLOW_LAND -UALLOW_LAYERS -UALLOW_LONGSTEP -UALLOW_MATRIX -UALLOW_MNC -UALLOW_MOM_COMMON -UALLOW_MOM_FLUXFORM -UALLOW_MOM_VECINV -UALLOW_MY82 -UALLOW_MYPACKAGE -UALLOW_OBCS -UALLOW_OCN_COMPON_INTERF -UALLOW_OFFLINE -UALLOW_OPPS -UALLOW_PP81 -UALLOW_PROFILES -UALLOW_PTRACERS -UALLOW_RBCS -UALLOW_REGRID -UALLOW_RUNCLOCK -UALLOW_SALT_PLUME -UALLOW_SBO -UALLOW_SEAICE -UALLOW_SHAP_FILT -UALLOW_SHELFICE -UALLOW_SHOWFLOPS -UALLOW_SMOOTH -UALLOW_SPHERE -UALLOW_THSICE -UALLOW_TIMEAVE -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
# C preprocessor
CPP = cat $< | $(TOOLSDIR)/set64bitConst.sh |  cpp  -traditional -P
# Dependency generator
MAKEDEPEND = makedepend
# Special preprocessor (KAP on DECs, FPP on Crays)
KPP = 
# Fortran compiler
FC = mpif77
# Fortran compiler
F90C = mpif90 -fixed -c 
# C compiler
CC = mpicc
# Link editor
LINK = mpif77 

# Defines for CPP
DEFINES = -DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4 -DIFORT -DALLOW_USE_MPI -DALWAYS_USE_MPI -DHAVE_SYSTEM -DHAVE_FDATE -DHAVE_ETIME -DHAVE_CLOC -DHAVE_SETRLSTK -DHAVE_SIGREG -DHAVE_STAT 
# Includes for CPP
INCLUDES = -I/home/software/netcdf/netcdf-3.6.2/intel-10.0.025/include -I/home/software/intel/intel-10.0.025/include
# Flags for KPP
KFLAGS1 = 
KFLAGS2 = 
# Optim./debug for FC
FFLAGS =  -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian 
FOPTIM = -O2 -align
# Optim./debug for FC
F90FLAGS =  -w95 -W0 -WB -xT -fno-alias -assume byterecl -convert big_endian
F90OPTIM = -O2 -align
F90FIXEDFORMAT = 
# Flags for CC
CFLAGS = 
# Files that should not be optimized
NOOPTFILES = mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F mom_calc_ke.F mon_ke.F mds_byteswap.F
NOOPTFLAGS = -O2
# Flags and libraries needed for linking
LIBS = -L/home/software/netcdf/netcdf-3.6.2/intel-10.0.025/lib -I/home/software/netcdf/netcdf-3.6.2/intel-10.0.025/include -L/home/software/intel/intel-10.0.025/lib -I/home/software/intel/intel-10.0.025/include -shared-intel -lnetcdff -lnetcdf
# Name of the Mekfile
MAKEFILE=Makefile

F77_SRC_FILES =  \
 chksum_tiled.F \
 debug_call.F \
 debug_cs_corner_uv.F \
 debug_enter.F \
 debug_fld_stats_rl.F \
 debug_fld_stats_rs.F \
 debug_leave.F \
 debug_msg.F \
 debug_stats_rl.F \
