| # |
| # Makefile.in (at the root of net-snmp) |
| # |
| |
| top_builddir = . |
| |
| SUBDIRS = snmplib agent apps local man mibs |
| TESTDIRS = testing |
| |
| CPP = @CPP@ \ |
| -Iinclude -I$(srcdir)/agent/mibgroup -I. -I$(srcdir) \ |
| -DDONT_INC_STRUCTS -DBINDIR=$(bindir) \ |
| $(EXTRACPPFLAGS) |
| |
| INSTALLHEADERS=version.h |
| INCLUDESUBDIR=system |
| INCLUDESUBDIRHEADERS= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h darwin.h \ |
| dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \ |
| irix.h linux.h mips.h netbsd.h openbsd.h solaris2.6.h solaris2.7.h \ |
| solaris2.8.h solaris.h sunos.h svr5.h sysv.h ultrix4.h |
| INCLUDESUBDIR2=machine |
| INCLUDESUBDIRHEADERS2=generic.h |
| INSTALLBUILTHEADERS=include/net-snmp/net-snmp-config.h |
| INSTALLBINSCRIPTS=net-snmp-config |
| INSTALLUCDHEADERS=ucd-snmp-config.h version.h mib_module_config.h |
| |
| # |
| # other install rules. |
| # |
| OTHERINSTALL=copypersistentfiles @PERLINSTALLTARGS@ |
| COPY_PERSISTENT_FILES=@COPY_PERSISTENT_FILES@ |
| PERSISTENT_DIRECTORY=@PERSISTENT_DIRECTORY@ |
| UCDPERSISTENT_DIRECTORY=@UCDPERSISTENT_DIRECTORY@ |
| |
| # |
| # perl specific |
| # |
| # yes, order matters here. default_store must occur before anything else |
| PERLMODULES=default_store SNMP ASN OID agent |
| |
| all: sedscript EXAMPLE.conf standardall net-snmp-config-x @PERLTARGS@ |
| |
| |
| # |
| # local build rules |
| # |
| sedscript: sedscript.in include/net-snmp/net-snmp-config.h $(srcdir)/agent/mibgroup/mibdefs.h |
| $(CPP) -DPREFIX=$(prefix) -DLIBDIR=$(libdir) -DDATADIR=$(datadir) $(srcdir)/sedscript.in | egrep '^s[/#]' | sed 's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript |
| |
| EXAMPLE.conf: sedscript EXAMPLE.conf.def |
| $(SED) -f sedscript $(srcdir)/EXAMPLE.conf.def > EXAMPLE.conf |
| |
| docs: docsdir mancp |
| |
| docsdir: doxygen.conf |
| srcdir=$(srcdir) doxygen $(srcdir)/doxygen.conf |
| |
| mancp: |
| @for i in docs/man/man3/* ; do \ |
| cp $$i man/netsnmp_`basename $$i` ; \ |
| done |
| |
| net-snmp-config-x: |
| chmod a+x net-snmp-config |
| |
| # |
| # extra install rules |
| # |
| |
| copypersistentfiles: |
| @if test "$(COPY_PERSISTENT_FILES)" = "yes" -a -d $(UCDPERSISTENT_DIRECTORY) -a ! -d $(PERSISTENT_DIRECTORY) ; then \ |
| cp -pr $(UCDPERSISTENT_DIRECTORY) $(PERSISTENT_DIRECTORY) ; \ |
| echo "copying $(UCDPERSISTENT_DIRECTORY) to $(PERSISTENT_DIRECTORY)" ; \ |
| fi |
| # |
| # test targets |
| # |
| test: all testdirs |
| ( cd testing; $(MAKE) test ) |
| |
| testdirs: |
| for i in $(TESTDIRS) ; do \ |
| ( cd $$i ; $(MAKE) ) ; \ |
| done |
| |
| distall: ${srcdir}/configure ${srcdir}/include/net-snmp/net-snmp-config.h |
| |
| OTHERCLEANTARGETS="EXAMPLE.conf sedscript perlclean" |
| |
| # |
| # perl specific build rules |
| # |
| perlmodules: |
| @for i in $(PERLMODULES); do \ |
| dir=`pwd`; \ |
| if test ! -f perl/$$i/Makefile; then \ |
| (cd perl/$$i ; perl Makefile.PL -NET-SNMP-IN-SOURCE=true -NET-SNMP-CONFIG="sh $$dir/net-snmp-config" INST_LIB=../blib/lib INST_ARCHLIB=../blib/arch) ; \ |
| fi ; \ |
| (cd perl/$$i ; $(MAKE)) ; \ |
| done |
| |
| perlinstall: |
| @for i in $(PERLMODULES); do \ |
| (cd perl/$$i ; $(MAKE) install) ; \ |
| done |
| |
| perlclean: |
| @for i in $(PERLMODULES); do \ |
| ( cd perl/$$i ; $(MAKE) clean ) ; \ |
| done |
| |
| # |
| # make distclean completely removes all traces of building including |
| # any files generated by configure itself. |
| # |
| distclean: clean configclean |
| |
| makefileclean: |
| rm -f Makefile snmplib/Makefile \ |
| agent/Makefile agent/mibgroup/Makefile \ |
| agent/helpers/Makefile \ |
| apps/Makefile apps/snmpnetstat/Makefile \ |
| man/Makefile mibs/Makefile ov/Makefile \ |
| local/Makefile testing/Makefile |
| |
| configclean: makefileclean |
| rm -f config.cache config.status config.log \ |
| libtool include/net-snmp/net-snmp-config.h |
| rm -f mibs/.index |
| rm -f include/net-snmp/agent/mib_module_config.h \ |
| snmplib/snmpsm_init.h \ |
| agent/mibgroup/mib_module_includes.h \ |
| agent/mibgroup/mib_module_inits.h \ |
| agent/mibgroup/mib_module_shutdown.h \ |
| agent/mibgroup/mib_module_dot_conf.h |
| rm -f *.core |
| |
| # |
| # Configure script related targets |
| # |
| touchit: |
| touch configure include/net-snmp/net-snmp-config.h.in |
| touch config.status |
| touch stamp-h stamp-h.in |
| |
| Makefile: Makefile.in config.status Makefile.rules Makefile.top |
| CONFIG_HEADERS= ./config.status |
| |
| $(srcdir)/include/net-snmp/net-snmp-config.h.in: stamp-h.in |
| $(srcdir)/stamp-h.in: configure.in acconfig.h |
| cd ${srcdir} && LC_COLLATE=C $(AUTOHEADER) |
| echo timestamp > ${srcdir}/stamp-h.in |
| |
| include/net-snmp/net-snmp-config.h: stamp-h |
| stamp-h: include/net-snmp/net-snmp-config.h.in config.status |
| CONFIG_FILES= ./config.status |
| echo timestamp > stamp-h |
| |
| $(srcdir)/configure: configure.in aclocal.m4 |
| cd ${srcdir} && $(AUTOCONF) |
| echo "Please run configure now." |
| sh -c exit 2 |
| |
| config.status: configure |
| ./config.status --recheck |
| |
| # |
| # Emacs TAGS file |
| # |
| TAGS: |
| find $(srcdir) -name '*.[ch]' -print | etags - |
| |
| # |
| # Internal distribution packaging, etc. |
| # |
| version: |
| @if test "x$(VERSION)" = "x"; then \ |
| echo "you need to supply a VERSION string."; \ |
| exit 2; \ |
| fi |
| agent/mibgroup/versiontag $(VERSION) reverse |
| |
| tag: |
| agent/mibgroup/versiontag $(VERSION) tag |
| |
| tar: |
| agent/mibgroup/versiontag $(VERSION) tar |
| |
| dist: version tag tar |
| |
| FAQ.html: |
| local/FAQ2HTML FAQ |
| |
| .PHONY: docs docsdir mancp testdirs test TAGS net-snmp-config-x |
| # note: tags and docs are phony to force rebulding |