## -*- ksh -*-
##
## SMakefile for swadmin
##
## $Id: SMakefile,v 1.1.1.1 1996/12/30 00:24:36 ryan Exp $
##
###########################################################################

## Aggressive optimizations
##
if test "`hostname`" = "lister.andrew.cmu.edu"; then
  DEBUG_SWADMIN="true"
fi

if test "${DEBUG_SWADMIN}x" != "x"; then
  CC=gcc
  CFLAGS="-g -Wall -pedantic";
else
  CC=cc
  case `uname` in
    Linux) CFLAGS="-O3" 
	   DESTDIR="/usr/tmp/depot/swadmin" ;;
    IRIX)  CFLAGS="-O2" ;;
    SunOS)
	   if test "`uname -r`" = "4.1.3_U1"; then 
	     CC=gcc
	     CFLAGS=-O3
	   else
	     CFLAGS="-xO4 -xdepend"
	   fi
	   ;;
    HP-UX)  CFLAGS="-Ae +O3 +Oaggressive" ;;
    ULTRIX) CFLAGS=-O ;;
    *)      CFLAGS=-g ;;
  esac
fi

## For C++
CXXFLAGS=${CFLAGS}
export CFLAGS CC CXXFLAGS

##
## This causes configure to be run as the 'makefile' command.
##
MFCOMMAND="./configure --with-conf=/afs/andrew.cmu.edu/usr0/dc0m/lib/switches"

##
## This will allow you to execute 'smake install', and won't set
## the prefix in GNU makefiles to the AFS destdir.  When the 'all' target
## is made, the prefix will be '/usr/local'.  However, when install is
## executed, the prefix will be set to '$(DESTDIR)'.
##
INSTCOMMAND="${MAKE} prefix=${DESTDIR} exec_prefix=${DESTDIR} install"
