Support for HTTP methods added by GENA (the uPnP protocol), and for the
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.265 2000/12/29 01:06:24 sharpe Exp $
5 #
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@zing.org>
8 # Copyright 1998 Gerald Combs
9 #
10
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (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 ACLOCAL_AMFLAGS = `./aclocal-flags`
26
27 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @tethereal_bin@
28 man_MANS = @ethereal_man@ @editcap_man@ @tethereal_man@
29
30 EXTRA_PROGRAMS = ethereal ethereal_static tethereal tethereal_static editcap
31 EXTRA_MANS = ethereal.1 tethereal.1 editcap.1
32
33 sysconf_DATA = manuf
34
35 DISSECTOR_SOURCES = \
36         packet-aarp.c  \
37         packet-afs.c   \
38         packet-aim.c   \
39         packet-arp.c   \
40         packet-ascend.c\
41         packet-atalk.c \
42         packet-atm.c   \
43         packet-auto_rp.c   \
44         packet-bgp.c   \
45         packet-bootp.c \
46         packet-bootparams.c \
47         packet-bpdu.c  \
48         packet-bxxp.c \
49         packet-cdp.c   \
50         packet-cgmp.c  \
51         packet-clip.c  \
52         packet-clnp.c  \
53         packet-cops.c  \
54         packet-data.c  \
55         packet-ddtp.c  \
56         packet-diameter.c \
57         packet-dns.c   \
58         packet-eigrp.c \
59         packet-esis.c  \
60         packet-eth.c   \
61         packet-ethertype.c   \
62         packet-fddi.c  \
63         packet-frame.c  \
64         packet-ftp.c   \
65         packet-giop.c  \
66         packet-gre.c   \
67         packet-gvrp.c  \
68         packet-h1.c    \
69         packet-h261.c  \
70         packet-hsrp.c  \
71         packet-http.c  \
72         packet-icmpv6.c\
73         packet-icp.c   \
74         packet-icq.c   \
75         packet-igrp.c  \
76         packet-imap.c   \
77         packet-ip.c    \
78         packet-ipp.c   \
79         packet-ipsec.c \
80         packet-ipv6.c  \
81         packet-ipx.c   \
82         packet-irc.c   \
83         packet-ieee80211.c \
84         packet-isakmp.c\
85         packet-isis.c  \
86         packet-isis-clv.c \
87         packet-isis-hello.c \
88         packet-isis-lsp.c \
89         packet-isis-snp.c \
90         packet-isl.c   \
91         packet-kerberos.c \
92         packet-l2tp.c  \
93         packet-lapb.c  \
94         packet-lapbether.c \
95         packet-lapd.c  \
96         packet-ldap.c  \
97         packet-ldp.c   \
98         packet-llc.c   \
99         packet-lpd.c   \
100         packet-mapi.c  \
101         packet-mip.c  \
102         packet-mount.c \
103         packet-mpls.c \
104         packet-msproxy.c \
105         packet-nbipx.c \
106         packet-nbns.c  \
107         packet-ncp.c   \
108         packet-ncp2222.c   \
109         packet-netbios.c \
110         packet-nfs.c   \
111         packet-nlm.c   \
112         packet-nntp.c  \
113         packet-ntp.c  \
114         packet-null.c  \
115         packet-osi.c   \
116         packet-osi-options.c \
117         packet-ospf.c  \
118         packet-pim.c   \
119         packet-pop.c   \
120         packet-portmap.c   \
121         packet-ppp.c   \
122         packet-pppoe.c \
123         packet-pptp.c  \
124         packet-q2931.c \
125         packet-q931.c  \
126         packet-quake.c \
127         packet-radius.c\
128         packet-raw.c   \
129         packet-rip.c   \
130         packet-ripng.c \
131         packet-rlogin.c \
132         packet-rpc.c   \
133         packet-rsh.c   \
134         packet-rsvp.c  \
135         packet-rtcp.c  \
136         packet-rtp.c   \
137         packet-rtsp.c  \
138         packet-rx.c  \
139         packet-sap.c   \
140         packet-sctp.c   \
141         packet-sdp.c   \
142         packet-sip.c   \
143         packet-sll.c   \
144         packet-smb.c   \
145         packet-smb-browse.c \
146         packet-smb-common.c \
147         packet-smb-logon.c \
148         packet-smb-mailslot.c \
149         packet-smb-pipe.c \
150         packet-smtp.c \
151         packet-sna.c   \
152         packet-snmp.c   \
153         packet-socks.c \
154         packet-srvloc.c \
155         packet-sscop.c \
156         packet-stat.c   \
157         packet-syslog.c \
158         packet-tacacs.c \
159         packet-tcp.c   \
160         packet-telnet.c\
161         packet-tftp.c  \
162         packet-time.c  \
163         packet-tns.c \
164         packet-tpkt.c  \
165         packet-tr.c    \
166         packet-trmac.c \
167         packet-udp.c   \
168         packet-v120.c \
169         packet-vines.c \
170         packet-vlan.c \
171         packet-vrrp.c \
172         packet-vtp.c  \
173         packet-wccp.c \
174         packet-who.c  \
175         packet-wsp.c \
176         packet-wtp.c \
177         packet-x11.c   \
178         packet-x25.c   \
179         packet-xot.c   \
180         packet-yhoo.c  \
181         packet-ypbind.c \
182         packet-ypserv.c \
183         packet-ypxfr.c \
184         packet-zebra.c
185
186 noinst_HEADERS = \
187         packet-afs.h   \
188         packet-afs-macros.h \
189         packet-afs-register-info.h \
190         packet-afs-defs.h \
191         packet-arp.h   \
192         packet-atalk.h \
193         packet-bgp.h   \
194         packet-bootparams.h \
195         packet-clip.h  \
196         packet-ddtp.h  \
197         packet-diameter.h \
198         packet-diameter-defs.h \
199         packet-dns.h   \
200         packet-esis.h  \
201         packet-eth.h   \
202         packet-fddi.h  \
203         packet-frame.h  \
204         packet-gvrp.h  \
205         packet-h261.h  \
206         packet-http.h  \
207         packet-ieee80211.h \
208         packet-ip.h    \
209         packet-ipsec.h \
210         packet-ipv6.h  \
211         packet-ipx.h   \
212         packet-isis.h  \
213         packet-isis-clv.h \
214         packet-isis-hello.h \
215         packet-isis-lsp.h \
216         packet-isis-snp.h \
217         packet-isl.h   \
218         packet-ldap.h  \
219         packet-llc.h   \
220         packet-mount.h \
221         packet-ncp-int.h \
222         packet-netbios.h \
223         packet-nfs.h   \
224         packet-nlm.h   \
225         packet-ntp.h  \
226         packet-null.h  \
227         packet-osi.h   \
228         packet-osi-options.h \
229         packet-portmap.h   \
230         packet-ppp.h   \
231         packet-q2931.h \
232         packet-q931.h  \
233         packet-raw.h   \
234         packet-ripng.h \
235         packet-rpc.h   \
236         packet-rtcp.h  \
237         packet-rtp.h   \
238         packet-rx.h  \
239         packet-smb.h   \
240         packet-smb-common.h \
241         packet-sna.h   \
242         packet-snmp.h   \
243         packet-sscop.h \
244         packet-stat.h   \
245         packet-tcp.h   \
246         packet-tns.h \
247         packet-tpkt.h  \
248         packet-tr.h    \
249         packet-trmac.h \
250         packet-udp.h   \
251         packet-vines.h \
252         packet-vlan.h \
253         packet-wap.h \
254         packet-wccp.h \
255         packet-wsp.h \
256         packet-wtp.h \
257         packet-x11-declarations.h       \
258         packet-x11-register-info.h      \
259         packet-x11-keysym.h     \
260         packet-x25.h   \
261         packet-yhoo.h  \
262         packet-ypbind.h \
263         packet-ypserv.h \
264         packet-ypxfr.h 
265
266 ETHEREAL_COMMON_SOURCES = \
267         aftypes.h      \
268         alignment.h    \
269         asn1.c         \
270         asn1.h         \
271         column.c       \
272         column.h       \
273         color.h        \
274         etypes.h       \
275         follow.c       \
276         follow.h       \
277         in_cksum.c     \
278         in_cksum.h     \
279         ipproto.c      \
280         llcsaps.h      \
281         nlpid.h        \
282         oui.h          \
283         ppptypes.h     \
284         prefs.c        \
285         prefs.h        \
286         prefs-int.h    \
287         print.c        \
288         print.h        \
289         ps.c           \
290         ps.h           \
291         ptvcursor.c     \
292         ptvcursor.h     \
293         register.c     \
294         register.h     \
295         smb.h          \
296         timestamp.h    \
297         util.c         \
298         util.h         \
299         xdlc.c         \
300         xdlc.h
301
302 ethereal_SOURCES = \
303         $(DISSECTOR_SOURCES) \
304         $(ETHEREAL_COMMON_SOURCES) \
305         capture.c      \
306         capture.h      \
307         file.c         \
308         file.h         \
309         globals.h      \
310         menu.h         \
311         simple_dialog.h \
312         summary.c      \
313         summary.h      \
314         ui_util.h
315
316 ethereal_static_SOURCES = \
317         $(ethereal_SOURCES)
318
319 EXTRA_ethereal_SOURCES = \
320         snprintf.c      \
321         snprintf.h      \
322         snprintf-imp.h  \
323         strerror.c      \
324         strerror.h      \
325         strcasecmp.c    \
326         strncasecmp.c   \
327         mkstemp.c       \
328         mkstemp.h
329
330 # Optional objects that I know how to build. These will be
331 # linked into the ethereal executable.
332 # They will also be linked into the tethereal executable; if this
333 # list ever grows to include something that can't be linked with
334 # tethereal, or if tethereal needs something that ethereal doesn't,
335 # we should probably split this into stuff needed both
336 # by ethereal and tethereal and stuff needed only by one or the
337 # other.
338 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
339         @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@
340
341 # Additional libs that I know how to build. These will be
342 # linked into the ethereal executable.
343 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a epan/libethereal.a
344
345 # This is the automake dependency variable for the executable
346 ethereal_DEPENDENCIES = \
347         $(ethereal_optional_objects)    \
348         $(ethereal_additional_libs)     \
349         plugins/gryphon/gryphon.la \
350         plugins/mgcp/mgcp.la
351
352 ethereal_static_DEPENDENCIES = \
353         $(ethereal_optional_objects)    \
354         $(ethereal_additional_libs)
355
356 # This automake variable adds to the link-line for the executable.
357 #
358 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
359 # they are included in @GTK_LIBS@, and doesn't have to be linked with
360 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
361 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
362 # applications are X applications).
363 ethereal_LDADD = \
364         $(ethereal_optional_objects)    \
365         $(ethereal_additional_libs)     \
366         @SNMP_LIBS@                     \
367         "-dlopen" self  \
368         "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@ \
369         "-dlopen" plugins/mgcp/mgcp.la @PCAP_LIBS@ @GTK_LIBS@
370
371 ethereal_static_LDADD = \
372         $(ethereal_optional_objects)    \
373         $(ethereal_additional_libs) \
374         @SNMP_LIBS@                     \
375         @PCAP_LIBS@ @GTK_LIBS@
376
377 ethereal_LDFLAGS = -export-dynamic
378 ethereal_static_LDFLAGS = -Wl,-static
379
380 tethereal_SOURCES = \
381         $(DISSECTOR_SOURCES) \
382         $(ETHEREAL_COMMON_SOURCES) \
383         tethereal.c
384
385 tethereal_static_SOURCES = \
386         $(tethereal_SOURCES)
387
388 # Additional libs that I know how to build. These will be
389 # linked into the tethereal executable.
390 tethereal_additional_libs = wiretap/libwiretap.a epan/libethereal.a
391
392 # This is the automake dependency variable for the executable
393 tethereal_DEPENDENCIES = \
394         $(ethereal_optional_objects)    \
395         $(tethereal_additional_libs)    \
396         plugins/gryphon/gryphon.la      \
397         plugins/mgcp/mgcp.la
398
399 tethereal_static_DEPENDENCIES = \
400         $(ethereal_optional_objects)    \
401         $(tethereal_additional_libs)    
402
403 # This automake variable adds to the link-line for the executable
404 tethereal_LDADD = wiretap/libwiretap.a  \
405         $(ethereal_optional_objects)    \
406         $(tethereal_additional_libs)    \
407         @SNMP_LIBS@                     \
408         "-dlopen" self  \
409         "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
410         "-dlopen" plugins/mgcp/mgcp.la @GLIB_LIBS@ -lm \
411         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
412
413 tethereal_static_LDADD = wiretap/libwiretap.a   \
414         $(ethereal_optional_objects)    \
415         $(tethereal_additional_libs)    \
416         @SNMP_LIBS@                     \
417         @GLIB_LIBS@ -lm \
418         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
419
420 tethereal_LDFLAGS = -export-dynamic
421 tethereal_static_LDFLAGS = -Wl,-static
422
423 editcap_SOURCES = editcap.c
424
425 # This is the automake dependency variable for the executable
426 editcap_DEPENDENCIES = wiretap/libwiretap.a
427
428 # This automake variable adds to the link-line for the executable
429 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
430
431 #
432 # Build "register.c", which contains a function "register_all_protocols()"
433 # that calls the register routines for all protocols.
434 #
435 # We do this by grepping through sources.  If that turns out to be too slow,
436 # maybe we could just require every .o file to have an register routine
437 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
438 #
439 # Formatting conventions:  The name of the proto_register_* routines must
440 # start in column zero, or must be preceded only by "void " starting in
441 # column zero, and must not be inside #if.
442 #
443 # We assume that all dissector routines are in "packet-XXX.c" files.
444 #
445 # For some unknown reason, having a big "for" loop in the Makefile
446 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
447 # they seem to pass only the first few names in the list to the shell,
448 # for some reason.
449 #
450 # Therefore, we have a script to generate the "register.c" file.
451 #
452 # The first argument is the directory in which the source files live.
453 # All subsequent arguments are the files to scan.
454 #
455 register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
456         @echo Making register.c
457         @$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
458
459 ps.c: print.ps rdps
460         ./rdps $(srcdir)/print.ps ps.c
461
462 rdps: rdps.c
463         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
464
465 randpkt.o: randpkt.c
466         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
467
468 randpkt: randpkt.o wiretap/libwiretap.a
469         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
470
471 DISTCLEANFILES =        \
472         register.c      \
473         rdps            \
474         ps.c            \
475         *~
476
477 EXTRA_DIST = \
478         aclocal-flags           \
479         config.h.win32          \
480         config.nmake            \
481         debian/README.debian    \
482         debian/changelog        \
483         debian/control          \
484         debian/copyright        \
485         debian/dirs             \
486         debian/docs             \
487         debian/menu             \
488         debian/postinst         \
489         debian/prerm            \
490         debian/rules            \
491         doc/README.developer    \
492         doc/Makefile.in         \
493         doc/Makefile.am         \
494         doc/README.regression   \
495         doc/README.tvbuff       \
496         doc/dfilter2pod.pl      \
497         doc/editcap.pod         \
498         doc/ethereal.pod.template \
499         doc/randpkt.txt         \
500         doc/tethereal.pod.template \
501         editcap.c               \
502         getopt.c                \
503         getopt.h                \
504         ieee-float.h            \
505         image/editcap.rc        \
506         image/ethereal48x48-trans.png  \
507         image/ethereal48x48.png \
508         image/ethereal.ico      \
509         image/ethereal.rc       \
510         image/icon-excl.xpm     \
511         image/icon-ethereal.xpm \
512         image/tethereal.rc      \
513         INSTALL.configure       \
514         libpcap-0.4.HPUX.HPUXPAC.patch \
515         libpcap-0.4.HPUX.LBL.patch \
516         libpcap-0.5.HPUX.tcpdump.org.patch \
517         Makefile.nmake          \
518         make-reg-dotc           \
519         manuf                   \
520         ncp2222.py              \
521         packet-ncp2222.inc      \
522         print.ps                \
523         README.aix              \
524         README.bsd              \
525         README.hpux             \
526         README.irix             \
527         README.linux            \
528         README.tru64            \
529         README.vmware           \
530         README.win32            \
531         randpkt.c               \
532         rdps.c                  \
533         TODO
534
535 if SETUID_INSTALL
536 install-exec-hook:
537         -chmod +s $(DESTDIR)$(bindir)/ethereal
538         -chmod +s $(DESTDIR)$(bindir)/tethereal
539         -chmod +s $(DESTDIR)$(bindir)/ethereal_static
540 else
541 install-exec-hook:
542 endif
543
544 #
545 # Currently register.c can be included in the distribution because
546 # we always build all protocol dissectors. We used to have to check
547 # whether or not to build the snmp dissector. If we again need to
548 # variably build something, making register.c non-portable, uncomment
549 # the dist-hook line below.
550 #
551 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
552 # its contents depend on the configuration, and therefore we want it
553 # to be built when the first "make" is done; however, Automake insists
554 # on putting *all* source into the distribution.
555 #
556 # We work around this by having a "dist-hook" rule that deletes
557 # "register.c", so that "dist" won't pick it up.
558 #
559 #dist-hook:
560 #       @rm -f $(distdir)/register.c
561
562 SUBDIRS = wiretap epan plugins packaging @ethereal_SUBDIRS@
563
564 ethereal.1: ethereal doc/ethereal.pod.template
565         (cd doc ; \
566         $(MAKE) ../ethereal.1 )
567
568 tethereal.1: tethereal doc/tethereal.pod.template
569         (cd doc ; \
570         $(MAKE) ../tethereal.1 )
571
572 editcap.1: doc/editcap.pod
573         (cd doc ; \
574         $(MAKE) ../editcap.1 )
575
576 packet-ncp2222.c : ncp2222.py
577         $(PYTHON) $(srcdir)/ncp2222.py > $@
578
579 libtool: $(LIBTOOL_DEPS)
580         $(SHELL) ./config.status --recheck
581
582 # We load top_stagedir with an explicit path so that libtool doesn't freak.
583 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
584 stagedir=$(top_stagedir)/$(PACKAGE).stage
585 host_cpu=@host_cpu@
586 host_os=@host_os@
587
588 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
589         if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
590                 rm -rf $(stagedir) ; \
591                 $(MAKE) DESTDIR=$(stagedir) install-strip; \
592                 $(srcdir)/packaging/svr4/mkpkg \
593                         $(PACKAGE) \
594                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
595                         $(prefix) \
596                         $(top_stagedir) ; \
597         else \
598                 echo "Error: SVR4 packaging tools not found." ; \
599                 echo "Package build abandoned." ; \
600         fi
601
602 solaris-package: svr4-package
603
604 specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
605
606 rpm-package: dist
607         if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
608                 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
609                 rpm -bb --clean --rmsource $(specfile) ; \
610         else \
611                 echo "Error: RPM executable and/or source directory not found." ; \
612                 echo "Package build abandoned." ; \
613         fi
614
615 srpm-package: dist
616         if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
617                 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
618                 rpm -bs --clean --rmsource $(specfile) ; \
619         else \
620                 echo "Error: RPM executable and/or source directory not found." ; \
621                 echo "Package build abandoned." ; \
622         fi
623
624 debian-package: debian/rules
625         dpkg-buildpackage -rfakeroot -us -uc
626
627 clean-local:
628         rm -rf $(top_stagedir)