1# $FreeBSD$ 2 3INCSDIR= ${INCLUDEDIR}/bsnmp 4 5SHLIB_NAME= snmp_${MOD}.so.${SHLIB_MAJOR} 6SRCS+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h 7CLEANFILES+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h 8CFLAGS+= -I. 9GENSNMPTREEFLAGS+= -I${SHAREDIR}/snmpdefs 10 11 12${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS} 13 cat ${.ALLSRC} | gensnmptree ${GENSNMPTREEFLAGS} -e ${XSYM} > ${.TARGET} 14 15.ORDER: ${MOD}_tree.c ${MOD}_tree.h 16${MOD}_tree.h: .NOMETA 17${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS} 18 cat ${.ALLSRC} | gensnmptree -f ${GENSNMPTREEFLAGS} -p ${MOD}_ 19 20.if defined(DEFS) 21FILESGROUPS+= DEFS 22DEFSDIR?= ${SHAREDIR}/snmp/defs 23.endif 24 25.if defined(BMIBS) 26FILESGROUPS+= BMIBS 27BMIBSDIR?= ${SHAREDIR}/snmp/mibs 28.endif 29 30.if !target(smilint) && !empty(BMIBS) 31LOCALBASE?= /usr/local 32 33SMILINT?= ${LOCALBASE}/bin/smilint 34 35SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs 36 37SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership 38 39smilint: ${BMIBS} 40 SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC} 41.endif 42smilint: .PHONY 43 44.include <bsd.lib.mk> 45