## -*- ksh -*-
##
## SMakefile for CMU SNMP V1
##
## $Id: SMakefile,v 1.7 1997/03/26 01:36:05 ryan Exp $
##
###########################################################################

CC=cc
case `uname` in
  IRIX) CFLAGS="-O2" 
	LDFLAGS="-L/usr/local/lib -Wl,-rpath,/usr/local/lib -old_ld"
	export LDFLAGS ;;
  HP-UX)   CFLAGS="-Ae +O3 +z" ;;
  SunOS)   
	 if test "`uname -r`" = "4.1.3_U1"; then 
	   CC=gcc
	   CFLAGS="-O3"
	 else
	   CFLAGS="-xO4 -xdepend"
	 fi
	 ;;
  ULTRIX)  CFLAGS="-O" ;;
  Linux)   CFLAGS="-O3" ;;
  *)       CFLAGS=-g ;;
esac

## Debugging on my workstation, but nowhere else. :)
if test "`/bin/hostname`" = "lister.andrew.cmu.edu"; then
  CC=gcc
  CFLAGS="-g -Wall -pedantic"
  DESTDIR=/usr/tmp/ryan/depot/snmp
fi

export CFLAGS CC DESTDIR

##
## This causes configure to be run as the 'makefile' command.
##
MFCOMMAND="./configure"

##
## 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"
