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