xref: /freebsd/usr.sbin/bsnmpd/bsnmpd/Makefile (revision 5f892a7ff047ecd5b74ecacfe36c736d951562f8)
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
1716fc3635SMark MurrayNO_WERROR=yes
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
275f892a7fSTom RhodesDPADD=	${LIBBEGEMOT} ${LIBBSNMP}
285f892a7fSTom RhodesLDADD=	-lbegemot -lbsnmp
2991a2f929SHartmut Brandt
30b6a6dd18SHartmut BrandtLDFLAGS= -export-dynamic
31b6a6dd18SHartmut Brandt
32b6a6dd18SHartmut Brandtoid.h: tree.def
33b6a6dd18SHartmut Brandt	gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
34b6a6dd18SHartmut Brandt
35b6a6dd18SHartmut Brandt.ORDER: tree.c tree.h
36b6a6dd18SHartmut Brandttree.c tree.h: tree.def
37b6a6dd18SHartmut Brandt	gensnmptree -l < ${.ALLSRC}
3891a2f929SHartmut Brandt
3916b2454cSHartmut BrandtMANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
4016b2454cSHartmut Brandt		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\
4116b2454cSHartmut Brandt		    -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
4216b2454cSHartmut Brandt
4391a2f929SHartmut Brandt.include <bsd.prog.mk>
44