1152265Sharti# $FreeBSD: stable/10/share/mk/bsd.snmpmod.mk 313223 2017-02-04 16:40:28Z ngie $
2152265Sharti
3152265ShartiINCSDIR=	${INCLUDEDIR}/bsnmp
4152265Sharti
5152265ShartiSHLIB_NAME=	snmp_${MOD}.so.${SHLIB_MAJOR}
6152265ShartiSRCS+=		${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
7152265ShartiCLEANFILES+=	${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
8152277ShartiCFLAGS+=	-I.
9152265Sharti
10175156Sharti${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS}
11152265Sharti	cat ${.ALLSRC} | gensnmptree -e ${XSYM} > ${.TARGET}
12152265Sharti
13152265Sharti.ORDER: ${MOD}_tree.c ${MOD}_tree.h
14152265Sharti${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
15152265Sharti	cat ${.ALLSRC} | gensnmptree -p ${MOD}_
16152265Sharti
17152265Sharti.if defined(DEFS)
18152265ShartiFILESGROUPS+=	DEFS
19152277ShartiDEFSDIR=	${SHAREDIR}/snmp/defs
20152265Sharti.endif
21152265Sharti
22152265Sharti.if defined(BMIBS)
23152265ShartiFILESGROUPS+=	BMIBS
24152277ShartiBMIBSDIR=	${SHAREDIR}/snmp/mibs
25152265Sharti.endif
26152265Sharti
27313223Sngie.if !target(smilint) && !empty(BMIBS)
28313223SngieLOCALBASE?=	/usr/local
29313223Sngie
30313223SngieSMILINT?=	${LOCALBASE}/bin/smilint
31313223Sngie
32313223SngieSMIPATH?=	${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs
33313223Sngie
34313223SngieSMILINT_FLAGS?=	-c /dev/null -l6 -i group-membership
35313223Sngie
36313223Sngiesmilint: ${BMIBS}
37313223Sngie	SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC}
38313223Sngie.endif
39313223Sngiesmilint: .PHONY
40313223Sngie
41152265Sharti.include <bsd.lib.mk>
42