xref: /freebsd/share/man/man7/bsd.snmpmod.mk.7 (revision 7bd6fde3)
1.\"
2.\" Copyright (c) 2005
3.\"	Hartmut Brandt.
4.\" 	All rights reserved.
5.\"
6.\" Author: Hartmut Brandt <harti@FreeBSD.org>
7.\"
8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright
12.\"    notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\"    notice, this list of conditions and the following disclaimer in the
15.\"    documentation and/or other materials provided with the distribution.
16.\"
17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27.\" SUCH DAMAGE.
28.\"
29.\" $FreeBSD$
30.\"
31.Dd November 10, 2005
32.Dt BSD.SNMPMOD.MK 7
33.Os
34.Sh NAME
35.Nm bsd.snmpmod.mk
36.Nd building modules for
37.Xr bsnmpd 1
38.Sh SYNOPSIS
39.Fd ".include <bsd.snmpmod.mk>"
40.Sh DESCRIPTION
41The file
42.In bsd.snmpmod.mk
43simplifies the building of modules for the Begemot SNMP daemon,
44.Xr bsnmpd 1 .
45It provides some common functions for building a module and
46relies on
47.In bsd.lib.mk ,
48which is included by
49.In bsd.snmpmod.mk
50to actually build the shared library.
51.Pp
52The following
53.Xr make 1
54variables control the special functions:
55.Bl -tag -width ".Va EXTRAMIBDEFS"
56.It Va MOD
57The short name of the module.
58The name of the shared library will be
59.Pa snmp_${MOD}.so .
60There must exist a file
61.Pa ${MOD}_tree.def
62for compilation with
63.Xr gensnmptree 1
64which contains the definition of the MIB tree implemented by the module.
65.It Va EXTRAMIBDEFS
66A list of extra MIB definition files for
67.Xr gensnmptree 1 .
68This is optional.
69.It Va XSYM
70A list of symbols to be extracted from the MIB definition files by
71.Xr gensnmptree 1 .
72This is optional.
73.It Va DEFS
74A list of MIB definition files to be installed.
75This is optional.
76.It Va BMIBS
77A list of textual MIBs to be installed.
78This is optional.
79.El
80.Pp
81Three files are automatically created from the MIB definition files and
82the
83.Va XSYM
84variable:
85.Bl -tag -width ".Va EXTRAMIBDEFS"
86.It Pa ${MOD}_tree.c
87This contains a table with the tree implemented by the module.
88It is automatically included into the
89.Va SRCS
90variable.
91.It Pa ${MOD}_tree.h
92This contains preprocessor defines for all the OIDs defined by the module
93and can be included in the module's source code.
94.It Pa ${MOD}_oid.h
95OID preprocessor definitions for all the symbols listed in
96.Va XSYMS .
97This is to be included into the module's source code.
98.El
99.Sh SEE ALSO
100.Xr bsnmpd 1 ,
101.Xr gensnmptree 1 ,
102.Xr snmpmod 3
103