build: fix CFLAGS for snmp modules

The SNMP modules include <net-snmp/net-snmp-config.h>, which won't be
found in off-searchpath directories without SNMP_CFLAGS.  Unfortunately
in my tests the files were on the search path even without the flags.

(SNMP_LIBS is not needed because only libfrrsnmp calls into net-snmp
functions.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-04-04 21:25:19 +02:00
parent 422f8d0ca9
commit a263892613
5 changed files with 5 additions and 0 deletions

View File

@ -107,6 +107,7 @@ module_LTLIBRARIES += bgpd_snmp.la
endif
bgpd_snmp_la_SOURCES = bgp_snmp.c
bgpd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
bgpd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
bgpd_snmp_la_LIBADD = ../lib/libfrrsnmp.la

View File

@ -35,6 +35,7 @@ if SNMP
module_LTLIBRARIES += ospf6d_snmp.la
endif
ospf6d_snmp_la_SOURCES = ospf6_snmp.c
ospf6d_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
ospf6d_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
ospf6d_snmp_la_LIBADD = ../lib/libfrrsnmp.la

View File

@ -38,6 +38,7 @@ if SNMP
module_LTLIBRARIES += ospfd_snmp.la
endif
ospfd_snmp_la_SOURCES = ospf_snmp.c
ospfd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
ospfd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
ospfd_snmp_la_LIBADD = ../lib/libfrrsnmp.la

View File

@ -28,6 +28,7 @@ if SNMP
module_LTLIBRARIES += ripd_snmp.la
endif
ripd_snmp_la_SOURCES = rip_snmp.c
ripd_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
ripd_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
ripd_snmp_la_LIBADD = ../lib/libfrrsnmp.la

View File

@ -61,6 +61,7 @@ if SNMP
module_LTLIBRARIES += zebra_snmp.la
endif
zebra_snmp_la_SOURCES = zebra_snmp.c
zebra_snmp_la_CFLAGS = $(WERROR) $(SNMP_CFLAGS)
zebra_snmp_la_LDFLAGS = -avoid-version -module -shared -export-dynamic
zebra_snmp_la_LIBADD = ../lib/libfrrsnmp.la