#
# Minimum environment and virtual path setup
#
SHELL		= /bin/sh
srcdir		= @srcdir@
top_srcdir	= @top_srcdir@
VERSION		= @VERSION@
@SET_MAKE@

#
# Paths
#
prefix		= @prefix@
exec_prefix	= @exec_prefix@
bindir		= @bindir@
sbindir		= @sbindir@
libdir		= @libdir@
datadir		= @datadir@
includedir	= @includedir@/net-snmp
ucdincludedir	= @includedir@/ucd-snmp
mandir		= @mandir@
man1dir		= $(mandir)/man1
man3dir		= $(mandir)/man3
man5dir		= $(mandir)/man5
man8dir		= $(mandir)/man8
snmplibdir	= $(datadir)/snmp
mibdir		= $(snmplibdir)/mibs
persistentdir	= @PERSISTENT_DIRECTORY@
INSTALL_PREFIX  = @INSTALL_PREFIX@

#
# Programs
#
INSTALL		= $(LIBTOOL) --mode=install @INSTALL@
UNINSTALL	= $(LIBTOOL) --mode=uninstall rm -f
INSTALL_DATA    = @INSTALL_DATA@
SED		= @SED@
LN_S		= @LN_S@
AUTOCONF	= @AUTOCONF@
AUTOHEADER	= @AUTOHEADER@

#
# Compiler arguments
#
CFLAGS		+= @CFLAGS@
EXTRACPPFLAGS	+= @EXTRACPPFLAGS@
LDFLAGS		+= @LDFLAGS@ 
LIBTOOL		= @LIBTOOL@ @LIBTOOLFLAGS@
EXEEXT		= @EXEEXT@

# Misc Compiling Stuff
CC	        = @CC@

# ok, use libtool versioning, but not quite the way they recommend.
# The shared library version number will be:
#
#   (CURRENT-AGE).AGE.REVISION
#
# *** THIS MEANS YOU MAY NEED TO DECREMENT CURRENT FOR A NEW RELEASE ***
#
# examples:
#   C.A.R   library name
#  -------  ---------------
#   5.0.9   libxxx.so.5.0.9
#   6.1.2   libxxx.so.5.1.2
#   7.2.8   libxxx.so.5.2.8
#   6.0.0   libxxx.so.6.0.0
# 
LIBCURRENT  = 7
LIBAGE      = 2
LIBREVISION = 0

LIB_LD_CMD      = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
LIB_EXTENSION   = la
LIB_VERSION     =
LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)
LINK		= $(LIBTOOL) --mode=link $(CC)
# RANLIB 	= @RANLIB@
RANLIB		= :

# libtool definitions
.SUFFIXES: .c .o .lo .rc
.c.lo:
	$(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
.rc.lo:
	$(LIBTOOL) --mode=compile windres -o $@ $<

# include paths
#
SRC_TOP_INCLUDES            = -I$(top_srcdir)/include
SRC_SNMPLIB_INCLUDES        = -I$(top_srcdir)/snmplib
SRC_AGENT_INCLUDES          = -I$(top_srcdir)/agent
SRC_HELPER_INCLUDES         = -I$(top_srcdir)/agent/helpers
SRC_MIBGROUP_INCLUDES       = -I$(top_srcdir)/agent/mibgroup

BLD_TOP_INCLUDES            = -I$(top_builddir)/include $(SRC_TOP_INCLUDES)
BLD_SNMPLIB_INCLUDES        = -I$(top_builddir)/snmplib $(SRC_SNMPLIB_INCLUDES)
BLD_AGENT_INCLUDES          = -I$(top_builddir)/agent $(SRC_AGENT_INCLUDES)
BLD_HELPER_INCLUDES         = -I$(top_builddir)/agent/helpers $(SRC_HELPER_INCLUDES)
BLD_MIBGROUP_INCLUDES       = -I$(top_builddir)/agent/mibgroup $(SRC_MIBGROUP_INCLUDES)

TOP_INCLUDES            = $(@TOP_INCLUDES@)
SNMPLIB_INCLUDES        = $(@SNMPLIB_INCLUDES@)
AGENT_INCLUDES          = $(@AGENT_INCLUDES@)
HELPER_INCLUDES         = $(@HELPER_INCLUDES@)
MIBGROUP_INCLUDES       = $(@MIBGROUP_INCLUDES@)

