#
# This file is specific to Carnegie Mellon University's
# software build process
# 
# $Id: SMakefile,v 1.32 1998/09/18 19:27:13 wcw Exp $
#

MAKE=gmake

# settings; we have to disable these on some platforms
AMSSYNC=--enable-amssync
WITHAUTH="--with-auth=krb_pts"

if "${CC-unset}" = "unset"; then
  CC=cc
fi

# CFLAGS="${CFLAGS} -g"

VER=`smake -D | sed 's;^.*\/;;'`
LOCALDEFS="-DEXTRA_IDENT=\\\"$VER\\\""

# Ryan's aggressive optimizations
case `uname` in
  Linux) CFLAGS="${CFLAGS} -O3 -g"
	 LDFLAGS="${LDFLAGS}"
	 AMSSYNC="" # this might actually build now, but we don't need it
	 ;;
  IRIX) CFLAGS="${CFLAGS} -O2"
	LDFLAGS="${LDFLAGS}"
        #LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib"
        #export LDFLAGS
	AMSSYNC=""
	;;
  HP-UX)  
	CC=gcc # hp cc can't handle Cyrus
	CFLAGS="${CFLAGS} -O2"
	;;
  SunOS) # these flags are only for solaris
	 # -xs: generate debugging information that gdb likes
	 CFLAGS="${CFLAGS} -xO3 "
	 LDFLAGS="${LDFLAGS} -xs -xO3"
	 ;;
  ULTRIX)  
	CC=gcc # cheat -- Ultrix cc is aged
	CFLAGS="${CFLAGS} -O"
	WITHAUTH=""
	AMSSYNC=""
	;;
  *)    
	;;
esac


LNCOMMAND="${SRCDIR}/configure $WITHAUTH --with-inn=/usr/news $AMSSYNC --enable-experiment --enable-cmulocal --enable-debug --with-cyrus-group=staff"

export CFLAGS CC VER LNCOMMAND LOCALDEFS LDFLAGS

