xref: /freebsd/usr.sbin/bsnmpd/bsnmpd/Makefile (revision 8bacf1a614254e6c25a16222cd6601e544f862a9)
191a2f929SHartmut Brandt# $FreeBSD$
291a2f929SHartmut Brandt#
391a2f929SHartmut Brandt# Author: Harti Brandt <harti@freebsd.org>
491a2f929SHartmut Brandt
5723d6e64SHartmut BrandtCONTRIB=${.CURDIR}/../../../contrib/bsnmp
6723d6e64SHartmut Brandt.PATH: ${CONTRIB}/snmpd
791a2f929SHartmut Brandt
891a2f929SHartmut BrandtPROG=	bsnmpd
9b6a6dd18SHartmut BrandtSRCS=	main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c
10b6a6dd18SHartmut BrandtSRCS+=	oid.h tree.c tree.h
11b6a6dd18SHartmut BrandtXSYM=	snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
12b6a6dd18SHartmut Brandt	sysUpTime snmpTrapOID coldStart authenticationFailure \
13b6a6dd18SHartmut Brandt	begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable
14b6a6dd18SHartmut BrandtCLEANFILES= oid.h tree.c tree.h
1591a2f929SHartmut BrandtMAN=	bsnmpd.1 snmpmod.3
16b6a6dd18SHartmut BrandtWARNS?=	6
17a35d8893SRuslan ErmilovNO_WERROR=
1891a2f929SHartmut Brandt
1992ba581cSHartmut BrandtFILESGROUPS= BMIBS DEFS
2091a2f929SHartmut Brandt
2192ba581cSHartmut BrandtBMIBS=	FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt
22a0f13910SHartmut BrandtBMIBSDIR= ${SHAREDIR}/snmp/mibs
2391a2f929SHartmut BrandtDEFS=	tree.def
24a0f13910SHartmut BrandtDEFSDIR= ${SHAREDIR}/snmp/defs
2591a2f929SHartmut Brandt
265f892a7fSTom RhodesCFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
278bacf1a6SHartmut BrandtCFLAGS+= -DUSE_TCPWRAPPERS
285f892a7fSTom RhodesDPADD=	${LIBBEGEMOT} ${LIBBSNMP}
298bacf1a6SHartmut BrandtLDADD=	-lbegemot -lbsnmp -lwrap
3091a2f929SHartmut Brandt
31b6a6dd18SHartmut BrandtLDFLAGS= -export-dynamic
32b6a6dd18SHartmut Brandt
33b6a6dd18SHartmut Brandtoid.h: tree.def
34b6a6dd18SHartmut Brandt	gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
35b6a6dd18SHartmut Brandt
36b6a6dd18SHartmut Brandt.ORDER: tree.c tree.h
37b6a6dd18SHartmut Brandttree.c tree.h: tree.def
38b6a6dd18SHartmut Brandt	gensnmptree -l < ${.ALLSRC}
3991a2f929SHartmut Brandt
4016b2454cSHartmut BrandtMANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
4116b2454cSHartmut Brandt		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\
4216b2454cSHartmut Brandt		    -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
4316b2454cSHartmut Brandt
4491a2f929SHartmut Brandt.include <bsd.prog.mk>
45