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