
FORT_CPP = cpp

ifeq ($(COMP),CC)
CXX     := CC -h instantiate=local -h new_for_init
CXXOPTF += -O2
CXXDEBF += -g
#
# Add -DBL_USE_SETBUF if don't have pubsetbuf() in I/O Streams Library.
#
override XTRADEFS += -DBL_USE_SETBUF -DBL_SETBUF_SIGNED_CHAR
override XTRADEFS += -DBL_COALESCE_FABS -DBL_OLD_STL
endif

ifeq ($(COMP),KCC)
CXX     := KCC --no_exceptions
CXXOPTF += +K3 --backend '-h nomessage=191:1135:7212,aggress,inline1,pipeline2,scalar2'
CXXDEBF += +K0
#
# Add -DBL_USE_SETBUF if don't have pubsetbuf() in I/O Streams Library.
#
override XTRADEFS += -DBL_COALESCE_FABS
endif

ifeq ($(PROFILE), TRUE)
#
# The following are for apprentice
# apprentice is broken on the T3E -- vince
#
#CXXPRFF	 += -happrentice
#XTRALIBS += -lapp
#FPRFF += -eA
#
# The following is for pat
#
ifeq ($(COMP),CC)
XTRALIBS += -lpat pat.cld
endif
ifeq ($(COMP),KCC)
XTRALIBS += --backend -lpat --backend pat.cld
endif
endif

FC     = f90 -M 1110
FOPTF += -O,aggress,pipeline2,vector3,split0 -apad 
FDEBF += -g

fC     = $(FC) -N 80
fOPTF += -O,aggress,pipeline2,vector3,split0 -apad 
fDEBF += -g

COPTF += -O2
CDEBF += -g
CPRFF +=

ifeq ($(COMP),CC)
    EXE_OUTPUT_OPTION       = ; mv $*.o $(objEXETempDir)/$*.o
    LIB_OUTPUT_OPTION       = ; mv $*.o $(objTempDir)/$*.o
endif
FORT_EXE_OUTPUT_OPTION	= ; mv $*.o $(objEXETempDir)/$*.o
FORT_LIB_OUTPUT_OPTION	= ; mv $*.o $(objTempDir)/$*.o

FORTLINK = UPPERCASE

FORTPREP = sed '/^!/d' | perl $(PBOXLIB_HOME)/scripts/strip72 -c
