FORT_CPP = /usr/lib/acpp

ifeq ($(WHICHIRIX64), ESCHER)
  XTRALIBS +=  /usr/lib64/libfortran.so
endif
ifeq ($(WHICHIRIX64), MAHLER)
  XTRALIBS +=  /usr/lib32/libfortran.so
endif

ifeq ($(COMP),CC)
CXX     := CC -ptused -LANG:ansi-for-init-scope=ON
CXXOPTF += -O2 -OPT:Olimit=4800
CXXDEBF += -g 
#
# Add -DBL_USE_SETBUF if don't have pubsetbuf() in I/O Streams Library.
#
XTRALIBS          +=  -lftn -lm -lXm -lXt -lX11 -lm

ifeq ($(WHICHIRIX64), ERC2000)
  XTRAINCLOC        += /usr/include/X11 /usr/lib/Xm
else
  XTRAINCLOC        += /usr/include/X11 /usr/include/Xm
endif

override XTRADEFS += -DBL_USE_SETBUF -DBL_OLD_STL
endif

ifeq ($(COMP),KCC)
CXX     := KCC
CXXOPTF += +K2
CXXDEBF += +K0
FORT_CPP = KCC -E
#
# Add -DBL_USE_SETBUF if don't have pubsetbuf() in I/O Streams Library.
#
endif

ifeq ($(WHICHIRIX64), ESCHER)
  FC     = f90 -64
  fC     = $(FC)
  FOPTF += -O2 -OPT:Olimit=4800
  fOPTF += -O2 -OPT:Olimit=4800
else
  ifeq ($(WHICHIRIX64), MAHLER)
    FC     = f90 -r8 -IPA
    fC     = $(FC)
    FOPTF += -Ofast=ip30 -OPT:Olimit=4800
    fOPTF += -Ofast=ip30 -OPT:Olimit=4800
  else
    FC     = f77 -64
    fC     = $(FC)
    FOPTF += -g3  -Ofast=ip27
    fOPTF += -g3  -Ofast=ip27
  endif
endif

FDEBF += -g
fDEBF += -g

COPTF += -O
CDEBF += -g
CPRFF +=

OUTPUT_OPTION	= ; mv $*.o $(objTempDir)/$*.o

FORTPREP	= perl $(PBOXLIB_HOME)/scripts/strip72 -c
FORT_OUTPUT_OPTION	= ; mv $*.o $(objTempDir)/$*.o

ifeq ($(WHICHIRIX64), MAHLER)
  LDFLAGS += -IPA
endif
