191a2f929SHartmut Brandt# $FreeBSD$ 291a2f929SHartmut Brandt# 391a2f929SHartmut Brandt# Author: Harti Brandt <harti@freebsd.org> 491a2f929SHartmut Brandt 5*c6063d0dSWarner Losh.include <src.opts.mk> 6135f7de5SShteryana Shopova 7723d6e64SHartmut BrandtCONTRIB=${.CURDIR}/../../../contrib/bsnmp 8723d6e64SHartmut Brandt.PATH: ${CONTRIB}/snmpd 991a2f929SHartmut Brandt 1091a2f929SHartmut BrandtPROG= bsnmpd 11b6a6dd18SHartmut BrandtSRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c 12b6a6dd18SHartmut BrandtSRCS+= oid.h tree.c tree.h 13b6a6dd18SHartmut BrandtXSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \ 14b6a6dd18SHartmut Brandt sysUpTime snmpTrapOID coldStart authenticationFailure \ 1599eebd2aSGleb Smirnoff begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \ 16135f7de5SShteryana Shopova freeBSD freeBSDVersion 17b6a6dd18SHartmut BrandtCLEANFILES= oid.h tree.c tree.h 1891a2f929SHartmut BrandtMAN= bsnmpd.1 snmpmod.3 19a35d8893SRuslan ErmilovNO_WERROR= 2091a2f929SHartmut Brandt 2192ba581cSHartmut BrandtFILESGROUPS= BMIBS DEFS 2291a2f929SHartmut Brandt 2392ba581cSHartmut BrandtBMIBS= FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt 24a0f13910SHartmut BrandtBMIBSDIR= ${SHAREDIR}/snmp/mibs 2591a2f929SHartmut BrandtDEFS= tree.def 26a0f13910SHartmut BrandtDEFSDIR= ${SHAREDIR}/snmp/defs 2791a2f929SHartmut Brandt 2872cd7a52SShteryana ShopovaCFLAGS+= -DSNMPTREE_TYPES 295f892a7fSTom RhodesCFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT 303f9b405cSHartmut BrandtCFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"' 317a775b30SHartmut BrandtCFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY 32e4a92744SRuslan ErmilovDPADD= ${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP} 338bacf1a6SHartmut BrandtLDADD= -lbegemot -lbsnmp -lwrap 3491a2f929SHartmut Brandt 351c706be0SShteryana ShopovaLDFLAGS= -Wl,-export-dynamic 36b6a6dd18SHartmut Brandt 37135f7de5SShteryana Shopova.if ${MK_OPENSSL} != "no" 38135f7de5SShteryana ShopovaCFLAGS+= -DHAVE_LIBCRYPTO 39135f7de5SShteryana Shopova.endif 40135f7de5SShteryana Shopova 411e1c4c13SHartmut Brandtoid.h: tree.def Makefile 421e1c4c13SHartmut Brandt gensnmptree -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET} 43b6a6dd18SHartmut Brandt 44b6a6dd18SHartmut Brandt.ORDER: tree.c tree.h 45b6a6dd18SHartmut Brandttree.c tree.h: tree.def 46b6a6dd18SHartmut Brandt gensnmptree -l < ${.ALLSRC} 4791a2f929SHartmut Brandt 4816b2454cSHartmut BrandtMANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \ 4916b2454cSHartmut Brandt -e 's%@DEFPATH@%${DEFSDIR}/%g' \ 5016b2454cSHartmut Brandt -e 's%@MIBSPATH@%${BMIBSDIR}/%g' 5116b2454cSHartmut Brandt 5291a2f929SHartmut Brandt.include <bsd.prog.mk> 53