blob: 3f48ecc445d28135a8366f5faa7760983b77a2bc [file] [log] [blame]
SHELL = /bin/sh
srcdir = @srcdir@
VPATH = @srcdir@
@SET_MAKE@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
snmplibdir = $(prefix)/lib/snmp
mibdir = $(snmplibdir)/mibs
SED = @SED@
INSTALL = @INSTALL@
CPP = @CPP@ -I. -DDONT_INC_STRUCTS -DBINDIR=$(bindir) $(EXTRACPPFLAGS)
CFLAGS = @CFLAGS@
EXTRACPPFLAGS = @EXTRACPPFLAGS@
TARG = bin/snmpget bin/snmpgetnext bin/snmpset bin/snmptranslate bin/snmpwalk bin/snmpbulkwalk bin/snmptest bin/snmptrapd bin/snmpnetstat bin/snmpd
SUBDIRS = snmplib agent apps local ov man
INSTALLDIRS = $(SUBDIRS)
all: mib.txt ucd-snmp.txt sedscript EXAMPLE.conf subdirs
sedscript: sedscript.in config.h agent/extensible/mibdefs.h
$(CPP) -DPREFIX=$(prefix) sedscript.in | sed 's/REMOVEME//g;s# /#/#g;s/ #/#/g;' > sedscript
subdirs:
for i in $(SUBDIRS) ; do \
( cd $$i ; $(MAKE) ) \
done
distall: ${srcdir}/configure ${srcdir}/config.h
install: subdirs installdirs
for i in $(INSTALLDIRS) ; do \
( cd $$i ; $(MAKE) install ) \
done
@$(INSTALL) mib.txt $(snmplibdir) ; echo "install: installed mib.txt in $(snmplibdir)"
@$(INSTALL) ucd-snmp.txt $(mibdir) ; echo "install: installed ucd-snmp.txt in $(mibdir)"
installdirs:
@$(SHELL) $(srcdir)/mkinstalldirs $(snmplibdir) $(mibdir)
apps/snmpget apps/snmpgetnext apps/snmpset apps/snmptranslate apps/snmpwalk apps/snmpbulkwalk apps/snmptest apps/snmptrapd apps/snmpnetstat/snmpnetstat agent/snmpd: makeall
depend:
cd snmplib; make depend
cd apps; make depend
cd agent; make depend
clean:
for i in $(SUBDIRS) ; do \
( cd $$i ; $(MAKE) clean ) \
done
rm -f mib.txt EXAMPLE.conf sedscript ucd-snmp.txt
distclean: clean configclean
configclean:
rm -f config.cache config.status config.log
rm -f snmplib/Makefile Makefile snmptcl/Makefile agent/Makefile apps/Makefile apps/snmpnetstat/Makefile agent/extensible/Makefile local/Makefile
configure: configure.in aclocal.m4
cd ${srcdir} && autoconf
echo "Please run configure now."
sh -c exit 2
# autoheader might not change config.h.in, so touch a stamp file.
config.h.in: stamp-h.in
stamp-h.in: configure.in acconfig.h
cd ${srcdir} && autoheader
echo timestamp > ${srcdir}/stamp-h.in
config.h: stamp-h
stamp-h: config.h.in config.status
./config.status
echo timestamp > ${srcdir}/stamp-h
touchit:
touch configure config.h.in
touch config.h config.status
touch stamp-h stamp-h.in
touch Makefile
Makefile: Makefile.in config.status
$(SHELL) ./config.status
config.status: configure
$(srcdir)/config.status --recheck
mib.txt: mibII.txt
cat mibII.txt > mib.txt
ucd-snmp.txt: ece-mib.def sedscript
cat ece-mib.def | $(SED) -f sedscript > ucd-snmp.txt
EXAMPLE.conf: sedscript EXAMPLE.conf.def
$(SED) -f sedscript EXAMPLE.conf.def > EXAMPLE.conf