2 # Makefile.in (at the root of net-snmp)
7 SUBDIRS
= snmplib agent apps local man mibs
11 -Iinclude
-I
$(srcdir)/include -I
$(srcdir)/agent
/mibgroup
-I.
-I
$(srcdir) \
12 -DDONT_INC_STRUCTS
-DBINDIR
=$(bindir) \
15 INSTALLHEADERS
=version.h
17 INCLUDESUBDIRHEADERS
= aix.h bsd.h bsdi3.h bsdi4.h bsdi.h cygwin.h darwin.h \
18 dynix.h freebsd2.h freebsd3.h freebsd4.h freebsd.h generic.h hpux.h \
19 irix.h linux.h mips.h netbsd.h openbsd.h solaris2.6.h solaris2.7.h \
20 solaris2.8.h solaris2.9.h solaris.h sunos.h svr5.h sysv.h ultrix4.h
21 INCLUDESUBDIR2
=machine
22 INCLUDESUBDIRHEADERS2
=generic.h
23 INSTALLBUILTHEADERS
=include/net-snmp
/net-snmp-config.h
24 INSTALLBINSCRIPTS
=net-snmp-config
25 INSTALLUCDHEADERS
=ucd-snmp-config.h version.h mib_module_config.h
28 # other install rules.
30 OTHERINSTALL
=copypersistentfiles @PERLINSTALLTARGS@
31 COPY_PERSISTENT_FILES
=@COPY_PERSISTENT_FILES@
32 PERSISTENT_DIRECTORY
=@PERSISTENT_DIRECTORY@
33 UCDPERSISTENT_DIRECTORY
=@UCDPERSISTENT_DIRECTORY@
38 # yes, order matters here. default_store must occur before anything else
39 PERLMODULES
=default_store SNMP ASN OID agent
45 all: sedscript EXAMPLE.conf standardall @PERLTARGS@
48 @touch build-in-progress-flag
51 @
rm -f build-in-progress-flag
> /dev
/null
2>&1
56 sedscript
: sedscript.in
include/net-snmp
/net-snmp-config.h
$(srcdir)/agent
/mibgroup
/mibdefs.h
57 $(CPP
) $(srcdir)/sedscript.in | egrep
'^s[/#]' | sed
's/REMOVEME//g;s# */#/#g;s/ *#/#/g;s#/ *#/#g;s/# g/#g/;' > sedscript
58 echo
's#DATADIR#$(datadir)#g' >> sedscript
59 echo
's#LIBDIR#$(libdir)#g' >> sedscript
60 echo
's#BINDIR#$(bindir)#g' >> sedscript
61 echo
's#PERSISTENT_DIRECTORY#$(PERSISTENT_DIRECTORY)#g' >> sedscript
62 echo
's#SYSCONFDIR#$(sysconfdir)#g' >> sedscript
64 EXAMPLE.conf
: sedscript EXAMPLE.conf.def
65 $(SED
) -f sedscript
$(srcdir)/EXAMPLE.conf.def
> EXAMPLE.conf
69 docsdir
: docsdox docsmunge
72 srcdir=$(srcdir) doxygen
$(srcdir)/doxygen.conf
75 find docs
/html
-name \
*.html
-exec perl
-p
-i
-e
's/Generated on/<!--#include virtual=\"\/sfbutton.html\" --><br>Generated on\n/; s/<body/<body bgcolor=white/' {} \
;
79 @for i in docs
/man
/man3
/* ; do \
80 cp
$$i man
/netsnmp_
`basename $$i` ; \
88 @if
test "$(COPY_PERSISTENT_FILES)" = "yes" -a
-d
$(UCDPERSISTENT_DIRECTORY
) -a
! -d
$(PERSISTENT_DIRECTORY
) ; then \
89 cp
-pr
$(UCDPERSISTENT_DIRECTORY
) $(PERSISTENT_DIRECTORY
) ; \
90 echo
"copying $(UCDPERSISTENT_DIRECTORY) to $(PERSISTENT_DIRECTORY)" ; \
96 ( cd testing
; $(MAKE
) test )
99 for i in
$(TESTDIRS
) ; do \
100 ( cd
$$i ; $(MAKE
) ) ; \
101 if
test $$?
!= 0 ; then \
106 distall
: ${srcdir}/configure
${srcdir}/include/net-snmp
/net-snmp-config.h
108 OTHERCLEANTARGETS
=EXAMPLE.conf sedscript
109 OTHERCLEANTODOS
=perlclean
112 # perl specific build rules
114 perlmodules
: perlmakefiles
115 @
(cd perl
; $(MAKE
)) ; \
116 if
test $$?
!= 0 ; then \
121 @if
test ! -f perl
/Makefile
; then \
124 perl Makefile.PL
-NET-SNMP-IN-SOURCE
=true
-NET-SNMP-CONFIG
="sh $$dir/net-snmp-config") $(PERLARGS
) ; \
128 @
(cd perl
; $(MAKE
) install) ; \
129 if
test $$?
!= 0 ; then \
134 @
(cd perl
; $(MAKE
) test) ; \
135 if
test $$?
!= 0 ; then \
140 @if
test -f perl
/Makefile
; then \
141 ( cd perl
; $(MAKE
) clean ) ; \
145 # make distclean completely removes all traces of building including
146 # any files generated by configure itself.
148 distclean: clean configclean tarclean
151 rm -f Makefile snmplib
/Makefile \
152 agent
/Makefile agent
/mibgroup
/Makefile \
153 agent
/helpers
/Makefile \
154 apps
/Makefile apps
/snmpnetstat
/Makefile \
155 man
/Makefile mibs
/Makefile ov
/Makefile \
156 local
/Makefile testing
/Makefile
158 configclean
: makefileclean
159 rm -f config.cache config.status config.log \
160 libtool
include/net-snmp
/net-snmp-config.h \
161 net-snmp-config configure-summary
163 rm -f
include/net-snmp
/agent
/mib_module_config.h \
164 snmplib
/snmpsm_init.h \
165 agent
/mibgroup
/mib_module_includes.h \
166 agent
/mibgroup
/mib_module_inits.h \
167 agent
/mibgroup
/mib_module_shutdown.h \
168 agent
/mibgroup
/mib_module_dot_conf.h
172 # Configure script related targets
175 touch configure
include/net-snmp
/net-snmp-config.h.in
177 touch stamp-h stamp-h.in
179 Makefile
: Makefile.in config.status Makefile.rules Makefile.top
180 @if
test "x$(NOAUTODEPS)" = "x"; then \
183 echo
"WARNING: not running config.status"; \
186 $(srcdir)/include/net-snmp
/net-snmp-config.h.in
: stamp-h.in
187 $(srcdir)/stamp-h.in
: configure.in acconfig.h
188 @if
test "x$(NOAUTODEPS)" = "x" -a
"x$(AUTOHEADER)" != "x:"; then \
189 cd
${srcdir} && LC_COLLATE
=C
$(AUTOHEADER
); \
190 echo timestamp
> ${srcdir}/stamp-h.in
; \
192 echo
"WARNING: not running autoheader"; \
195 include/net-snmp
/net-snmp-config.h
: stamp-h
196 stamp-h
: include/net-snmp
/net-snmp-config.h.in config.status
197 @if
test "x$(NOAUTODEPS)" = "x"; then \
199 echo timestamp
> stamp-h
; \
201 echo
"WARNING: not running config.status"; \
204 $(srcdir)/configure
: configure.in aclocal.m4
205 @if
test "x$(NOAUTODEPS)" = "x" -a
"x$(AUTOCONF)" != "x:"; then \
206 cd
${srcdir} && $(AUTOCONF
); \
207 echo
"Please run configure now."; \
210 echo
"WARNING: not running autoconf"; \
213 config.status
: configure
214 @if
test "x$(NOAUTODEPS)" = "x"; then \
215 .
/config.status
--recheck
; \
217 echo
"WARNING: not running config.status --recheck"; \
224 find
$(srcdir) -name
'*.[ch]' -print | etags
-
227 # Internal distribution packaging, etc.
230 @if
test "x$(VERSION)" = "x"; then \
231 echo
"you need to supply a VERSION string."; \
234 ${srcdir}/agent
/mibgroup
/versiontag
$(VERSION
) reverse
237 @if
test "x$(VERSION)" = "x"; then \
238 echo
"you need to supply a VERSION string."; \
241 ${srcdir}/agent
/mibgroup
/versiontag
$(VERSION
) tag
244 @if
test "x$(VERSION)" = "x"; then \
245 echo
"you need to supply a VERSION string."; \
248 ${srcdir}/agent
/mibgroup
/versiontag
$(VERSION
) tar
251 @if
test -x
${srcdir}/agent
/mibgroup
/versiontag
; then \
252 ${srcdir}/agent
/mibgroup
/versiontag Ext
clean ; \
256 grep
-n
// `find $(srcdir)/ -name \*.\[ch\]` | egrep
-v
"(ftp|http|/win32/)"
258 dist: version tag
tar
263 .PHONY
: docs docsdir mancp testdirs
test TAGS
264 # note: tags and docs are phony to force rebulding