3 # Author: Harti Brandt <harti@freebsd.org>
7 CONTRIB=${.CURDIR}/../../../contrib/bsnmp
8 .PATH: ${CONTRIB}/snmpd
11 SRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c
12 SRCS+= oid.h tree.c tree.h
13 XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
14 sysUpTime snmpTrapOID coldStart authenticationFailure \
15 begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \
16 freeBSD freeBSDVersion
17 CLEANFILES= oid.h tree.c tree.h
18 MAN= bsnmpd.1 snmpmod.3
21 FILESGROUPS= BMIBS DEFS
23 BMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt
24 BMIBSDIR= ${SHAREDIR}/snmp/mibs
26 DEFSDIR= ${SHAREDIR}/snmp/defs
28 CFLAGS+= -DSNMPTREE_TYPES
29 CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
30 CFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
31 CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
32 DPADD= ${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP}
33 LDADD= -lbegemot -lbsnmp -lwrap
35 LDFLAGS= -Wl,-export-dynamic
37 .if ${MK_OPENSSL} != "no"
38 CFLAGS+= -DHAVE_LIBCRYPTO
41 oid.h: tree.def Makefile
42 gensnmptree -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET}
45 tree.c tree.h: tree.def
46 gensnmptree -l < ${.ALLSRC}
48 MANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \
49 -e 's%@DEFPATH@%${DEFSDIR}/%g' \
50 -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
52 .include <bsd.prog.mk>