xref: /freebsd/usr.sbin/bsnmpd/bsnmpd/Makefile (revision d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf)
191a2f929SHartmut Brandt#
291a2f929SHartmut Brandt# Author: Harti Brandt <harti@freebsd.org>
391a2f929SHartmut Brandt
4c6063d0dSWarner Losh.include <src.opts.mk>
5135f7de5SShteryana Shopova
664a0982bSEnji CooperCONTRIB=${SRCTOP}/contrib/bsnmp
7723d6e64SHartmut Brandt.PATH: ${CONTRIB}/snmpd
891a2f929SHartmut Brandt
9c2d948faSBrad DavisCONFS=	snmpd.config
10c2d948faSBrad DavisCONFSMODE=	600
1191a2f929SHartmut BrandtPROG=	bsnmpd
12b6a6dd18SHartmut BrandtSRCS=	main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c
1304d17814SAndrey V. ElsukovSRCS+=	trans_inet.c oid.h tree.c tree.h
14b6a6dd18SHartmut BrandtXSYM=	snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \
15b6a6dd18SHartmut Brandt	sysUpTime snmpTrapOID coldStart authenticationFailure \
1699eebd2aSGleb Smirnoff	begemotSnmpdTransUdp begemotSnmpdTransLsock begemotSnmpdLocalPortTable \
1704d17814SAndrey V. Elsukov	freeBSD freeBSDVersion begemotSnmpdTransInet
18b6a6dd18SHartmut BrandtCLEANFILES= oid.h tree.c tree.h
19f66b889dSEnji Cooper
2091a2f929SHartmut BrandtMAN=	bsnmpd.1 snmpmod.3
2191a2f929SHartmut Brandt
22f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_INT.3
23f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_INT_LINK.3
24f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_INT_LINK_INDEX.3
25f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_OID.3
26f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_OID_LINK.3
27f66b889dSEnji CooperMLINKS+=	snmpmod.3 FIND_OBJECT_OID_LINK_INDEX.3
28f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_INT.3
29f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_INT_LINK.3
30f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_INT_LINK_INDEX.3
31f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_OID.3
32f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_OID_LINK.3
33f66b889dSEnji CooperMLINKS+=	snmpmod.3 INSERT_OBJECT_OID_LINK_INDEX.3
34f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_INT.3
35f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_INT_LINK.3
36f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_INT_LINK_INDEX.3
37f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_OID.3
38f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_OID_LINK.3
39f66b889dSEnji CooperMLINKS+=	snmpmod.3 NEXT_OBJECT_OID_LINK_INDEX.3
40f66b889dSEnji CooperMLINKS+=	snmpmod.3 bsnmpd_get_target_stats.3
41f66b889dSEnji CooperMLINKS+=	snmpmod.3 bsnmpd_get_usm_stats.3
42f66b889dSEnji CooperMLINKS+=	snmpmod.3 bsnmpd_reset_usm_stats.3
43f66b889dSEnji CooperMLINKS+=	snmpmod.3 buf_alloc.3
44f66b889dSEnji CooperMLINKS+=	snmpmod.3 buf_size.3
45f66b889dSEnji CooperMLINKS+=	snmpmod.3 comm_define.3
46f66b889dSEnji CooperMLINKS+=	snmpmod.3 community.3
47f66b889dSEnji CooperMLINKS+=	snmpmod.3 fd_deselect.3
48f66b889dSEnji CooperMLINKS+=	snmpmod.3 fd_resume.3
49f66b889dSEnji CooperMLINKS+=	snmpmod.3 fd_select.3
50f66b889dSEnji CooperMLINKS+=	snmpmod.3 fd_suspend.3
51f66b889dSEnji CooperMLINKS+=	snmpmod.3 get_ticks.3
52f66b889dSEnji CooperMLINKS+=	snmpmod.3 index_append.3
53f66b889dSEnji CooperMLINKS+=	snmpmod.3 index_append_off.3
54f66b889dSEnji CooperMLINKS+=	snmpmod.3 index_compare.3
55f66b889dSEnji CooperMLINKS+=	snmpmod.3 index_compare_off.3
56f66b889dSEnji CooperMLINKS+=	snmpmod.3 index_decode.3
57f66b889dSEnji CooperMLINKS+=	snmpmod.3 ip_commit.3
58f66b889dSEnji CooperMLINKS+=	snmpmod.3 ip_get.3
59f66b889dSEnji CooperMLINKS+=	snmpmod.3 ip_rollback.3
60f66b889dSEnji CooperMLINKS+=	snmpmod.3 ip_save.3
61f66b889dSEnji CooperMLINKS+=	snmpmod.3 or_register.3
62f66b889dSEnji CooperMLINKS+=	snmpmod.3 or_unregister.3
63f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_commit.3
64f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_get.3
65f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_rollback.3
66f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_save.3
67f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_usmNotInTimeWindows.3
68f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_usmUnknownEngineIDs.3
69f66b889dSEnji CooperMLINKS+=	snmpmod.3 oid_zeroDotZero.3
70f66b889dSEnji CooperMLINKS+=	snmpmod.3 reqid_allocate.3
71f66b889dSEnji CooperMLINKS+=	snmpmod.3 reqid_base.3
72f66b889dSEnji CooperMLINKS+=	snmpmod.3 reqid_istype.3
73f66b889dSEnji CooperMLINKS+=	snmpmod.3 reqid_next.3
74f66b889dSEnji CooperMLINKS+=	snmpmod.3 reqid_type.3
75f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_input_finish.3
76f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_input_start.3
77f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_output.3
78f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_pdu_auth_access.3
79f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_send_port.3
80f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmp_send_trap.3
81f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmpd_target_stat.3
82f66b889dSEnji CooperMLINKS+=	snmpmod.3 snmpd_usmstats.3
83f66b889dSEnji CooperMLINKS+=	snmpmod.3 start_tick.3
84f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_commit.3
85f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_free.3
86f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_get.3
87f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_get_max.3
88f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_rollback.3
89f66b889dSEnji CooperMLINKS+=	snmpmod.3 string_save.3
90f66b889dSEnji CooperMLINKS+=	snmpmod.3 systemg.3
91f66b889dSEnji CooperMLINKS+=	snmpmod.3 this_tick.3
92f66b889dSEnji CooperMLINKS+=	snmpmod.3 timer_start.3
93f66b889dSEnji CooperMLINKS+=	snmpmod.3 timer_start_repeat.3
94f66b889dSEnji CooperMLINKS+=	snmpmod.3 timer_stop.3
95f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_activate_address.3
96f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_address.3
97f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_delete_address.3
98f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_delete_notify.3
99f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_delete_param.3
100f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_first_address.3
101f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_first_notify.3
102f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_first_param.3
103f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_flush_all.3
104f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_next_address.3
105f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_next_notify.3
106f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_next_param.3
107f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_new_address.3
108f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_new_notify.3
109f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_new_param.3
110f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_notify.3
111f66b889dSEnji CooperMLINKS+=	snmpmod.3 target_param.3
112f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_delete_user.3
113f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_find_user.3
114f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_first_user.3
115f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_flush_users.3
116f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_next_user.3
117f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_new_user.3
118f66b889dSEnji CooperMLINKS+=	snmpmod.3 usm_user.3
119f66b889dSEnji Cooper
12092ba581cSHartmut BrandtFILESGROUPS= BMIBS DEFS
12191a2f929SHartmut Brandt
122*af5e4077SEmmanuel VadotDEFSPACKAGE=	bsnmp
123*af5e4077SEmmanuel VadotBMIBSPACKAGE=	bsnmp
124*af5e4077SEmmanuel Vadot
12592ba581cSHartmut BrandtBMIBS=	FOKUS-MIB.txt BEGEMOT-MIB.txt BEGEMOT-SNMPD.txt
126a0f13910SHartmut BrandtBMIBSDIR= ${SHAREDIR}/snmp/mibs
12791a2f929SHartmut BrandtDEFS=	tree.def
128a0f13910SHartmut BrandtDEFSDIR= ${SHAREDIR}/snmp/defs
12991a2f929SHartmut Brandt
1305f892a7fSTom RhodesCFLAGS+= -I${CONTRIB}/lib -I${CONTRIB}/snmpd -I. -DUSE_LIBBEGEMOT
1317a775b30SHartmut BrandtCFLAGS+= -DHAVE_STDINT_H -DHAVE_INTTYPES_H -DHAVE_ERR_H -DHAVE_STRLCPY
13253c167f9SEnji CooperLIBADD=	begemot bsnmp
13391a2f929SHartmut Brandt
1341c706be0SShteryana ShopovaLDFLAGS= -Wl,-export-dynamic
135b6a6dd18SHartmut Brandt
136135f7de5SShteryana Shopova.if ${MK_OPENSSL} != "no"
137135f7de5SShteryana ShopovaCFLAGS+= -DHAVE_LIBCRYPTO
138135f7de5SShteryana Shopova.endif
139135f7de5SShteryana Shopova
14053c167f9SEnji Cooper.if ${MK_TCP_WRAPPERS} != "no"
14153c167f9SEnji CooperCFLAGS+=	-DUSE_TCPWRAPPERS
14253c167f9SEnji CooperLIBADD+=	wrap
14353c167f9SEnji Cooper.endif
14453c167f9SEnji Cooper
1451e1c4c13SHartmut Brandtoid.h: tree.def Makefile
1468e9b3e70SHartmut Brandt	gensnmptree -I${CONTRIB}/lib -e ${XSYM} < ${.ALLSRC:M*.def} > ${.TARGET}
147b6a6dd18SHartmut Brandt
148b6a6dd18SHartmut Brandt.ORDER: tree.c tree.h
14992edc966SBryan Drewerytree.h: .NOMETA
150b6a6dd18SHartmut Brandttree.c tree.h: tree.def
1518e9b3e70SHartmut Brandt	gensnmptree -I${CONTRIB}/lib -l -f < ${.ALLSRC}
15291a2f929SHartmut Brandt
15316b2454cSHartmut BrandtMANFILTER=	sed -e 's%@MODPATH@%${LIBDIR}/%g'		\
15416b2454cSHartmut Brandt		    -e 's%@DEFPATH@%${DEFSDIR}/%g'		\
15516b2454cSHartmut Brandt		    -e 's%@MIBSPATH@%${BMIBSDIR}/%g'
15616b2454cSHartmut Brandt
15791a2f929SHartmut Brandt.include <bsd.prog.mk>
158