summaryrefslogtreecommitdiff
path: root/res/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'res/Makefile')
-rw-r--r--res/Makefile8
1 files changed, 8 insertions, 0 deletions
diff --git a/res/Makefile b/res/Makefile
index 2759f4e49..08ee8e14a 100644
--- a/res/Makefile
+++ b/res/Makefile
@@ -32,6 +32,11 @@ ifeq (${OSPLIB},)
MODS:=$(filter-out res_osp.so,$(MODS))
endif
+ifneq ($(wildcard $(CROSS_COMPILE_TARGET)/usr/include/net-snmp/net-snmp-config.h),)
+ SNMP_LDLIBS+=$(shell net-snmp-config --agent-libs)
+ MODS+=res_snmp.so
+endif
+
ifeq (${WITH_SMDI},)
MODS:=$(filter-out res_smdi.so,$(MODS))
endif
@@ -108,6 +113,9 @@ res_features.so: res_features.o
res_config_odbc.so: res_config_odbc.o
$(CC) $(SOLINK) -o $@ ${CYGSOLINK} $< ${CYGSOLIB} ${CYG_RES_CONFIG_ODBC_LIB}
+res_snmp.so: res_snmp.o snmp/agent.o
+ $(CC) $(SOLINK) ${SNMP_LDFLAGS} -o $@ ${CYGSOLINK} res_snmp.o snmp/agent.o ${CYGSOLIB} ${SNMP_LDLIBS}
+
ifneq ($(wildcard .depend),)
include .depend
endif