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