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