Include "conversation.h", as the plugin API now includes the routines to
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.374 2001/11/03 01:56:10 guy Exp $
5 #
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@ethereal.com>
8 # Copyright 1998 Gerald Combs
9
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
25
26 #
27 # This is a hideous hack.
28 #
29 # Automake needs to know into which sections to install various man
30 # pages; if the names in "man_MANS" have suffixes, it can infer the
31 # sections from the name (e.g., "hello.1" goes in section 1), but if
32 # they don't have suffixes, it can't tell what sections to put them, and
33 # it just gives up and doesn't create any rules to install them (and it
34 # gives up silently, so you have no clue what's wrong).
35 #
36 # Therefore, we can't just set "man_MANS" to a list of variables to be
37 # filled in by the configure script, as those variables don't have man
38 # page section numbers.
39 #
40 # It turns out (although this is not documented anywhere I could find
41 # in the automake Info file) that if you define, instead, variables with
42 # names like "man{section}_MANS", automake will infer that the names in
43 # those variables are the names of man pages to be installed in section
44 # "{section}".
45 #
46 # So, as all our man pages go in section 1, we define "man1_MANS" to
47 # contain all the man page.
48 #
49 # *However*, if "man_MANS" isn't defined at all, automake concludes that
50 # there are no man pages, the fact that, say, "man1_MANS" is defined
51 # nonwithstanding!  (I suspect this is the result of a mistaken attempt
52 # to get people to fix their automake files not to use "MANS"; if "MANS"
53 # is defined, it prints a warning and sets the exit status, but doesn't
54 # exit, and then it just gives up if "man_MANS" isn't defined,
55 # presumably on the theory that the only reason it wouldn't be defined
56 # is because the automake file uses the obsolete "MANS" variable instead
57 # of the shiny new "man_MANS" variable.)
58 #
59 # So we also define "man_MANS", but don't define it as anything;
60 # automake will arrange that the Makefile define it as the union of all
61 # the "man{section}_MANS" variables.
62 #
63 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
66 man_MANS = 
67
68 EXTRA_PROGRAMS = ethereal ethereal_static tethereal tethereal_static editcap mergecap dftest text2pcap
69 EXTRA_SCRIPTS = idl2eth
70
71 sysconf_DATA = manuf dictionary.dtd dictionary.xml mobileipv4.xml \
72         nasreq.xml sunping.xml
73
74 DISSECTOR_SRC = \
75         packet-aarp.c  \
76         packet-afs.c   \
77         packet-aim.c   \
78         packet-arp.c   \
79         packet-ascend.c\
80         packet-atalk.c \
81         packet-atm.c   \
82         packet-auto_rp.c   \
83         packet-bacapp.c   \
84         packet-bacnet.c   \
85         packet-bgp.c   \
86         packet-bootp.c \
87         packet-bootparams.c \
88         packet-bpdu.c  \
89         packet-bvlc.c \
90         packet-bxxp.c \
91         packet-cdp.c   \
92         packet-cgmp.c  \
93         packet-chdlc.c  \
94         packet-clip.c  \
95         packet-clnp.c  \
96         packet-cops.c  \
97         packet-cups.c  \
98         packet-data.c  \
99         packet-dcerpc.c  \
100         packet-dcerpc-conv.c  \
101         packet-dcerpc-epm.c  \
102         packet-dcerpc-mgmt.c  \
103         packet-dcerpc-remact.c  \
104         packet-dcerpc-oxid.c  \
105         packet-ddtp.c  \
106         packet-dec-bpdu.c \
107         packet-diameter.c \
108         packet-dns.c   \
109         packet-dsi.c   \
110         packet-dvmrp.c \
111         packet-eigrp.c \
112         packet-esis.c  \
113         packet-eth.c   \
114         packet-ethertype.c   \
115         packet-fddi.c  \
116         packet-fr.c    \
117         packet-frame.c  \
118         packet-ftp.c   \
119         packet-giop.c  \
120         packet-gmrp.c \
121         packet-gnutella.c \
122         packet-gre.c   \
123         packet-gtp.c   \
124         packet-gvrp.c  \
125         packet-h1.c    \
126         packet-h261.c  \
127         packet-hclnfsd.c  \
128         packet-hsrp.c  \
129         packet-http.c  \
130         packet-icap.c  \
131         packet-icmpv6.c\
132         packet-icp.c   \
133         packet-icq.c   \
134         packet-ieee80211.c \
135         packet-ieee8023.c \
136         packet-igmp.c  \
137         packet-igrp.c  \
138         packet-imap.c   \
139         packet-ip.c    \
140         packet-ipp.c   \
141         packet-ipsec.c \
142         packet-ipv6.c  \
143         packet-ipx.c   \
144         packet-irc.c   \
145         packet-isakmp.c\
146         packet-iscsi.c \
147         packet-isis.c  \
148         packet-isis-clv.c \
149         packet-isis-hello.c \
150         packet-isis-lsp.c \
151         packet-isis-snp.c \
152         packet-isl.c   \
153         packet-isup.c  \
154         packet-iua.c   \
155         packet-kerberos.c \
156         packet-klm.c   \
157         packet-l2tp.c  \
158         packet-lapb.c  \
159         packet-lapbether.c \
160         packet-lapd.c  \
161         packet-ldap.c  \
162         packet-ldp.c   \
163         packet-llc.c   \
164         packet-lmi.c   \
165         packet-lpd.c   \
166         packet-m2pa.c  \
167         packet-m3ua.c  \
168         packet-mapi.c  \
169         packet-mbtcp.c \
170         packet-mip.c  \
171         packet-mmse.c  \
172         packet-mount.c \
173         packet-mpeg1.c  \
174         packet-mpls.c \
175         packet-mrdisc.c \
176         packet-msdp.c  \
177         packet-msnip.c \
178         packet-msproxy.c \
179         packet-mtp3.c \
180         packet-nbipx.c \
181         packet-nbns.c  \
182         packet-ncp.c   \
183         packet-ncp2222.c   \
184         packet-netbios.c \
185         packet-nfs.c   \
186         packet-nisplus.c \
187         packet-nlm.c   \
188         packet-nntp.c  \
189         packet-ntp.c  \
190         packet-null.c  \
191         packet-osi.c   \
192         packet-osi-options.c \
193         packet-ospf.c  \
194         packet-pgm.c   \
195         packet-pim.c   \
196         packet-pop.c   \
197         packet-portmap.c   \
198         packet-ppp.c   \
199         packet-pppoe.c \
200         packet-pptp.c  \
201         packet-q2931.c \
202         packet-q931.c  \
203         packet-quake.c \
204         packet-quakeworld.c \
205         packet-quake2.c \
206         packet-quake3.c \
207         packet-radius.c\
208         packet-ranap.c \
209         packet-raw.c   \
210         packet-rip.c   \
211         packet-ripng.c \
212         packet-rlogin.c \
213         packet-rpc.c   \
214         packet-rquota.c \
215         packet-rsh.c   \
216         packet-rsvp.c  \
217         packet-rtcp.c  \
218         packet-rtp.c   \
219         packet-rtsp.c  \
220         packet-rwall.c \
221         packet-rx.c  \
222         packet-sap.c   \
223         packet-sctp.c   \
224         packet-sdp.c   \
225         packet-sip.c   \
226         packet-skinny.c   \
227         packet-sll.c   \
228         packet-smb.c   \
229         packet-smb-browse.c \
230         packet-smb-common.c \
231         packet-smb-logon.c \
232         packet-smb-mailslot.c \
233         packet-smb-pipe.c \
234         packet-smtp.c \
235         packet-sna.c   \
236         packet-snmp.c   \
237         packet-socks.c \
238         packet-spray.c \
239         packet-srvloc.c \
240         packet-sscop.c \
241         packet-ssl.c   \
242         packet-stat.c   \
243         packet-stat-notify.c \
244         packet-sual.c   \
245         packet-syslog.c \
246         packet-tacacs.c \
247         packet-tcp.c   \
248         packet-telnet.c\
249         packet-tftp.c  \
250         packet-time.c  \
251         packet-tns.c \
252         packet-tpkt.c  \
253         packet-tr.c    \
254         packet-trmac.c \
255         packet-ucp.c   \
256         packet-udp.c   \
257         packet-v120.c \
258         packet-vines.c \
259         packet-vlan.c \
260         packet-vrrp.c \
261         packet-vtp.c  \
262         packet-wccp.c \
263         packet-wcp.c \
264         packet-who.c  \
265         packet-wap.c \
266         packet-wtls.c \
267         packet-wsp.c \
268         packet-wtp.c \
269         packet-x11.c   \
270         packet-x25.c   \
271         packet-xot.c   \
272         packet-yhoo.c  \
273         packet-ypbind.c \
274         packet-yppasswd.c \
275         packet-ypserv.c \
276         packet-ypxfr.c \
277         packet-zebra.c
278
279 if HAVE_PLUGINS
280 plugin_src = \
281         plugins/gryphon/packet-gryphon.c \
282         plugins/mgcp/packet-mgcp.c \
283         plugins/giop/packet-cosnaming.c \
284         plugins/giop/packet-coseventcomm.c
285
286 plugin_static_ldadd = \
287         plugins/gryphon/packet-gryphon-static.o         \
288         plugins/mgcp/packet-mgcp-static.o               \
289         plugins/giop/packet-cosnaming-static.o          \
290         plugins/giop/packet-coseventcomm-static.o
291
292 plugin_libs = \
293         plugins/gryphon/gryphon.la \
294         plugins/mgcp/mgcp.la \
295         plugins/giop/cosnaming.la \
296         plugins/giop/coseventcomm.la
297
298 plugin_ldadd = \
299         "-dlopen" self  \
300         "-dlopen" plugins/gryphon/gryphon.la \
301         "-dlopen" plugins/mgcp/mgcp.la \
302         "-dlopen" plugins/giop/cosnaming.la \
303         "-dlopen" plugins/giop/coseventcomm.la
304 else
305 plugin_src =
306
307 plugin_static_ldadd =
308
309 plugin_libs =
310
311 plugin_ldadd =
312 endif
313
314 noinst_HEADERS = \
315         packet-afs.h   \
316         packet-afs-macros.h \
317         packet-afs-register-info.h \
318         packet-afs-defs.h \
319         packet-arp.h   \
320         packet-atalk.h \
321         packet-bgp.h   \
322         packet-bootparams.h \
323         packet-chdlc.h \
324         packet-clip.h  \
325         packet-dcerpc.h \
326         packet-ddtp.h  \
327         packet-diameter-defs.h \
328         packet-dns.h   \
329         packet-dvmrp.h \
330         packet-esis.h  \
331         packet-eth.h   \
332         packet-fddi.h  \
333         packet-fr.h    \
334         packet-frame.h  \
335         packet-giop.h  \
336         packet-gnutella.h \
337         packet-hclnfsd.h  \
338         packet-http.h  \
339         packet-ieee80211.h \
340         packet-ieee8023.h \
341         packet-ip.h    \
342         packet-ipsec.h \
343         packet-ipv6.h  \
344         packet-ipx.h   \
345         packet-isis.h  \
346         packet-isis-clv.h \
347         packet-isis-hello.h \
348         packet-isis-lsp.h \
349         packet-isis-snp.h \
350         packet-isl.h   \
351         packet-klm.h   \
352         packet-ldap.h  \
353         packet-llc.h   \
354         packet-mount.h \
355         packet-mrdisc.h \
356         packet-msnip.h \
357         packet-ncp-int.h \
358         packet-netbios.h \
359         packet-nfs.h   \
360         packet-nisplus.h \
361         packet-nlm.h   \
362         packet-ntp.h  \
363         packet-null.h  \
364         packet-osi.h   \
365         packet-osi-options.h \
366         packet-pgm.h   \
367         packet-pim.h   \
368         packet-portmap.h   \
369         packet-ppp.h   \
370         packet-q931.h  \
371         packet-raw.h   \
372         packet-ripng.h \
373         packet-rpc.h   \
374         packet-rquota.h \
375         packet-rtcp.h  \
376         packet-rtp.h   \
377         packet-rwall.h  \
378         packet-rx.h  \
379         packet-sll.h   \
380         packet-smb-browse.h \
381         packet-smb-common.h \
382         packet-smb-logon.h \
383         packet-smb-mailslot.h \
384         packet-smb-pipe.h \
385         packet-sna.h   \
386         packet-snmp.h   \
387         packet-spray.h \
388         packet-stat.h   \
389         packet-stat-notify.h \
390         packet-tcp.h   \
391         packet-tns.h \
392         packet-tpkt.h  \
393         packet-tr.h    \
394         packet-udp.h   \
395         packet-vines.h \
396         packet-vlan.h \
397         packet-wccp.h \
398         packet-wap.h \
399         packet-wtls.h \
400         packet-wtp.h \
401         packet-wsp.h \
402         packet-x11-keysym.h     \
403         packet-yhoo.h  \
404         packet-ypbind.h \
405         packet-yppasswd.h \
406         packet-ypserv.h \
407         packet-ypxfr.h 
408
409 ETHEREAL_COMMON_SRC = \
410         aftypes.h      \
411         alignment.h    \
412         afn.c          \
413         afn.h          \
414         asn1.c         \
415         asn1.h         \
416         bridged_pids.h \
417         column.c       \
418         column.h       \
419         color.h        \
420         etypes.h       \
421         follow.c       \
422         follow.h       \
423         greproto.h     \
424         in_cksum.c     \
425         in_cksum.h     \
426         int-64bit.c     \
427         int-64bit.h     \
428         ipproto.c      \
429         ipproto.h      \
430         llcsaps.h      \
431         nlpid.h        \
432         oui.h          \
433         ppptypes.h     \
434         prefs.c        \
435         prefs.h        \
436         prefs-int.h    \
437         print.c        \
438         print.h        \
439         ps.c           \
440         ps.h           \
441         ptvcursor.c     \
442         ptvcursor.h     \
443         reassemble.c   \
444         reassemble.h   \
445         register.h     \
446         smb.h          \
447         util.c         \
448         util.h         \
449         x11-declarations.h \
450         x11-register-info.h \
451         xdlc.c         \
452         xdlc.h         \
453         xmlstub.c      \
454         xmlstub.h
455
456 BUILT_SOURCES = \
457         x11-declarations.h \
458         x11-register-info.h
459
460 ethereal_SOURCES = \
461         $(DISSECTOR_SRC) \
462         $(ETHEREAL_COMMON_SRC) \
463         register.c     \
464         capture.c      \
465         capture.h      \
466         file.c         \
467         file.h         \
468         filters.c      \
469         filters.h      \
470         globals.h      \
471         menu.h         \
472         progress_dlg.h \
473         proto_hier_stats.h      \
474         proto_hier_stats.c      \
475         simple_dialog.h \
476         statusbar.h    \
477         summary.c      \
478         summary.h      \
479         ui_util.h
480
481 ethereal_static_SOURCES = \
482         $(DISSECTOR_SRC) \
483         $(ETHEREAL_COMMON_SRC) \
484         register-static.c     \
485         capture.c      \
486         capture.h      \
487         file.c         \
488         file.h         \
489         filters.c      \
490         filters.h      \
491         globals.h      \
492         menu.h         \
493         progress_dlg.h \
494         proto_hier_stats.h      \
495         proto_hier_stats.c      \
496         simple_dialog.h \
497         statusbar.h    \
498         summary.c      \
499         summary.h      \
500         ui_util.h       
501
502 EXTRA_ethereal_SOURCES = \
503         snprintf.c      \
504         snprintf.h      \
505         snprintf-imp.h  \
506         strerror.c      \
507         strerror.h      \
508         strcasecmp.c    \
509         strncasecmp.c   \
510         mkstemp.c       \
511         mkstemp.h       \
512         strptime.c      \
513         strptime.h
514
515 # Optional objects that I know how to build. These will be
516 # linked into the ethereal executable.
517 # They will also be linked into the tethereal executable; if this
518 # list ever grows to include something that can't be linked with
519 # tethereal, or if tethereal needs something that ethereal doesn't,
520 # we should probably split this into stuff needed both
521 # by ethereal and tethereal and stuff needed only by one or the
522 # other.
523 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
524         @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
525
526 # Additional libs that I know how to build. These will be
527 # linked into the ethereal executable.
528 ethereal_additional_libs = \
529         wiretap/libwiretap.a    \
530         gtk/libui.a             \
531         epan/libethereal.a      \
532         epan/ftypes/libftypes.a \
533         epan/dfilter/libdfilter.a
534
535 # This is the automake dependency variable for the executable
536 ethereal_DEPENDENCIES = \
537         $(ethereal_optional_objects)    \
538         $(ethereal_additional_libs)     \
539         $(plugin_libs)
540
541 ethereal_static_DEPENDENCIES = \
542         $(ethereal_optional_objects)    \
543         $(ethereal_additional_libs)
544
545 # This automake variable adds to the link-line for the executable.
546 #
547 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
548 # they are included in @GTK_LIBS@, and doesn't have to be linked with
549 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
550 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
551 # applications are X applications).
552 ethereal_LDADD = \
553         $(ethereal_optional_objects)    \
554         $(ethereal_additional_libs)     \
555         @SNMP_LIBS@ @SSL_LIBS@          \
556         $(plugin_ldadd)                 \
557         @PCAP_LIBS@ @GTK_LIBS@
558
559 ethereal_static_LDADD = \
560         "-all-static"                   \
561         $(plugin_static_ldadd)          \
562         $(ethereal_optional_objects)    \
563         $(ethereal_additional_libs)     \
564         @SNMP_LIBS@ @SSL_LIBS@          \
565         @PCAP_LIBS@ @GTK_LIBS@          
566
567 ethereal_LDFLAGS = -export-dynamic
568 ethereal_static_LDFLAGS = -Wl,-static
569
570 tethereal_SOURCES = \
571         $(DISSECTOR_SRC) \
572         $(ETHEREAL_COMMON_SRC) \
573         register.c     \
574         tethereal.c
575
576 tethereal_static_SOURCES = \
577         $(DISSECTOR_SRC) \
578         $(ETHEREAL_COMMON_SRC) \
579         register-static.c     \
580         tethereal.c
581
582 # Additional libs that I know how to build. These will be
583 # linked into the tethereal executable.
584 tethereal_additional_libs =             \
585         wiretap/libwiretap.a            \
586         epan/libethereal.a              \
587         epan/ftypes/libftypes.a         \
588         epan/dfilter/libdfilter.a
589
590 # This is the automake dependency variable for the executable
591 tethereal_DEPENDENCIES = \
592         $(ethereal_optional_objects)    \
593         $(tethereal_additional_libs)    \
594         $(plugin_libs)
595
596 tethereal_static_DEPENDENCIES = \
597         $(ethereal_optional_objects)    \
598         $(tethereal_additional_libs)    
599
600 # This automake variable adds to the link-line for the executable
601 tethereal_LDADD = wiretap/libwiretap.a  \
602         $(ethereal_optional_objects)    \
603         $(tethereal_additional_libs)    \
604         @SNMP_LIBS@ @SSL_LIBS@          \
605         $(plugin_ldadd)                 \
606         @GLIB_LIBS@ -lm \
607         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
608
609 tethereal_static_LDADD = \
610         "-all-static"           \
611         $(plugin_static_ldadd)  \
612         wiretap/libwiretap.a    \
613         $(ethereal_optional_objects)    \
614         $(tethereal_additional_libs)    \
615         @SNMP_LIBS@ @SSL_LIBS@          \
616         @GLIB_LIBS@ -lm \
617         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
618
619 tethereal_LDFLAGS = -export-dynamic
620 tethereal_static_LDFLAGS = -Wl,-static
621
622 text2pcap_SOURCES = text2pcap.c text2pcap-scanner.l
623 text2pcap_DEPENDENCIES = text2pcap.h
624
625 mergecap_SOURCES = mergecap.c
626 mergecap_DEPENDENCIES = wiretap/libwiretap.a
627
628 editcap_SOURCES = editcap.c
629
630 # This is the automake dependency variable for the executable
631 editcap_DEPENDENCIES = wiretap/libwiretap.a
632
633 # This automake variable adds to the link-line for the executable
634 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
635 mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
636
637 #
638 # Build various header files for the X11 dissector.
639 #
640 x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
641         $(PERL) $(srcdir)/process-x11-fields.pl <$(srcdir)/x11-fields
642
643 #
644 # Build shell scripts by doing variable substitution.
645 # Taken from autoconf 2.13.
646 #
647 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
648
649 SUFFIXES = .sh
650 .sh:
651         rm -f $@ $@.tmp
652         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
653
654 #
655 # Build "register.c", which contains a function "register_all_protocols()"
656 # that calls the register routines for all protocols.
657 #
658 # We do this by grepping through sources.  If that turns out to be too slow,
659 # maybe we could just require every .o file to have an register routine
660 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
661 #
662 # Formatting conventions:  The name of the proto_register_* routines must
663 # start in column zero, or must be preceded only by "void " starting in
664 # column zero, and must not be inside #if.
665 #
666 # We assume that all dissector routines are in "packet-XXX.c" files.
667 #
668 # For some unknown reason, having a big "for" loop in the Makefile
669 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
670 # they seem to pass only the first few names in the list to the shell,
671 # for some reason.
672 #
673 # Therefore, we have a script to generate the "register.c" file.
674 #
675 # The first argument is the directory in which the source files live.
676 # All subsequent arguments are the files to scan.
677 #
678 register.c: $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
679         @echo Making register.c
680         @$(srcdir)/make-reg-dotc register.c $(srcdir) $(DISSECTOR_SRC)
681
682 register-static.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
683         @echo Making register-static.c
684         @$(srcdir)/make-reg-dotc register-static.c $(srcdir) $(plugin_src) $(DISSECTOR_SRC)
685
686 ps.c: print.ps rdps
687         ./rdps $(srcdir)/print.ps ps.c
688
689 rdps: rdps.c
690         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
691
692 randpkt.o: randpkt.c
693         $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
694
695 randpkt: randpkt.o wiretap/libwiretap.a
696         $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
697
698
699 dftest_SOURCES = \
700         $(DISSECTOR_SRC) \
701         $(ETHEREAL_COMMON_SRC) \
702         register.c     \
703         dftest.c
704
705 dftest_additional_libs =                \
706         epan/libethereal.a              \
707         epan/ftypes/libftypes.a         \
708         epan/dfilter/libdfilter.a
709
710 dftest_DEPENDENCIES = \
711         $(ethereal_optional_objects)    \
712         $(dftest_additional_libs)       \
713         $(plugin_libs)
714
715 # This automake variable adds to the link-line for the executable
716 dftest_LDADD = \
717         $(ethereal_optional_objects)    \
718         $(dftest_additional_libs)       \
719         @SNMP_LIBS@ @SSL_LIBS@          \
720         $(plugin_ldadd)                 \
721         @GLIB_LIBS@ -lm \
722         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
723
724 dftest_LDFLAGS = -export-dynamic
725
726 CLEANFILES =    \
727         idl2eth
728
729 DISTCLEANFILES =        \
730         register.c      \
731         register-static.c \
732         rdps            \
733         ps.c            \
734         *~
735
736 EXTRA_DIST = \
737         aclocal-flags           \
738         capture-wpcap.c         \
739         capture-wpcap.h         \
740         cleanbld.bat            \
741         config.h.win32          \
742         config.nmake            \
743         debian/README.debian    \
744         debian/changelog        \
745         debian/control          \
746         debian/copyright        \
747         debian/dirs             \
748         debian/docs             \
749         debian/menu             \
750         debian/postinst         \
751         debian/prerm            \
752         debian/rules            \
753         doc/Makefile.am         \
754         doc/Makefile.nmake      \
755         doc/README.design       \
756         doc/README.developer    \
757         doc/README.idl2eth      \
758         doc/README.plugins      \
759         doc/README.regression   \
760         doc/README.tvbuff       \
761         doc/dfilter2pod.pl      \
762         doc/editcap.pod         \
763         doc/ethereal.pod.template \
764         doc/idl2eth.pod         \
765         doc/mergecap.pod        \
766         doc/randpkt.txt         \
767         doc/tethereal.pod.template \
768         doc/text2pcap.pod       \
769         editcap.c               \
770         ethereal_be.py          \
771         ethereal_gen.py         \
772         mergecap.c              \
773         text2pcap.c             \
774         text2pcap.h             \
775         text2pcap-scanner.l     \
776         getopt.c                \
777         getopt.h                \
778         idl2eth.sh              \
779         ieee-float.h            \
780         image/Makefile.nmake    \
781         image/editcap.rc.in     \
782         image/elogo3d48x48.png  \
783         image/ethereal48x48-trans.png  \
784         image/ethereal48x48.png \
785         image/ethereal.ico      \
786         image/ethereal.rc.in    \
787         image/icon-excl.xpm     \
788         image/icon-ethereal.xpm \
789         image/clist_ascend.xpm  \
790         image/clist_descend.xpm \
791         image/mergecap.rc.in    \
792         image/tethereal.rc.in   \
793         image/text2pcap.rc.in   \
794         INSTALL.configure       \
795         Makefile.nmake          \
796         make-manuf              \
797         make-reg-dotc           \
798         make-reg-dotc.py        \
799         manuf                   \
800         manuf.tmpl              \
801         ncp2222.py              \
802         packet-ncp2222.inc      \
803         print.ps                \
804         process-x11-fields.pl   \
805         README.aix              \
806         README.bsd              \
807         README.hpux             \
808         README.irix             \
809         README.linux            \
810         README.tru64            \
811         README.vmware           \
812         README.win32            \
813         randpkt.c               \
814         rdps.c                  \
815         TODO                    \
816         dictionary.dtd          \
817         dictionary.xml          \
818         mobileipv4.xml          \
819         nasreq.xml              \
820         sunping.xml             \
821         x11-fields
822
823 if SETUID_INSTALL
824 install-exec-hook:
825         -chmod +s $(DESTDIR)$(bindir)/ethereal
826         -chmod +s $(DESTDIR)$(bindir)/tethereal
827         -chmod +s $(DESTDIR)$(bindir)/ethereal_static
828 else
829 install-exec-hook:
830 endif
831
832 #
833 # Currently register.c can be included in the distribution because
834 # we always build all protocol dissectors. We used to have to check
835 # whether or not to build the snmp dissector. If we again need to
836 # variably build something, making register.c non-portable, uncomment
837 # the dist-hook line below.
838 #
839 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
840 # its contents depend on the configuration, and therefore we want it
841 # to be built when the first "make" is done; however, Automake insists
842 # on putting *all* source into the distribution.
843 #
844 # We work around this by having a "dist-hook" rule that deletes
845 # "register.c", so that "dist" won't pick it up.
846 #
847 #dist-hook:
848 #       @rm -f $(distdir)/register.c
849
850 if HAVE_PLUGINS
851 SUBDIRS = tools wiretap doc epan plugins packaging @ethereal_SUBDIRS@
852 else
853 SUBDIRS = tools wiretap doc epan packaging @ethereal_SUBDIRS@
854 endif
855
856 ethereal.1: ethereal doc/ethereal.pod.template
857         (cd doc ; \
858         $(MAKE) ../ethereal.1 )
859
860 tethereal.1: tethereal doc/tethereal.pod.template
861         (cd doc ; \
862         $(MAKE) ../tethereal.1 )
863
864 editcap.1: doc/editcap.pod
865         (cd doc ; \
866         $(MAKE) ../editcap.1 )
867
868 idl2eth.1: doc/idl2eth.pod
869         (cd doc ; \
870         $(MAKE) ../idl2eth.1 )
871
872 mergecap.1: doc/mergecap.pod
873         (cd doc ; \
874         $(MAKE) ../mergecap.1 )
875
876 text2pcap.1: doc/text2pcap.pod
877         (cd doc ; \
878         $(MAKE) ../text2pcap.1 )
879
880 packet-ncp2222.c : ncp2222.py
881         $(PYTHON) $(srcdir)/ncp2222.py > $@
882
883 libtool: $(LIBTOOL_DEPS)
884         $(SHELL) ./config.status --recheck
885
886 # We load top_stagedir with an explicit path so that libtool doesn't freak.
887 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
888 stagedir=$(top_stagedir)/$(PACKAGE).stage
889 host_cpu=@host_cpu@
890 host_os=@host_os@
891
892 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
893         if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
894                 rm -rf $(stagedir) ; \
895                 $(MAKE) DESTDIR=$(stagedir) install-strip; \
896                 $(srcdir)/packaging/svr4/mkpkg \
897                         $(PACKAGE) \
898                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
899                         $(prefix) \
900                         $(top_stagedir) ; \
901         else \
902                 echo "Error: SVR4 packaging tools not found." ; \
903                 echo "Package build abandoned." ; \
904         fi
905
906 solaris-package: svr4-package
907
908 specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
909
910 rpm-package: dist
911         if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
912                 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
913                 rpm -bb --clean --rmsource $(specfile) ; \
914         else \
915                 echo "Error: RPM executable and/or source directory not found." ; \
916                 echo "Package build abandoned." ; \
917         fi
918
919 srpm-package: dist
920         if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
921                 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
922                 rpm -bs --clean --rmsource $(specfile) ; \
923         else \
924                 echo "Error: RPM executable and/or source directory not found." ; \
925                 echo "Package build abandoned." ; \
926         fi
927
928 debian-package: debian/rules
929         dpkg-buildpackage -rfakeroot -us -uc
930
931 clean-local:
932         rm -rf $(top_stagedir)