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