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 # local (scripts) directory Makefile
82 OTHERINSTALL=localinstall
87 SNMPCONFPATH=/usr/local/etc/snmp
88 PERLSCRIPTS=snmpcheck tkmib mib2c fixproc ipf-mod.pl snmpconf traptoemail
89 SCRIPTSMADEFORPERL=snmpcheck.made tkmib.made mib2c.made fixproc.made \
90 ipf-mod.pl.made snmpconf.made traptoemail.made
91 PERLPROG=/usr/bin/perl
92 DATASRCS=mib2c.conf mib2c.iterate.conf mib2c.create-dataset.conf \
93 mib2c.array-user.conf mib2c.column_enums.conf \
94 mib2c.column_defines.conf mib2c.old-api.conf mib2c.scalar.conf \
96 CONFINSTALLDIR=$(snmplibdir)/snmpconf-data
97 CONFDATASRC=snmpconf.dir
98 CONFDIRS=snmp-data snmpd-data snmptrapd-data
99 CONFFILES=snmpd-data/system snmpd-data/acl snmpd-data/trapsinks \
100 snmpd-data/monitor snmpd-data/extending snmpd-data/operation \
101 snmpd-data/basic_setup snmpd-data/snmpconf-config \
102 snmp-data/authopts snmp-data/debugging snmp-data/output snmp-data/mibs \
103 snmp-data/snmpconf-config \
104 snmptrapd-data/formatting snmptrapd-data/traphandle \
105 snmptrapd-data/snmpconf-config
107 OTHERCLEANTARGETS=snmpcheck $(SCRIPTSMADEFORPERL)
109 all: $(SCRIPTSMADEFORPERL) standardall
111 snmpcheck: $(srcdir)/snmpcheck.def ../sedscript
112 $(SED) -f ../sedscript $(srcdir)/snmpcheck.def > snmpcheck
114 snmpcheck.made: snmpcheck
115 if test "x$(PERLPROG)" != "x" ; then \
116 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%' snmpcheck > snmpcheck.made ; \
118 touch snmpcheck.made ; \
121 tkmib.made: $(srcdir)/tkmib
122 if test "x$(PERLPROG)" != "x" ; then \
123 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%' ${srcdir}/tkmib > tkmib.made; \
128 mib2c.made: $(srcdir)/mib2c
129 if test "x$(PERLPROG)" != "x" ; then \
130 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%;s#/usr/local/share/snmp#$(snmplibdir)#;' ${srcdir}/mib2c > mib2c.made; \
136 ipf-mod.pl.made: $(srcdir)/ipf-mod.pl
137 if test "x$(PERLPROG)" != "x" ; then \
138 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%' ${srcdir}/ipf-mod.pl > ipf-mod.pl.made; \
140 touch ipf-mod.pl.made; \
143 fixproc.made: $(srcdir)/fixproc
144 if test "x$(PERLPROG)" != "x" ; then \
145 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%' ${srcdir}/fixproc > fixproc.made; \
147 touch fixproc.made; \
150 snmpconf.made: $(srcdir)/snmpconf
151 if test "x$(PERLPROG)" != "x" ; then \
152 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(SNMPCONFPATH)#g' ${srcdir}/snmpconf > snmpconf.made; \
154 touch snmpconf.made; \
157 traptoemail.made: $(srcdir)/traptoemail
158 if test "x$(PERLPROG)" != "x" ; then \
159 $(PERLPROG) -p -e 's%^#!.*/perl.*%#!$(PERLPROG)%; s#/usr/local/share#$(datadir)#g; s#/usr/local/etc/snmp#$(TRAPTOEMAILPATH)#g' ${srcdir}/traptoemail > traptoemail.made; \
161 touch traptoemail.made; \
165 @if test "x$(PERLPROG)" != "x" ; then \
166 for i in $(PERLSCRIPTS) ; do $(INSTALL) $$i.made $(bindir)/$$i ; echo "install: installed $$i in $(bindir)" ; done ; \
167 $(SHELL) $(srcdir)/../mkinstalldirs $(snmplibdir) ; \
168 for i in $(DATASRCS) ; do $(INSTALL) $(srcdir)/$$i $(snmplibdir)/$$i ; echo "install: installed $$i in $(snmplibdir)" ; done ; \
169 for i in $(CONFDIRS); do $(SHELL) $(srcdir)/../mkinstalldirs $(CONFINSTALLDIR)/$$i ; done ; \
170 for i in $(CONFFILES); do $(INSTALL) $(srcdir)/$(CONFDATASRC)/$$i $(CONFINSTALLDIR)/$$i; echo "install: installed $$i in $(CONFINSTALLDIR)"; done \
174 # standard target definitions. Set appropriate variables to make use of them.
176 # note: the strange use of the "it" variable is for shell parsing when
177 # there is no targets to install for that rule.
180 # the standard items to build: libraries, bins, and sbins
181 STANDARDTARGETS =$(INSTALLLIBS) $(INSTALLBINPROGS) $(INSTALLSBINPROGS)
182 STANDARDCLEANTARGETS=$(INSTALLLIBS) $(INSTALLBINPROGS) $(INSTALLSBINPROGS) $(INSTALLUCDLIBS)
184 standardall: subdirs $(STANDARDTARGETS)
187 @if test "$(SUBDIRS)" != ""; then \
190 echo "making all in `pwd`/$$i"; \
191 ( cd $$i ; $(MAKE) ) ; \
192 if test $$? != 0 ; then \
198 install: installlocalheaders \
200 installlocalbin installlocalsbin \
201 installsubdirs $(OTHERINSTALL)
203 installprogs: installbin installsbin
208 # set INSTALLHEADERS to a list of things to install in each makefile.
209 # set INSTALLBUILTHEADERS to a list of things to install from builddir
210 # set INSTALLSUBDIRHEADERS and INSTALLSUBDIR to subdirectory headers
211 # set INSTALLSUBDIRHEADERS2 and INSTALLSUBDIR2 to more subdirectory headers
212 # set INSTALLBUILTSUBDIRHEADERS and INSTALLBUILTSUBDIR to a list from builddir
214 installheaders: installlocalheaders installsubdirheaders
217 @if test "$(INSTALLHEADERS)" != "" ; then \
218 echo creating directory $(includedir) ; \
219 it="$(INSTALLHEADERS)" ; \
220 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir) ; \
222 $(INSTALL) $(top_srcdir)/include/net-snmp/$$i $(includedir) ; \
223 echo "installing $$i in $(includedir)" ; \
226 @if test "$(INSTALLBUILTHEADERS)" != "" ; then \
227 echo creating directory $(includedir) ; \
228 it="$(INSTALLBUILTHEADERS)" ; \
229 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir) ; \
231 $(INSTALL) $$i $(includedir) ; \
232 echo "installing $$i in $(includedir)" ; \
235 @if test "$(INCLUDESUBDIRHEADERS)" != "" ; then \
236 echo creating directory $(includedir)/$(INCLUDESUBDIR) ; \
237 it="$(INCLUDESUBDIRHEADERS)" ; \
238 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INCLUDESUBDIR) ; \
240 $(INSTALL) $(top_srcdir)/include/net-snmp/$(INCLUDESUBDIR)/$$i $(includedir)/$(INCLUDESUBDIR) ; \
241 echo "installing $$i in $(includedir)/$(INCLUDESUBDIR)" ; \
244 @if test "$(INCLUDESUBDIRHEADERS2)" != "" ; then \
245 echo creating directory $(includedir)/$(INCLUDESUBDIR2) ; \
246 it="$(INCLUDESUBDIRHEADERS2)" ; \
247 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INCLUDESUBDIR2) ; \
249 $(INSTALL) $(top_srcdir)/include/net-snmp/$(INCLUDESUBDIR2)/$$i $(includedir)/$(INCLUDESUBDIR2) ; \
250 echo "installing $$i in $(includedir)/$(INCLUDESUBDIR2)" ; \
253 @if test "$(INSTALLBUILTSUBDIRHEADERS)" != "" ; then \
254 echo creating directory $(includedir)/$(INSTALLBUILTSUBDIR) ; \
255 it="$(INSTALLBUILTSUBDIRHEADERS)" ; \
256 $(SHELL) $(top_srcdir)/mkinstalldirs $(includedir)/$(INSTALLBUILTSUBDIR) ; \
258 $(INSTALL) $$i $(includedir)/$(INSTALLBUILTSUBDIR) ; \
259 echo "installing $$i in $(includedir)/$(INSTALLBUILTSUBDIR)" ; \
263 installsubdirheaders:
264 @if test "$(SUBDIRS)" != ""; then \
267 echo "making installheaders in `pwd`/$$i"; \
268 ( cd $$i ; $(MAKE) installheaders) ; \
269 if test $$? != 0 ; then \
276 @if test "$(INSTALLUCDHEADERS)" != "" ; then \
277 echo creating directory $(ucdincludedir) ; \
278 it="$(INSTALLUCDHEADERS)" ; \
279 $(SHELL) $(top_srcdir)/mkinstalldirs $(ucdincludedir) ; \
281 $(INSTALL) $(top_srcdir)/include/ucd-snmp/$$i $(ucdincludedir) ; \
282 echo "installing $$i in $(ucdincludedir)" ; \
289 # set INSTALLLIBS to a list of things to install in each makefile.
291 installlibs: installlocallibs installsubdirlibs
293 installlocallibs: $(INSTALLLIBS)
294 @if test "$(INSTALLLIBS)" != ""; then \
295 it="$(INSTALLLIBS)" ; \
296 $(SHELL) $(top_srcdir)/mkinstalldirs $(libdir) ; \
297 $(INSTALL) $(INSTALLLIBS) $(libdir) ; \
299 echo "installing $$i in $(libdir)"; \
300 $(RANLIB) $(libdir)/$$i ; \
302 $(LIB_LDCONFIG_CMD) ; \
305 installucdlibs: $(INSTALLUCDLIBS)
306 @if test "$(INSTALLUCDLIBS)" != ""; then \
307 it="$(INSTALLUCDLIBS)" ; \
308 $(SHELL) $(top_srcdir)/mkinstalldirs $(libdir) ; \
309 $(INSTALL) $(INSTALLUCDLIBS) $(libdir) ; \
311 echo "installing $$i in $(libdir)"; \
312 $(RANLIB) $(libdir)/$$i ; \
314 $(LIB_LDCONFIG_CMD) ; \
318 @if test "$(SUBDIRS)" != ""; then \
321 echo "making installlibs in `pwd`/$$i"; \
322 ( cd $$i ; $(MAKE) installlibs) ; \
323 if test $$? != 0 ; then \
330 # normal bin binaries
332 # set INSTALLBINPROGS to a list of things to install in each makefile.
334 installbin: installlocalbin installsubdirbin
336 installlocalbin: $(INSTALLBINPROGS)
337 @if test "$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" != " "; then \
338 $(SHELL) $(top_srcdir)/mkinstalldirs $(bindir) ; \
339 it="$(INSTALLBINPROGS) $(INSTALLBINSCRIPTS)" ; \
340 $(INSTALL) $(INSTALLBINPROGS) $(INSTALLBINSCRIPTS) $(bindir) ; \
342 echo "installing $$i in $(bindir)"; \
347 @if test "$(SUBDIRS)" != ""; then \
350 echo "making installbin in `pwd`/$$i"; \
351 ( cd $$i ; $(MAKE) installbin) ; \
352 if test $$? != 0 ; then \
361 # set INSTALLSBINPROGS to a list of things to install in each makefile.
363 installsbin: installlocalsbin installsubdirsbin
365 installlocalsbin: $(INSTALLSBINPROGS)
366 @if test "$(INSTALLSBINPROGS)" != ""; then \
367 it="$(INSTALLSBINPROGS)" ; \
368 $(SHELL) $(top_srcdir)/mkinstalldirs $(sbindir) ; \
369 $(INSTALL) $(INSTALLSBINPROGS) $(sbindir) ; \
371 echo "installing $$i in $(sbindir)"; \
376 @if test "$(SUBDIRS)" != ""; then \
379 echo "making installsbin in `pwd`/$$i"; \
380 ( cd $$i ; $(MAKE) installsbin) ; \
381 if test $$? != 0 ; then \
388 # general make install target for subdirs
391 @if test "$(SUBDIRS)" != ""; then \
394 echo "making install in `pwd`/$$i"; \
395 ( cd $$i ; $(MAKE) install) ; \
396 if test $$? != 0 ; then \
405 clean: cleansubdirs $(OTHERCLEANTODOS)
406 rm -f core ${OBJS} ${LOBJS} $(STANDARDCLEANTARGETS) $(OTHERCLEANTARGETS)
410 @if test "$(SUBDIRS)" != ""; then \
413 echo "making clean in `pwd`/$$i"; \
414 ( cd $$i ; $(MAKE) clean) ; \
415 if test $$? != 0 ; then \
425 # wacky dependency building.
428 @if test -f Makefile.depend ; then \
429 makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \
433 nosysdepend: nosysdependdirs
434 @if test -f Makefile.depend ; then \
435 makedepend `echo $(CPPFLAGS) | sed 's/-f[-a-z]*//g'` -o .lo $(srcdir)/*.c $(srcdir)/*/*.c ; \
436 perl -n -i.bak $(top_srcdir)/makenosysdepend.pl Makefile ; \
439 distdepend: nosysdepend distdependdirs
440 @if test -f Makefile.depend ; then \
441 perl $(top_srcdir)/makefileindepend.pl ; \
445 @if test "$(SUBDIRS)" != ""; then \
448 echo "making depend in `pwd`/$$i"; \
449 ( cd $$i ; $(MAKE) depend) ; \
450 if test $$? != 0 ; then \
457 @if test "$(SUBDIRS)" != ""; then \
460 echo "making nosysdepend in `pwd`/$$i"; \
461 ( cd $$i ; $(MAKE) nosysdepend) ; \
462 if test $$? != 0 ; then \
469 @if test "$(SUBDIRS)" != ""; then \
472 echo "making distdepend in `pwd`/$$i"; \
473 ( cd $$i ; $(MAKE) distdepend) ; \
474 if test $$? != 0 ; then \
480 # These aren't real targets, let gnu's make know that.
481 .PHONY: clean cleansubdirs lint \
482 install installprogs installheaders installlibs \
483 installbin installsbin installsubdirs \
484 all subdirs standardall \
485 depend nosysdepend distdepend dependdirs nosysdependdirs distdependdirs