aboutsummaryrefslogtreecommitdiff
path: root/src/Makefile.am
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@nxc.no>2018-02-04 10:11:07 +0100
committerSergey Poznyakoff <gray@nxc.no>2018-02-04 12:52:11 +0100
commit7651936f80b1bc6f5b01477ee9e648843097d7b8 (patch)
treeec6232e179767283c557b6c1babf23bcb1bb455a /src/Makefile.am
parent82822c0a336018e33658aebb166819c960e92140 (diff)
downloadvarnish-mib-7651936f80b1bc6f5b01477ee9e648843097d7b8.tar.gz
varnish-mib-7651936f80b1bc6f5b01477ee9e648843097d7b8.tar.bz2
Rewrite hash table support.
* .gitignore: Update. * Makefile.am (EXTRA_DIST): Add perl modules from lib/VarnishMib * lib/VarnishMib/HashTable.pm: New file. * lib/VarnishMib/MIBTable.pm: New file. * src/Makefile.am (varnish_mib_la_SOURCES): Remove statdict. (.mib2c.c): Set PERL5LIB * src/betab.c (backend_dfn.vpt): Remove const qualifier. (backend_register): Store in vpt cloned points. (backend_clear): Destroy points in vpt. * src/statdict.c: Remove. * src/varnish_mib.mib2c: Use VarnishMib::MIBTable. Set mib2c variable $varnish_hash_table to an instance of VarnishMib::MIBTable. Use it to generate lookup table code section. (varnish_var_lookup, varnish_get_oid) (dict_clear, dict_install, dict_load): New functions. (handle_$i): Use direct addressing to obtain a vpt. Fix handling of ASN_TIMETICKS.
Diffstat (limited to 'src/Makefile.am')
-rw-r--r--src/Makefile.am5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 3ef9fa5..55cdb85 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -6,62 +6,63 @@
6# the Free Software Foundation; either version 3, or (at your option) 6# the Free Software Foundation; either version 3, or (at your option)
7# any later version. 7# any later version.
8# 8#
9# varnish-mib is distributed in the hope that it will be useful, 9# varnish-mib is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of 10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12# GNU General Public License for more details. 12# GNU General Public License for more details.
13# 13#
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with varnish-mib. If not, see <http://www.gnu.org/licenses/>. 15# along with varnish-mib. If not, see <http://www.gnu.org/licenses/>.
16 16
17dlmoddir=@DLMODDIR@ 17dlmoddir=@DLMODDIR@
18dlmod_LTLIBRARIES = varnish-mib.la 18dlmod_LTLIBRARIES = varnish-mib.la
19 19
20varnish_mib_la_SOURCES = \ 20varnish_mib_la_SOURCES = \
21 auth.c\ 21 auth.c\
22 ban.c\ 22 ban.c\
23 backend.h\ 23 backend.h\
24 belex.l\ 24 belex.l\
25 betab.c\ 25 betab.c\
26 modconf.h\ 26 modconf.h\
27 modconf.c\ 27 modconf.c\
28 sha256.c\ 28 sha256.c\
29 sha256.h\ 29 sha256.h\
30 statdict.c\
31 varnish_mib.c\ 30 varnish_mib.c\
32 varnish_mib.h\ 31 varnish_mib.h\
33 vcli.c\ 32 vcli.c\
34 vclient.h 33 vclient.h
35 34
36BUILT_SOURCES = \ 35BUILT_SOURCES = \
37 varnish_mib.c\ 36 varnish_mib.c\
38 varnish_mib.h 37 varnish_mib.h
39 38
40varnish_mib.c varnish_mib.h: varnish_mib.mib2c VARNISH-MIB.txt 39varnish_mib.c varnish_mib.h: varnish_mib.mib2c VARNISH-MIB.txt
41 40
42.mib2c.c: 41.mib2c.c:
43 MIBDIRS=${top_srcdir}/src:${NET_SNMP_MIBDIRS} MIBS="VARNISH-MIB:${NET_SNMP_MIBS}" \ 42 MIBDIRS=${top_srcdir}/src:${NET_SNMP_MIBDIRS}\
43 MIBS="VARNISH-MIB:${NET_SNMP_MIBS}" \
44 PERL5LIB=${top_srcdir}/lib \
44 mib2c -c $< -f $@ varnish 45 mib2c -c $< -f $@ varnish
45 46
46#NET_SNMP_INCLUDES = `$(NET_SNMP_CONFIG) --cflags` 47#NET_SNMP_INCLUDES = `$(NET_SNMP_CONFIG) --cflags`
47#NET_SNMP_INCLUDES = 48#NET_SNMP_INCLUDES =
48NET_SNMP_LIBS = `$(NET_SNMP_CONFIG) --libs` 49NET_SNMP_LIBS = `$(NET_SNMP_CONFIG) --libs`
49NET_SNMP_EXLIBS = `$(NET_SNMP_CONFIG) --external-libs` 50NET_SNMP_EXLIBS = `$(NET_SNMP_CONFIG) --external-libs`
50NET_SNMP_MIBDIRS = `net-snmp-config --mibdirs` 51NET_SNMP_MIBDIRS = `net-snmp-config --mibdirs`
51NET_SNMP_MIBS = `net-snmp-config --default-mibs` 52NET_SNMP_MIBS = `net-snmp-config --default-mibs`
52 53
53AM_LDFLAGS = \ 54AM_LDFLAGS = \
54 -module \ 55 -module \
55 -export-dynamic\ 56 -export-dynamic\
56 -avoid-version \ 57 -avoid-version \
57 -rpath '$(dlmoddir)'\ 58 -rpath '$(dlmoddir)'\
58 ${VARNISHAPI_LIBS}\ 59 ${VARNISHAPI_LIBS}\
59 $(NET_SNMP_LIBS)\ 60 $(NET_SNMP_LIBS)\
60 $(NET_SNMP_EXLIBS) 61 $(NET_SNMP_EXLIBS)
61 62
62AM_CPPFLAGS=-I. ${VARNISHAPI_CFLAGS} 63AM_CPPFLAGS=-I. ${VARNISHAPI_CFLAGS}
63 64
64mibdir=@MIBDIR@ 65mibdir=@MIBDIR@
65mib_DATA = VARNISH-MIB.txt 66mib_DATA = VARNISH-MIB.txt
66 67
67dist_man_MANS = varnish-mib.8 68dist_man_MANS = varnish-mib.8

Return to:

Send suggestions and report system problems to the System administrator.