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