2005-11-10 10:03:22 +00:00
|
|
|
|
|
|
|
INCSDIR= ${INCLUDEDIR}/bsnmp
|
|
|
|
|
|
|
|
SHLIB_NAME= snmp_${MOD}.so.${SHLIB_MAJOR}
|
|
|
|
SRCS+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
|
|
|
|
CLEANFILES+= ${MOD}_oid.h ${MOD}_tree.c ${MOD}_tree.h
|
2005-11-10 12:07:12 +00:00
|
|
|
CFLAGS+= -I.
|
2018-07-03 08:44:40 +00:00
|
|
|
GENSNMPTREEFLAGS+= -I${SHAREDIR}/snmpdefs
|
|
|
|
|
2005-11-10 10:03:22 +00:00
|
|
|
|
2008-01-08 12:55:56 +00:00
|
|
|
${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS} ${EXTRAMIBSYMS}
|
2018-07-03 08:44:40 +00:00
|
|
|
cat ${.ALLSRC} | gensnmptree ${GENSNMPTREEFLAGS} -e ${XSYM} > ${.TARGET}
|
2005-11-10 10:03:22 +00:00
|
|
|
|
2019-07-19 00:15:25 +00:00
|
|
|
# Multi-output targets both expect a .meta file and will fight over it. Only
|
|
|
|
# allow it on the .c file instead.
|
|
|
|
${MOD}_tree.h: ${MOD}_tree.c .NOMETA
|
|
|
|
# Force rebuild the .c file if any of its other outputs are missing.
|
|
|
|
.if !exists(${MOD}_tree.h)
|
|
|
|
${MOD}_tree.c: .PHONY .META
|
|
|
|
.endif
|
|
|
|
${MOD}_tree.c: ${MOD}_tree.def ${EXTRAMIBDEFS}
|
2018-07-03 08:44:40 +00:00
|
|
|
cat ${.ALLSRC} | gensnmptree -f ${GENSNMPTREEFLAGS} -p ${MOD}_
|
2005-11-10 10:03:22 +00:00
|
|
|
|
|
|
|
.if defined(DEFS)
|
|
|
|
FILESGROUPS+= DEFS
|
2015-12-14 22:42:05 +00:00
|
|
|
DEFSDIR?= ${SHAREDIR}/snmp/defs
|
2005-11-10 12:07:12 +00:00
|
|
|
.endif
|
2005-11-10 10:03:22 +00:00
|
|
|
|
|
|
|
.if defined(BMIBS)
|
|
|
|
FILESGROUPS+= BMIBS
|
2015-12-14 22:42:05 +00:00
|
|
|
BMIBSDIR?= ${SHAREDIR}/snmp/mibs
|
2005-11-10 12:07:12 +00:00
|
|
|
.endif
|
2005-11-10 10:03:22 +00:00
|
|
|
|
2021-06-19 15:50:03 +00:00
|
|
|
DEFSPACKAGE= bsnmp
|
|
|
|
BMIBSPACKAGE= bsnmp
|
|
|
|
|
2017-01-17 03:38:49 +00:00
|
|
|
.if !target(smilint) && !empty(BMIBS)
|
|
|
|
LOCALBASE?= /usr/local
|
|
|
|
|
|
|
|
SMILINT?= ${LOCALBASE}/bin/smilint
|
|
|
|
|
|
|
|
SMIPATH?= ${BMIBSDIR}:${LOCALBASE}/share/snmp/mibs
|
|
|
|
|
|
|
|
SMILINT_FLAGS?= -c /dev/null -l6 -i group-membership
|
|
|
|
|
|
|
|
smilint: ${BMIBS}
|
|
|
|
SMIPATH=${SMIPATH} ${SMILINT} ${SMILINT_FLAGS} ${.ALLSRC}
|
|
|
|
.endif
|
|
|
|
smilint: .PHONY
|
|
|
|
|
2005-11-10 10:03:22 +00:00
|
|
|
.include <bsd.lib.mk>
|