3c2659d809
use in-tree as well as for 3rd party modules. This file is more or less what was in usr.sbin/bsnmpd/modules/Makefile.inc with some modifications and omissions. Usage examples can be found under usr.sbin/bsnmpd/modules/*. Idea by: phk
30 lines
652 B
Makefile
30 lines
652 B
Makefile
# $FreeBSD$
|
|
|
|
.include <bsd.init.mk>
|
|
|
|
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
|
|
CFLAGS+= -I${.OBJDIR}
|
|
|
|
${MOD}_oid.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
|
|
cat ${.ALLSRC} | gensnmptree -e ${XSYM} > ${.TARGET}
|
|
|
|
.ORDER: ${MOD}_tree.c ${MOD}_tree.h
|
|
${MOD}_tree.c ${MOD}_tree.h: ${MOD}_tree.def ${EXTRAMIBDEFS}
|
|
cat ${.ALLSRC} | gensnmptree -p ${MOD}_
|
|
|
|
.if defined(DEFS)
|
|
FILESGROUPS+= DEFS
|
|
.endif
|
|
DEFSDIR= ${SHAREDIR}/snmp/defs
|
|
|
|
.if defined(BMIBS)
|
|
FILESGROUPS+= BMIBS
|
|
.endif
|
|
BMIBSDIR= ${SHAREDIR}/snmp/mibs
|
|
|
|
.include <bsd.lib.mk>
|