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