1 # Generated automatically from Makefile.in:Makefile.rules by configure.
3 # Minimum environment and virtual path setup
15 exec_prefix = /usr/local
16 bindir = ${exec_prefix}/bin
17 sbindir = ${exec_prefix}/sbin
18 libdir = ${exec_prefix}/lib
19 datadir = ${prefix}/share
20 includedir = ${prefix}/include/net-snmp
21 ucdincludedir = ${prefix}/include/ucd-snmp
22 mandir = ${prefix}/man
23 man1dir = $(mandir)/man1
24 man3dir = $(mandir)/man3
25 man5dir = $(mandir)/man5
26 man8dir = $(mandir)/man8
27 snmplibdir = $(datadir)/snmp
28 mibdir = $(snmplibdir)/mibs
29 persistentdir = /var/net-snmp
35 INSTALL = $(LIBTOOL) --mode=install /usr/bin/install -c
36 INSTALL_DATA = ${INSTALL} -m 644
45 CFLAGS = -g -O2 -Dlinux
48 LIBTOOL = $(SHELL) $(top_builddir)/libtool
51 # Misc Compiling Stuff
53 # version number is prefixed by a 0 for a better shared library version number
55 # ok, use libtool proper versioning:
59 # generally, LIBCURRENT should stay the same unless major changes occur.
60 # Increment REVISION every release.
61 # Increment AGE if new stuff is available.
62 LIB_LD_CMD = $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -rpath $(libdir) -version-info $(LIBCURRENT):$(LIBREVISION):$(LIBAGE) -o
65 LIB_LDCONFIG_CMD = $(LIBTOOL) --mode=finish $(libdir)
66 LINK = $(LIBTOOL) --mode=link $(CC)
73 $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) -c -o $@ $<
75 # Makefile to install mib files.
83 OTHERINSTALL=mibsinstall
86 V1MIBS = RFC1155-SMI.txt RFC1213-MIB.txt RFC-1215.txt
88 V2MIBS = SNMPv2-CONF.txt SNMPv2-SMI.txt SNMPv2-TC.txt SNMPv2-TM.txt \
91 V3MIBS = SNMP-FRAMEWORK-MIB.txt SNMP-MPD-MIB.txt SNMP-TARGET-MIB.txt \
92 SNMP-NOTIFICATION-MIB.txt SNMP-PROXY-MIB.txt \
93 SNMP-USER-BASED-SM-MIB.txt SNMP-VIEW-BASED-ACM-MIB.txt \
94 SNMP-COMMUNITY-MIB.txt
96 AGENTMIBS = AGENTX-MIB.txt SMUX-MIB.txt
98 IANAMIBS = IANAifType-MIB.txt IANA-LANGUAGE-MIB.txt \
99 IANA-ADDRESS-FAMILY-NUMBERS-MIB.txt
101 RFCMIBS = IF-MIB.txt IF-INVERTED-STACK-MIB.txt \
103 IP-MIB.txt IP-FORWARD-MIB.txt TCP-MIB.txt UDP-MIB.txt \
104 INET-ADDRESS-MIB.txt HCNUM-TC.txt \
105 HOST-RESOURCES-MIB.txt HOST-RESOURCES-TYPES.txt \
107 IPV6-TC.txt IPV6-MIB.txt IPV6-ICMP-MIB.txt IPV6-TCP-MIB.txt \
109 DISMAN-SCRIPT-MIB.txt DISMAN-SCHEDULE-MIB.txt \
110 NOTIFICATION-LOG-MIB.txt
112 NETSNMPMIBS = NET-SNMP-TC.txt NET-SNMP-MIB.txt NET-SNMP-AGENT-MIB.txt \
113 NET-SNMP-EXAMPLES-MIB.txt
115 UCDMIBS = UCD-SNMP-MIB.txt UCD-DEMO-MIB.txt UCD-IPFWACC-MIB.txt \
116 UCD-DLMOD-MIB.txt UCD-DISKIO-MIB.txt
118 DEFAULTMIBS = SNMP-VIEW-BASED-ACM-MIB.txt SNMP-COMMUNITY-MIB.txt SNMP-NOTIFICATION-MIB.txt
120 MIBS = $(V1MIBS) $(V2MIBS) $(V3MIBS) $(RFCMIBS) \
121 $(AGENTMIBS) $(IANAMIBS) \
122 $(NETSNMPMIBS) $(UCDMIBS) $(DEFAULTMIBS)
126 mibsinstall: installdirs
127 @for i in $(MIBS) ; do \
128 $(INSTALL_DATA) $(srcdir)/$$i $(mibdir) ; \
129 echo "install: installed $$i in $(mibdir)" ; \
133 @$(SHELL) $(srcdir)/../mkinstalldirs $(mibdir)
136 # standard target definitions. Set appropriate variables to make use of them.
138 # note: the strange use of the "it" variable is for shell parsing when
139 # there is no targets to install for that rule.
142 # the standard items to build: libraries, bins, and sbins
143 STANDARDTARGETS =$(INSTALLLIBS) $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
144 STANDARDCLEANTARGETS=$(INSTALLLIBS) $(INSTALLBINPROGS) $(INSTALLSBINPROGS) $(INSTALLUCDLIBS)
146 standardall: subdirs $(STANDARDTARGETS)
149 @if test "$(SUBDIRS)" != ""; then \
152 echo "making all in `pwd`/$$i"; \
153 ( cd $$i ; $(MAKE) ) ; \
154 if test $$? != 0 ; then \
160 install: installlocalheaders \
162 installlocalbin installlocalsbin \
163 installsubdirs $(OTHERINSTALL)
165 installprogs: installbin installsbin
170 # set INSTALLHEADERS to a list of things to install in each makefile.
171 # set INSTALLBUILTHEADERS to a list of things to install from builddir
172 # set INSTALLSUBDIRHEADERS and INSTALLSUBDIR to subdirectory headers
173 # set INSTALLSUBDIRHEADERS2 and INSTALLSUBDIR2 to more subdirectory headers
174 # set INSTALLBUILTSUBDIRHEADERS and INSTALLBUILTSUBDIR to a list from builddir
176 installheaders: installlocalheaders installsubdirheaders
179 @if test "$(INSTALLHEADERS)" != "" ; then \
180 echo creating directory $(includedir) ; \
181 it="$(INSTALLHEADERS)" ; \
182 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir) ; \
184 $(INSTALL) $(top_srcdir)/include/net-snmp/$$i $(includedir) ; \
185 echo "installing $$i in $(includedir)" ; \
188 @if test "$(INSTALLBUILTHEADERS)" != "" ; then \
189 echo creating directory $(includedir) ; \
190 it="$(INSTALLBUILTHEADERS)" ; \
191 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir) ; \
193 $(INSTALL) $$i $(includedir) ; \
194 echo "installing $$i in $(includedir)" ; \
197 @if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \
198 echo creating directory $(includedir)/$(INCLUDESUBDIR) ; \
199 it="$(INCLUDESUBDIRHEADERS)" ; \
200 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INCLUDESUBDIR) ; \
202 $(INSTALL) $(top_srcdir)/include/net-snmp/$(INCLUDESUBDIR)/$$i $(includedir)/$(INCLUDESUBDIR) ; \
203 echo "installing $$i in $(includedir)/$(INCLUDESUBDIR)" ; \
206 @if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \
207 echo creating directory $(includedir)/$(INCLUDESUBDIR2) ; \
208 it="$(INCLUDESUBDIRHEADERS2)" ; \
209 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INCLUDESUBDIR2) ; \
211 $(INSTALL) $(top_srcdir)/include/net-snmp/$(INCLUDESUBDIR2)/$$i $(includedir)/$(INCLUDESUBDIR2) ; \
212 echo "installing $$i in $(includedir)/$(INCLUDESUBDIR2)" ; \
215 @if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \
216 echo creating directory $(includedir)/$(INSTALLBUILTSUBDIR) ; \
217 it="$(INSTALLBUILTSUBDIRHEADERS)" ; \
218 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INSTALLBUILTSUBDIR) ; \
220 $(INSTALL) $$i $(includedir)/$(INSTALLBUILTSUBDIR) ; \
221 echo "installing $$i in $(includedir)/$(INSTALLBUILTSUBDIR)" ; \
225 installsubdirheaders:
226 @if test "$(SUBDIRS)" != ""; then \
229 echo "making installheaders in `pwd`/$$i"; \
230 ( cd $$i ; $(MAKE) installheaders) ; \
231 if test $$? != 0 ; then \
238 @if test "$(INSTALLUCDHEADERS)" != "" ; then \
239 echo creating directory $(ucdincludedir) ; \
240 it="$(INSTALLUCDHEADERS)" ; \
241 $(SHELL) $(top_srcdir)/mkinstalldirs $(ucdincludedir) ; \
243 $(INSTALL) $(top_srcdir)/include/ucd-snmp/$$i $(ucdincludedir) ; \
244 echo "installing $$i in $(ucdincludedir)" ; \
251 # set INSTALLLIBS to a list of things to install in each makefile.
253 installlibs: installlocallibs installsubdirlibs
255 installlocallibs: $(INSTALLLIBS)
256 @if test "$(INSTALLLIBS)" != ""; then \
257 it="$(INSTALLLIBS)" ; \
258 $(SHELL) $(top_srcdir)/mkinstalldirs $(libdir) ; \
259 $(INSTALL) $(INSTALLLIBS) $(libdir) ; \
261 echo "installing $$i in $(libdir)"; \
262 $(RANLIB) $(libdir)/$$i ; \
264 $(LIB_LDCONFIG_CMD) ; \
267 installucdlibs: $(INSTALLUCDLIBS)
268 @if test "$(INSTALLUCDLIBS)" != ""; then \
269 it="$(INSTALLUCDLIBS)" ; \
270 $(SHELL) $(top_srcdir)/mkinstalldirs $(libdir) ; \
271 $(INSTALL) $(INSTALLUCDLIBS) $(libdir) ; \
273 echo "installing $$i in $(libdir)"; \
274 $(RANLIB) $(libdir)/$$i ; \
276 $(LIB_LDCONFIG_CMD) ; \
280 @if test "$(SUBDIRS)" != ""; then \
283 echo "making installlibs in `pwd`/$$i"; \
284 ( cd $$i ; $(MAKE) installlibs) ; \
285 if test $$? != 0 ; then \
292 # normal bin binaries
294 # set INSTALLBINPROGS to a list of things to install in each makefile.
296 installbin: installlocalbin installsubdirbin
298 installlocalbin: $(INSTALLBINPROGS)
299 @if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \
300 $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir) ; \
301 it="$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" ; \
302 $(INSTALL) $(INSTALLBINPROGS) $(INSTALLBINSCRIPTS) $(bindir) ; \
304 echo "installing $$i in $(bindir)"; \
309 @if test "$(SUBDIRS)" != ""; then \
312 echo "making installbin in `pwd`/$$i"; \
313 ( cd $$i ; $(MAKE) installbin) ; \
314 if test $$? != 0 ; then \
323 # set INSTALLSBINPROGS to a list of things to install in each makefile.
325 installsbin: installlocalsbin installsubdirsbin
327 installlocalsbin: $(INSTALLSBINPROGS)
328 @if test "$(INSTALLSBINPROGS)" != ""; then \
329 it="$(INSTALLSBINPROGS)" ; \
330 $(SHELL) $(top_srcdir)/mkinstalldirs $(sbindir) ; \
331 $(INSTALL) $(INSTALLSBINPROGS) $(sbindir) ; \
333 echo "installing $$i in $(sbindir)"; \
338 @if test "$(SUBDIRS)" != ""; then \
341 echo "making installsbin in `pwd`/$$i"; \
342 ( cd $$i ; $(MAKE) installsbin) ; \
343 if test $$? != 0 ; then \
350 # general make install target for subdirs
353 @if test "$(SUBDIRS)" != ""; then \
356 echo "making install in `pwd`/$$i"; \
357 ( cd $$i ; $(MAKE) install) ; \
358 if test $$? != 0 ; then \
367 clean: cleansubdirs $(OTHERCLEANTODOS)
368 rm -f core ${OBJS} ${LOBJS} $(STANDARDCLEANTARGETS) $(OTHERCLEANTARGETS)
372 @if test "$(SUBDIRS)" != ""; then \
375 echo "making clean in `pwd`/$$i"; \
376 ( cd $$i ; $(MAKE) clean) ; \
377 if test $$? != 0 ; then \
387 # wacky dependency building.
390 @if test -f Makefile.depend ; then \
391 makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \
395 nosysdepend: nosysdependdirs
396 @if test -f Makefile.depend ; then \
397 makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \
398 perl -n -i.bak $(top_srcdir)/makenosysdepend.pl Makefile ; \
401 distdepend: nosysdepend distdependdirs
402 @if test -f Makefile.depend ; then \
403 perl $(top_srcdir)/makefileindepend.pl ; \
407 @if test "$(SUBDIRS)" != ""; then \
410 echo "making depend in `pwd`/$$i"; \
411 ( cd $$i ; $(MAKE) depend) ; \
412 if test $$? != 0 ; then \
419 @if test "$(SUBDIRS)" != ""; then \
422 echo "making nosysdepend in `pwd`/$$i"; \
423 ( cd $$i ; $(MAKE) nosysdepend) ; \
424 if test $$? != 0 ; then \
431 @if test "$(SUBDIRS)" != ""; then \
434 echo "making distdepend in `pwd`/$$i"; \
435 ( cd $$i ; $(MAKE) distdepend) ; \
436 if test $$? != 0 ; then \
442 # These aren't real targets, let gnu's make know that.
443 .PHONY: clean cleansubdirs lint \
444 install installprogs installheaders installlibs \
445 installbin installsbin installsubdirs \
446 all subdirs standardall \
447 depend nosysdepend distdepend dependdirs nosysdependdirs distdependdirs