1 # $Id$ 2 # 3 # WARNING: do not run this directly, it should be run by the master Makefile 4 5 include ../../Makefile.defs 6 7 HAS_BUILDER = $(shell if which net-snmp-config >/dev/null 2>/dev/null;then echo YES; fi) 8 9 ifeq ($(CROSS_COMPILE),) 10 ifeq ($(HAS_BUILDER),YES) 11 # use autodetection 12 DEFS += $(shell net-snmp-config --cflags) 13 LIBS = $(shell net-snmp-config --netsnmp-agent-libs --external-agent-libs) 14 INSTALLMIBDIR = $(cfg_prefix)$(shell net-snmp-config --prefix)/share/snmp/mibs 15 endif 16 else 17 # use standard know paths 18 DEFS +=-I$(LOCALBASE)/include 19 LIBS =-L$(LOCALBASE)/lib -lnetsnmpmibs -lnetsnmpagent \ 20 -lnetsnmphelpers -lnetsnmp 21 INSTALLMIBDIR = $(cfg_prefix)/share/snmp/mibs 22 endif 23 24 CFLAGS+= 25 auto_gen= 26 NAME=snmpstats.so 27 28 include ../../Makefile.modules 29 30 install_module_custom: 31 echo "installing mibs ..." 32 mkdir -p $(INSTALLMIBDIR) 33 $(INSTALL_CFG) mibs/OPENSER* $(INSTALLMIBDIR) 34