xref: /freebsd/usr.sbin/bsnmpd/bsnmpd/Makefile (revision 99eebd2a7c2076889185f78fc07dac3c8ab93ab3)
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 \
1399eebd2aSGleb Smirnoff	begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \
1499eebd2aSGleb Smirnoff	freeBSDVersion
15b6a6dd18SHartmut BrandtCLEANFILES= oid.h tree.c tree.h
1691a2f929SHartmut BrandtMAN=	bsnmpd.1 snmpmod.3
17b6a6dd18SHartmut BrandtWARNS?=	6
18a35d8893SRuslan ErmilovNO_WERROR=
1991a2f929SHartmut Brandt
2092ba581cSHartmut BrandtFILESGROUPS= BMIBS DEFS
2191a2f929SHartmut Brandt
2292ba581cSHartmut BrandtBMIBS=	FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt
23a0f13910SHartmut BrandtBMIBSDIR= ${SHAREDIR}/snmp/mibs
2491a2f929SHartmut BrandtDEFS=	tree.def
25a0f13910SHartmut BrandtDEFSDIR= ${SHAREDIR}/snmp/defs
2691a2f929SHartmut Brandt
275f892a7fSTom RhodesCFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
283f9b405cSHartmut BrandtCFLAGS+= -DUSE_TCPWRAPPERS -DQUADFMT='"llu"' -DQUADXFMT='"llx"'
297a775b30SHartmut BrandtCFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
30e4a92744SRuslan ErmilovDPADD=	${LIBBEGEMOT} ${LIBBSNMP} ${LIBWRAP}
318bacf1a6SHartmut BrandtLDADD=	-lbegemot -lbsnmp -lwrap
3291a2f929SHartmut Brandt
33b6a6dd18SHartmut BrandtLDFLAGS= -export-dynamic
34b6a6dd18SHartmut Brandt
35b6a6dd18SHartmut Brandtoid.h: tree.def
36b6a6dd18SHartmut Brandt	gensnmptree -e ${XSYM} < ${.ALLSRC} > ${.TARGET}
37b6a6dd18SHartmut Brandt
38b6a6dd18SHartmut Brandt.ORDER: tree.c tree.h
39b6a6dd18SHartmut Brandttree.c tree.h: tree.def
40b6a6dd18SHartmut Brandt	gensnmptree -l < ${.ALLSRC}
4191a2f929SHartmut Brandt
4216b2454cSHartmut BrandtMANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
4316b2454cSHartmut Brandt		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\
4416b2454cSHartmut Brandt		    -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
4516b2454cSHartmut Brandt
4691a2f929SHartmut Brandt.include <bsd.prog.mk>
47