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