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