From b89b4d4d9a3ba7a57248342408e1978ba4ea6ae8 Mon Sep 17 00:00:00 2001 From: Hartmut Brandt Date: Thu, 10 Nov 2005 10:14:57 +0000 Subject: [PATCH] Use the new bsd.snmpmod.mk makefile to build the modules. The -I pointers into the contrib directory are still necessary for some of the Makefiles, because the C-sources there use non-canonical includes ("" includes) to get at the header files. --- usr.sbin/bsnmpd/modules/Makefile.inc | 25 ------------------- usr.sbin/bsnmpd/modules/snmp_atm/Makefile | 9 +++---- usr.sbin/bsnmpd/modules/snmp_mibII/Makefile | 6 +++-- .../bsnmpd/modules/snmp_netgraph/Makefile | 4 +-- usr.sbin/bsnmpd/modules/snmp_pf/Makefile | 4 +-- 5 files changed, 10 insertions(+), 38 deletions(-) diff --git a/usr.sbin/bsnmpd/modules/Makefile.inc b/usr.sbin/bsnmpd/modules/Makefile.inc index 2ae56153b134..d478b6ba9ad4 100644 --- a/usr.sbin/bsnmpd/modules/Makefile.inc +++ b/usr.sbin/bsnmpd/modules/Makefile.inc @@ -2,31 +2,6 @@ SHLIB_MAJOR= 4 WARNS?= 6 -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${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -CFLAGS+= -DQUADFMT='"llu"' -DQUADXFMT='"llx"' -DHAVE_STDINT_H -CFLAGS+= -DHAVE_INTTYPES_H - -${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 -l -p ${MOD}_ - -.if defined(DEFS) -FILESGROUPS+= DEFS -.endif -DEFSDIR= ${SHAREDIR}/snmp/defs - -.if defined(BMIBS) -FILESGROUPS+= BMIBS -.endif -BMIBSDIR= ${SHAREDIR}/snmp/mibs MANFILTER= sed -e 's%@MODPATH@%${LIBDIR}/%g' \ -e 's%@DEFPATH@%${DEFSDIR}/%g' \ diff --git a/usr.sbin/bsnmpd/modules/snmp_atm/Makefile b/usr.sbin/bsnmpd/modules/snmp_atm/Makefile index b3725ee81d52..4bba7cb5d217 100644 --- a/usr.sbin/bsnmpd/modules/snmp_atm/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_atm/Makefile @@ -2,9 +2,8 @@ # # Author: Harti Brandt -CONTRIB=${.CURDIR}/../../../../contrib/bsnmp -SNMP_ATM=${.CURDIR}/../../../../contrib/ngatm/snmp_atm -.PATH: ${SNMP_ATM} +CONTRIB= ${.CURDIR}/../../../../contrib/ngatm +.PATH: ${CONTRIB}/snmp_atm MOD= atm SRCS= snmp_atm.c atm_sys.c @@ -17,6 +16,6 @@ INCS= snmp_${MOD}.h EXTRAMIBDEFS= atm_freebsd.def -CFLAGS+= -I${SNMP_ATM} +CFLAGS+= -I${CONTRIB}/snmp_atm -.include +.include diff --git a/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile b/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile index c677c533ef35..a78eebf75e26 100644 --- a/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_mibII/Makefile @@ -2,7 +2,7 @@ # # Author: Harti Brandt -CONTRIB=${.CURDIR}/../../../../contrib/bsnmp +CONTRIB= ${.CURDIR}/../../../../contrib/bsnmp .PATH: ${CONTRIB}/snmp_mibII MOD= mibII @@ -13,7 +13,9 @@ XSYM= ipAddrTable ifTable ifRcvAddressEntry ifMIB ipMIB tcpMIB udpMIB \ ipForward ifIndex linkDown linkUp MAN= snmp_mibII.3 +CFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd + DEFS= ${MOD}_tree.def INCS= snmp_${MOD}.h -.include +.include diff --git a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile index d0323154be59..7caf7e40bbee 100644 --- a/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_netgraph/Makefile @@ -2,8 +2,6 @@ # # Author: Harti Brandt -CONTRIB=${.CURDIR}/../../../../contrib/bsnmp - MOD= netgraph SRCS= snmp_netgraph.c XSYM= begemotNg @@ -16,4 +14,4 @@ INCS= snmp_${MOD}.h DPADD= ${LIBNETGRAPH} LDADD= -lnetgraph -.include +.include diff --git a/usr.sbin/bsnmpd/modules/snmp_pf/Makefile b/usr.sbin/bsnmpd/modules/snmp_pf/Makefile index 18860668f7d9..74724644cf49 100644 --- a/usr.sbin/bsnmpd/modules/snmp_pf/Makefile +++ b/usr.sbin/bsnmpd/modules/snmp_pf/Makefile @@ -2,8 +2,6 @@ # # Author: Philip Paeps -CONTRIB=${.CURDIR}/../../../../contrib/bsnmp - MOD= pf SRCS= pf_snmp.c WARNS?= 6 @@ -12,4 +10,4 @@ XSYM= begemotPf DEFS= ${MOD}_tree.def BMIBS= BEGEMOT-PF-MIB.txt -.include +.include