| 1 |
# |
| 2 |
# WARNING: do not run this directly, it should be run by the main Makefile |
| 3 |
|
| 4 |
include ../../Makefile.defs |
| 5 |
auto_gen= |
| 6 |
NAME=snmpstats.so |
| 7 |
|
| 8 |
ifeq ($(CROSS_COMPILE),) |
| 9 |
BUILDER = $(shell which net-snmp-config) |
| 10 |
endif |
| 11 |
|
| 12 |
ifeq ($(BUILDER),) |
| 13 |
DEFS +=-I$(LOCALBASE)/include |
| 14 |
BUILDAGENTLIBS =-L$(LOCALBASE)/lib -lnetsnmpmibs -lnetsnmpagent \ |
| 15 |
-lnetsnmphelpers -lnetsnmp |
| 16 |
INSTALLMIBDIR = $(share_prefix)/share/snmp/mibs |
| 17 |
else |
| 18 |
BUILDAGENTLIBS = $(shell net-snmp-config --netsnmp-agent-libs) |
| 19 |
INSTALLMIBDIR = $(basedir)$(shell net-snmp-config --prefix)/share/snmp/mibs |
| 20 |
endif |
| 21 |
|
| 22 |
ifeq ($(EMBEDDED_PERL),1) |
| 23 |
# |
| 24 |
# Enable this part if you compile on Centos 5 or another system that has a |
| 25 |
# packaged snmpd with embedded perl and libwrap support |
| 26 |
# |
| 27 |
BUILDAGENTLIBS += -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE \ |
| 28 |
-L/usr/local/lib /usr/lib/perl5/5.8.8/i386-linux-thread-multi/auto/DynaLoader/DynaLoader.a \ |
| 29 |
-L/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE \ |
| 30 |
-lperl -lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc \ |
| 31 |
-lwrap \ |
| 32 |
-lsensors \ |
| 33 |
-lrpmdb -lrpm |
| 34 |
endif |
| 35 |
|
| 36 |
LIBS=$(BUILDAGENTLIBS) |
| 37 |
|
| 38 |
include ../../Makefile.modules |
| 39 |
|
| 40 |
install-cfg: |
| 41 |
echo "installing mibs ..." |
| 42 |
mkdir -p $(INSTALLMIBDIR) |
| 43 |
$(INSTALL_CFG) mibs/KAMAILIO* $(INSTALLMIBDIR) |
| 44 |
|