~ubuntu-branches/ubuntu/wily/ntop/wily-proposed

« back to all changes in this revision

Viewing changes to ntop/Makefile.am

  • Committer: Bazaar Package Importer
  • Author(s): Dennis Schoen
  • Date: 2002-04-12 11:38:47 UTC
  • Revision ID: james.westby@ubuntu.com-20020412113847-4k4yydw0pzybc6g8
Tags: upstream-2.0.0
ImportĀ upstreamĀ versionĀ 2.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
3
# auto makefile for the top-level ntop program
 
4
## (this file is processed with 'automake' to produce Makefile.in)
 
5
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
6
#
 
7
# Copyright (c) 1998, 2000 Luca Deri <deri@ntop.org>
 
8
# Updated 1Q 2000 Rocco Carbone <rocco@ntop.org>
 
9
#
 
10
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
11
# This program is free software; you can redistribute it and/or modify
 
12
# it under the terms of the GNU General Public License as published by
 
13
# the Free Software Foundation; either version 2 of the License, or
 
14
# (at your option) any later version.
 
15
#
 
16
# This program is distributed in the hope that it will be useful,
 
17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
19
# GNU General Public License for more details.
 
20
#
 
21
# You should have received a copy of the GNU General Public License
 
22
# along with this program; if not, write to the Free Software
 
23
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
24
#
 
25
 
 
26
 
 
27
#
 
28
# The name of the game with its own major, minor and release version.
 
29
#
 
30
PKGNAME  = ntop
 
31
VERSION  = @VERSION@
 
32
PROGRAM  = $(PKGNAME)-$(VERSION)
 
33
OSNAME   = @target_os@
 
34
 
 
35
DEFS      = @DEFS@
 
36
INCS      = @INCS@
 
37
 
 
38
INCLUDES  = -I. $(INCS)
 
39
LIBS      = @LIBS@ @MORELIBS@
 
40
CCLD      = @CCLD@
 
41
 
 
42
CORELIBS  = @CORELIBS@
 
43
MORELIBS  = @MORELIBS@
 
44
 
 
45
 
 
46
DISTCLEANFILES = logger.db ntop.db ntop_pw.db LsWatch.db \
 
47
                 icmpWatch.db ntops ntopd ntop-config *~ *.log
 
48
CLEANFILES     = $(DISTCLEANFILES)
 
49
 
 
50
# A list of all the files in the current directory which can be regenerated
 
51
MAINTAINERCLEANFILES = COPYING Makefile.in aclocal.m4 config.guess \
 
52
                       config.h.in config.sub configure install-sh \
 
53
                       ltconfig ltmain.sh missing mkinstalldirs \
 
54
                       ntop-config stamp-h.in
 
55
 
 
56
 
 
57
SUBDIRS = . @PLUGINS@ @INTOP@
 
58
 
 
59
DIST_COMMON = AUTHORS CONTENTS COPYING ChangeLog \
 
60
              MANIFESTO NEWS PORTING  \
 
61
              SUPPORT_NTOP.txt THANKS \
 
62
              ntop.8 ntop.txt ntop.html \
 
63
              ntop-cert.pem ntop-rules.8 rules.sample
 
64
 
 
65
NTOPHTML = html html/*.html  html/*.gif html/*.jpg html/*.png html/*.css html/statsicons \
 
66
           html/statsicons/flags html/statsicons/os \
 
67
           html/statsicons/flags/*.gif html/statsicons/os/*.gif
 
68
 
 
69
EXTRA_DIST = Makefile.am Makefile.in \
 
70
             acconfig.h acinclude.m4 acinclude.m4.in \
 
71
             autogen.sh config.guess config.h.in config.sub \
 
72
             configure configure.in \
 
73
             install-sh libtool ltconfig ltmain.sh \
 
74
             missing mkinstalldirs ntop-config.in \
 
75
             vt.sed
 
76
 
 
77
WEBFILES       = `cat www/FILES`
 
78
PLUGINSFILES   = `cat plugins/FILES`
 
79
INTOPFILES     = `cat intop/FILES`
 
80
DATABASEFILES  = `cat database/FILES`
 
81
DOCSFILES      = `cat docs/FILES`
 
82
 
 
83
THINGS_TO_DISTRIBUTE = $(DISTFILES) $(NTOPHTML) $(PLUGINSFILES) \
 
84
                       $(INTOPFILES) $(DATABASEFILES) $(DOCSFILES) $(WEBFILES)
 
85
 
 
86
#
 
87
# This Makefile is responsible for creating:
 
88
# 1. libntop.la, the ntop core library
 
89
# 2. libntopreport.la, the ntop library with all the code for html report
 
90
# 3. ntop, the binary dynamically linked
 
91
# 4. ntops, the binary statically linked
 
92
# 5. ntopd, the ntop daemon, simply a link to the ntop binary
 
93
#
 
94
 
 
95
#
 
96
# The Games
 
97
#
 
98
bin_PROGRAMS   = ntop
 
99
EXTRA_PROGRAMS = ntops ntopd
 
100
bin_SCRIPTS    = ntop-config
 
101
 
 
102
ntop_SOURCES   = main.c
 
103
ntops_SOURCES  = $(ntop_SOURCES)
 
104
ntopd_SOURCES  = $(ntop_SOURCES)
 
105
 
 
106
ntop_DEPENDENCIES = libntopreport.la libntop.la
 
107
ntop_LDADD        = libntopreport.la libntop.la
 
108
ntop_LDFLAGS      =
 
109
 
 
110
ntops_DEPENDENCIES = libntopreport.la libntop.la
 
111
ntops_LDADD        = libntopreport.la libntop.la
 
112
ntops_LDFLAGS      = -static
 
113
 
 
114
noinst_HEADERS     = globals-core.h globals-report.h ntop.h regex.h rules.h
 
115
 
 
116
# all the Archives
 
117
lib_LTLIBRARIES    = libntop.la libntopreport.la
 
118
 
 
119
# core Archive, or the 'engine'
 
120
libntop_la_SOURCES = address.c       dataFormat.c  event.c            \
 
121
                     globals-core.c  hash.c        initialize.c       \
 
122
                     leaks.c         logger.c      mysql.c netflow.c  \
 
123
                     ntop.c          pbuf.c        protocols.c        \
 
124
                     plugin.c        qsort.c                          \
 
125
                     regex.c         rules.c       sql.c              \
 
126
                     ssl.c           term.c        traffic.c          \
 
127
                     util.c          vendor.c      version.c          \
 
128
                     vendortable.h   ntop_darwin.c
 
129
 
 
130
libntop_la_DEPENDENCIES = config.h
 
131
libntop_la_LIBADD       = $(CORELIBS)
 
132
libntop_la_LDFLAGS      = -version-info @NTOP_VERSION_INFO@ -release @NTOP_RELEASE@ -export-dynamic @DYN_FLAGS@
 
133
 
 
134
# Archive for http representation, or the 'viewer'
 
135
libntopreport_la_SOURCES = admin.c emitter.c \
 
136
                           globals-report.c \
 
137
                           graph.c \
 
138
                           http.c  \
 
139
                           report.c \
 
140
                           reportUtils.c \
 
141
                           webInterface.c
 
142
 
 
143
 
 
144
libntopreport_la_DEPENDENCIES = config.h
 
145
libntopreport_la_LIBADD       = $(MORELIBS)
 
146
libntopreport_la_LDFLAGS      = -version-info @NTOP_VERSION_INFO@ -release @NTOP_RELEASE@ -export-dynamic @DYN_FLAGS@
 
147
 
 
148
man_MANS = ntop.8 intop/intop.1
 
149
 
 
150
.PHONY: snapshot
 
151
 
 
152
ntopd: ntop
 
153
        @ln -sf ntop ntopd
 
154
        @-(cd .libs && ln -sf ntop ntopd)
 
155
 
 
156
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
157
# Distribution
 
158
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
159
snapshot: version.c
 
160
        @echo "generating configuration files ............. please wait"
 
161
        @automake --add-missing --gnu --include-deps >/dev/null 2>&1
 
162
        @autoconf  >/dev/null 2>&1
 
163
        @./configure >/dev/null 2>&1
 
164
        @-if [ -d distribution ]; then true; else mkdir distribution; fi
 
165
        @-if [ -d distribution/$(PROGRAM) ]; then true; else mkdir distribution/$(PROGRAM); fi
 
166
        @echo "copying files ............. please wait"
 
167
        @for file in $(THINGS_TO_DISTRIBUTE); do \
 
168
          if test -d $$file; then \
 
169
              mkdir distribution/$(PROGRAM)/$$file; \
 
170
          else cp -p $$file distribution/$(PROGRAM)/$$file; \
 
171
          fi; \
 
172
        done
 
173
        @echo "== making tar file distribution/$(PROGRAM).tar.gz ... please wait"
 
174
        @(date=`date`; \
 
175
          day=`echo $$date | cut -f3 -d" "`; \
 
176
          month=`echo $$date | cut -f2 -d" "`; \
 
177
          year=`echo $$date | cut -f6 -d" "`; \
 
178
         cd distribution; tar cvfz $(PROGRAM)-$$month-$$day-$$year.tar.gz $(PROGRAM))
 
179
        @rm -rf distribution/$(PROGRAM)
 
180
        @automake --add-missing --gnu >/dev/null 2>&1
 
181
        @autoconf  >/dev/null 2>&1
 
182
        @./configure >/dev/null 2>&1
 
183
        @echo "== distribution => done"
 
184
 
 
185
 
 
186
#
 
187
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
188
# rules to handle nroff documentation
 
189
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
190
#
 
191
ntop.txt: ntop.8
 
192
        @echo ""
 
193
        @echo "-----------------------------------------------"
 
194
        @echo "Converting $< to ASCII format  .... Please wait"
 
195
        @echo ""
 
196
        @groff -mandoc -Tascii $< | sed 's/_//g' | sed 's/[ -~]//g' > html/ntop.txt
 
197
        @echo "$@ done !"
 
198
        @echo "-----------------------------------------------"
 
199
        @echo ""
 
200
 
 
201
 
 
202
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
203
# rules to translate ASCII files to HTML
 
204
# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
 
205
ntop.html: ntop.txt
 
206
        @echo ""
 
207
        @echo "-----------------------------------------------"
 
208
        @echo "Converting $< to HTML format  .... Please wait"
 
209
        @echo ""
 
210
        @echo " " > ntop.tmp
 
211
        @cat ntop.tmp html/$< | man2html > html/ntop.html
 
212
        @echo "$@ done !"
 
213
        @echo "-----------------------------------------------"
 
214
        @echo ""
 
215
 
 
216
ntop-cert.pem:
 
217
        openssl req -new -x509 -sha1 -extensions v3_ca -nodes -days 365 -out cert.pem
 
218
        cat privkey.pem cert.pem > ntop-cert.pem
 
219
        /bin/rm -f privkey.pem cert.pem
 
220
 
 
221
install-data-local:
 
222
        @cp -p ntop-cert.pem $(bindir)/ntop-cert.pem
 
223
        @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(libdir)/plugins;
 
224
        @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop;
 
225
        @$(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop/html;
 
226
        @for file in $(NTOPHTML); do \
 
227
          if test -d $$file; then \
 
228
             $(top_srcdir)/mkinstalldirs $(DESTDIR)/$(datadir)/ntop/$$file; \
 
229
           else \
 
230
             cp -p $$file $(DESTDIR)/$(datadir)/ntop/$$file; \
 
231
          fi; \
 
232
        done
 
233
 
 
234
 
 
235
# built the vendor table
 
236
vt: vendortable.h
 
237
        @fgrep -e "(hex)" Internet/oui.txt | cut -c1-8,9,19- | sed -f vt.sed > vendortable.h
 
238
 
 
239
# built the mac table
 
240
# mact: mactable.h
 
241
#       @fgrep -e "(hex)" oui.txt | cut -c1-8,9,19- | sed -f mact.sed > mactable.h
 
242
 
 
243
# built the IPX SAP table
 
244
sapt: saptable.h
 
245
        @cat Internet/novell-sap-numbers | cut -c1-3 | sed -f sapt.sed > saptable.h
 
246
 
 
247
 
 
248
# download the vendor information table
 
249
dnvt:
 
250
        @(cd Internet; wget -c http://standards.ieee.org/regauth/oui/oui.txt)
 
251
 
 
252
# download the mac information table
 
253
#dnmact:
 
254
#       @(cd Internet; wget -c http://www.cavebear.com/CaveBear/Ethernet/vendor.html)
 
255
 
 
256
# download the Novell SAP Protocol information table
 
257
dnsapt:
 
258
        @(cd Internet; wget -c http://www.isi.edu/in-notes/iana/assignments/novell-sap-numbers)
 
259
 
 
260
#
 
261
# Below you can find some rules for
 
262
# building packages automatically. Most
 
263
# of them are outdated and need to be updated.
 
264
 
265
 
 
266
#
 
267
# rpm for Suse 7 (tested on 7.3)
 
268
# Based on work of Ralf.Amandi <ralf.amandi@accordata.net>
 
269
#
 
270
make-suse:
 
271
        ./configure --prefix=/usr --mandir=/usr/share/man --localstatedir=/var/lib
 
272
        make
 
273
        make install
 
274
        $(mkinstalldirs) /usr/share/man/man8/ /usr/share/man/man1/ /usr/share/doc/packages/ntop
 
275
        cp ntop.8 /usr/share/man/man8/
 
276
        cp intop/intop.1 /usr/share/man/man1/
 
277
        gzip -f /usr/share/man/man8/ntop.8
 
278
        gzip -f /usr/share/man/man1/intop.1
 
279
        cp -r docs/* /usr/share/doc/packages/ntop
 
280
        install -m 755  packages/suse/ntopd /etc/init.d/ntopd
 
281
        ln -sf ../../etc/init.d/ntopd /usr/sbin/rcntopd
 
282
        install -m 644  packages/suse/rc.config.ntopd /var/adm/fillup-templates/rc.config.ntopd
 
283
        mkdir -p /var/lib/ntop
 
284
        rpm -bb packages/suse/ntop.spec
 
285
 
 
286
 
 
287
#make-deb: ntop ntop.html
 
288
#       echo "Only root can do this. Wait please...."
 
289
#       cp ntop packages/debian/sbin
 
290
#       cp -r ntop.html html/* packages/debian$(etcdir)/html
 
291
#       chown root.sys packages/debian/sbin/ntop
 
292
#       chmod gou+x packages/debian/sbin/ntop
 
293
#       chmod u+s packages/debian/sbin/ntop
 
294
#       cp ntop.8 ntop-rules.8 packages/debian/usr/man/man8
 
295
#       gzip packages/debian/usr/man/man8/ntop.8
 
296
#       gzip packages/debian/usr/man/man8/ntop-rules.8
 
297
#       dpkg-deb -b packages/debian packages/ntop-$(VERSION)-$(OSNAME).deb
 
298
#       rm packages/debian/sbin/ntop
 
299
#       rm packages/debian/usr/man/man8/ntop.8.gz
 
300
#       rm packages/debian/usr/man/man8/ntop-rules.8.gz
 
301
#
 
302
#make-generic: ntop ntop.html
 
303
#       cp ntop packages/generic/sbin
 
304
#       cp -r ntop.html html/* packages/generic$(etcdir)/html
 
305
#       chown root.sys packages/generic/sbin/ntop
 
306
#       chmod gou+x packages/generic/sbin/ntop
 
307
#       chmod u+s packages/generic/sbin/ntop
 
308
#       cp ntop.8 ntop-rules.8 packages/generic/usr/man/man8
 
309
#       gzip packages/generic/usr/man/man8/ntop.8
 
310
#       gzip packages/generic/usr/man/man8/ntop-rules.8
 
311
#       cd packages/generic; tar cvf - . > ../ntop-$(VERSION)-$(OSNAME).tar
 
312
#       compress packages/ntop-$(VERSION)-$(OSNAME).tar
 
313
#       rm packages/generic/sbin/ntop
 
314
#       rm packages/generic/usr/man/man8/ntop.8.gz
 
315
#       rm packages/generic/usr/man/man8/ntop-rules.8.gz
 
316
#       rm packages/generic$(etcdir)/html/*
 
317
#
 
318
#make-slack: ntop ntop.html
 
319
#       echo "Only root can do this. Wait please...."
 
320
#       cp ntop packages/slackware/sbin
 
321
#       cp -r ntop.html html/* packages/slackware$(etcdir)/html
 
322
#       chown root.sys packages/slackware/sbin/ntop
 
323
#       chmod gou+x packages/slackware/sbin/ntop
 
324
#       chmod u+s packages/slackware/sbin/ntop
 
325
#       cp ntop.8 ntop-rules.8 packages/slackware/usr/man/man8
 
326
#       gzip packages/slackware/usr/man/man8/ntop.8
 
327
#       gzip packages/slackware/usr/man/man8/ntop-rules.8
 
328
#       cd packages/slackware; tar cvfz - . > ../ntop-$(VERSION)-slackware.tgz
 
329
#       mv packages/ntop-$(VERSION)-slackware.tgz packages/slackware
 
330
#       rm packages/slackware/sbin/ntop
 
331
#       rm packages/slackware/usr/man/man8/ntop.8.gz
 
332
#       rm packages/slackware/usr/man/man8/ntop-rules.8.gz
 
333
#       rm packages/slackware$(etcdir)/html/*
 
334
#       echo "The package file is under packages/slackware: have fun!"
 
335
#
 
336
#
 
337
#make-bsd: ntop ntop.html
 
338
#       echo "Only root can do this. Wait please...."
 
339
#       cp ntop packages/freebsd/sbin
 
340
#       cp -r ntop.html html/* packages/freebsd$(etcdir)/html
 
341
#       chown root.sys packages/freebsd/sbin/ntop
 
342
#       chmod gou+x packages/freebsd/sbin/ntop
 
343
#       chmod u+s packages/freebsd/sbin/ntop
 
344
#       cp ntop.8 ntop-rules.8 packages/freebsd/usr/man/man8
 
345
#       gzip packages/freebsd/usr/man/man8/ntop.8
 
346
#       gzip packages/freebsd/usr/man/man8/ntop-rules.8
 
347
#       cd packages/freebsd; tar cvfz - . > ../ntop-$(VERSION)-freebsd.tgz
 
348
#       mv packages/ntop-$(VERSION)-freebsd.tgz packages/freebsd
 
349
#       rm packages/freebsd/sbin/ntop
 
350
#       rm packages/freebsd/usr/man/man8/ntop.8.gz
 
351
#       rm packages/freebsd/usr/man/man8/ntop-rules.8.gz
 
352
#       rm packages/freebsd$(etcdir)/html/*
 
353
#       echo "The package file is under packages/freebsd: have fun!"
 
354
#
 
355
#
 
356
#make-solaris: ntop ntop.html
 
357
#       echo "Only root can do this. Wait please...."
 
358
#       /bin/rm -rf /opt/ntop
 
359
#       /bin/rm -rf /var/spool/ntop
 
360
#       $(mkinstalldirs) -p /opt/ntop/bin
 
361
#       $(mkinstalldirs) -p /opt/ntop/man/man8
 
362
#       $(mkinstalldirs) -p /opt/ntop$(etcdir)/html
 
363
#       cp ntop /opt/ntop/bin
 
364
#       cp -r ntop.html html/* /opt/ntop$(etcdir)/html
 
365
#       chown -R bin /opt/ntop
 
366
#       chgrp -R bin /opt/ntop
 
367
#       chmod gou+x /opt/ntop/bin/ntop
 
368
#       chmod u+s /opt/ntop/bin/ntop
 
369
#       cp ntop.8 /opt/ntop/man/man8
 
370
#       cp ntop-rules.8 /opt/ntop/man/man8
 
371
#       cd /opt/ntop; find . -print | pkgproto > prototype
 
372
#       echo "i pkginfo=/opt/ntop/pkginfo" >> prototype
 
373
#       cat /opt/ntop/prototype >> prototype
 
374
#       mv prototype /opt/ntop/prototype
 
375
#       cp packages/solaris/ntop/pkginfo /opt/ntop
 
376
#       cd /opt/ntop; pkgmk -o -r `pwd`
 
377
#       cd /var/spool/pkg; pkgtrans -o -s `pwd` /tmp/ntop-$(VERSION)-solaris.$(MACHTYPE)
 
378
#       cd /tmp; gzip ntop-$(VERSION)-solaris.$(MACHTYPE)
 
379
#       /bin/rm -rf /opt/ntop
 
380
#       /bin/rm -rf /var/spool/ntop
 
381
#       echo "The package file is in /tmp/ntop-$(VERSION)-solaris.$(MACHTYPE).gz: have fun!"