]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.snmpmod.mk
bhyvectl(8): Normalize the man page date
[FreeBSD/FreeBSD.git] / share / mk / bsd.snmpmod.mk
1 # $FreeBSD$
2
3 INCSDIR=        ${INCLUDEDIR}/bsnmp
4
5 SHLIB_NAME=     snmp_${MOD}.so.${SHLIB_MAJOR}
6 SRCS+=          ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
7 CLEANFILES+=    ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
8 CFLAGS+=        -I.
9 GENSNMPTREEFLAGS+=      -I${SHAREDIR}/snmpdefs
10
11
12 ${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS}
13         cat ${.ALLSRC} | gensnmptree ${GENSNMPTREEFLAGS} -e ${XSYM} > ${.TARGET}
14
15 # Multi-output targets both expect a .meta file and will fight over it. Only
16 # allow it on the .c file instead.
17 ${MOD}_tree.h: ${MOD}_tree.c .NOMETA
18 # Force rebuild the .c file if any of its other outputs are missing.
19 .if !exists(${MOD}_tree.h)
20 ${MOD}_tree.c: .PHONY .META
21 .endif
22 ${MOD}_tree.c: ${MOD}_tree.def ${EXTRAMIBDEFS}
23         cat ${.ALLSRC} | gensnmptree -f ${GENSNMPTREEFLAGS} -p ${MOD}_
24
25 .if defined(DEFS)
26 FILESGROUPS+=   DEFS
27 DEFSDIR?=       ${SHAREDIR}/snmp/defs
28 .endif
29
30 .if defined(BMIBS)
31 FILESGROUPS+=   BMIBS
32 BMIBSDIR?=      ${SHAREDIR}/snmp/mibs
33 .endif
34
35 .if !target(smilint) && !empty(BMIBS)
36 LOCALBASE?=     /usr/local
37
38 SMILINT?=       ${LOCALBASE}/bin/smilint
39
40 SMIPATH?=       ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs
41
42 SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership
43
44 smilint: ${BMIBS}
45         SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC}
46 .endif
47 smilint: .PHONY
48
49 .include <bsd.lib.mk>