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