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 19 20FILESGROUPS= BMIBS DEFS 21 22BMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt 23BMIBSDIR= ${SHAREDIR}/snmp/mibs 24DEFS= tree.def 25DEFSDIR= ${SHAREDIR}/snmp/defs 26 27CFLAGS+= -DSNMPTREE_TYPES 28CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT 29CFLAGS+= -DUSE_TCPWRAPPERS 30CFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY 31LIBADD= begemot bsnmp wrap 32 33LDFLAGS= -Wl,-export-dynamic 34 35.if ${MK_OPENSSL} != "no" 36CFLAGS+= -DHAVE_LIBCRYPTO 37.endif 38 39oid.h: tree.def Makefile 40 gensnmptree -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET} 41 42.ORDER: tree.c tree.h 43tree.h: .NOMETA 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 51NO_WCAST_ALIGN= yes 52WARNS?= 6 53 54.include <bsd.prog.mk> 55