2 # Automake file for Ethereal
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@ethereal.com>
8 # Copyright 1998 Gerald Combs
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.
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.
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.
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
27 # This is a hideous hack.
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).
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.
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
46 # So, as all our man pages go in section 1, we define "man1_MANS" to
47 # contain all the man page.
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.)
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.
63 bin_PROGRAMS = @ethereal_bin@ @capinfos_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_man@ @capinfos_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
66 man4_MANS = @etherealfilter_man@
69 EXTRA_PROGRAMS = ethereal tethereal capinfos editcap mergecap dftest \
71 EXTRA_SCRIPTS = idl2eth
74 # Ethereal configuration files are put in $(pkgdatadir). It currently
75 # contains the "AUTHORS-SHORT" and "manuf" files and a "diameter" directory.
77 pkgdata_DATA = AUTHORS-SHORT manuf ethereal.html tethereal.html \
78 ethereal-filter.html capinfos.html editcap.html \
79 idl2eth.html mergecap.html text2pcap.html
82 # Install the Diameter DTD and XML files in the "diameter" subdirectory
85 diameterdir = $(pkgdatadir)/diameter
86 diameter_DATA = dictionary.dtd dictionary.xml imscxdx.xml mobileipv4.xml \
87 nasreq.xml sunping.xml
89 PLATFORM_SRC = pcap-util-unix.c
91 include Makefile.common
96 plugins/artnet/artnet.la \
97 plugins/asn1/asn1.la \
98 plugins/ciscosm/ciscosm.la \
99 plugins/docsis/docsis.la \
100 plugins/enttec/enttec.la \
101 plugins/giop/cosnaming.la \
102 plugins/giop/coseventcomm.la \
103 plugins/gryphon/gryphon.la \
104 plugins/irda/irda.la \
105 plugins/lwres/lwres.la \
106 plugins/megaco/megaco.la \
107 plugins/mgcp/mgcp.la \
108 plugins/opsi/opsi.la \
109 plugins/pcli/pcli.la \
112 plugins/rtnet/rtnet.la \
113 plugins/rudp/rudp.la \
118 plugins/acn/packet-acn.o \
119 plugins/artnet/packet-artnet.o \
120 plugins/asn1/packet-asn1.o \
121 plugins/ciscosm/packet-sm.o \
122 plugins/docsis/packet-bpkmattr.o \
123 plugins/docsis/packet-bpkmreq.o \
124 plugins/docsis/packet-bpkmrsp.o \
125 plugins/docsis/packet-docsis.o \
126 plugins/docsis/packet-dsaack.o \
127 plugins/docsis/packet-dsareq.o \
128 plugins/docsis/packet-dsarsp.o \
129 plugins/docsis/packet-dscack.o \
130 plugins/docsis/packet-dscreq.o \
131 plugins/docsis/packet-dscrsp.o \
132 plugins/docsis/packet-dsdreq.o \
133 plugins/docsis/packet-dsdrsp.o \
134 plugins/docsis/packet-macmgmt.o \
135 plugins/docsis/packet-map.o \
136 plugins/docsis/packet-regack.o \
137 plugins/docsis/packet-regreq.o \
138 plugins/docsis/packet-regrsp.o \
139 plugins/docsis/packet-rngreq.o \
140 plugins/docsis/packet-rngrsp.o \
141 plugins/docsis/packet-tlv.o \
142 plugins/docsis/packet-uccreq.o \
143 plugins/docsis/packet-uccrsp.o \
144 plugins/docsis/packet-ucd.o \
145 plugins/enttec/packet-enttec.o \
146 plugins/giop/packet-cosnaming.o \
147 plugins/giop/packet-coseventcomm.o \
148 plugins/gryphon/packet-gryphon.o \
149 plugins/irda/packet-irda.o \
150 plugins/irda/packet-ircomm.o \
151 plugins/irda/packet-sir.o \
152 plugins/lwres/packet-lwres.o \
153 plugins/megaco/packet-megaco.o \
154 plugins/mgcp/packet-mgcp.o \
155 plugins/opsi/packet-opsi.o \
156 plugins/pcli/packet-pcli.o \
157 plugins/rdm/packet-rdm.o \
158 plugins/rlm/packet-rlm.o \
159 plugins/rtnet/packet-rtnet.o \
160 plugins/rudp/packet-rudp.o \
161 plugins/v5ua/packet-v5ua.o
166 "-dlopen" plugins/acn/acn.la \
167 "-dlopen" plugins/artnet/artnet.la \
168 "-dlopen" plugins/asn1/asn1.la \
169 "-dlopen" plugins/ciscosm/ciscosm.la \
170 "-dlopen" plugins/docsis/docsis.la \
171 "-dlopen" plugins/enttec/enttec.la \
172 "-dlopen" plugins/giop/cosnaming.la \
173 "-dlopen" plugins/giop/coseventcomm.la \
174 "-dlopen" plugins/gryphon/gryphon.la \
175 "-dlopen" plugins/irda/irda.la \
176 "-dlopen" plugins/lwres/lwres.la \
177 "-dlopen" plugins/megaco/megaco.la \
178 "-dlopen" plugins/mgcp/mgcp.la \
179 "-dlopen" plugins/opsi/opsi.la \
180 "-dlopen" plugins/pcli/pcli.la \
181 "-dlopen" plugins/rdm/rdm.la \
182 "-dlopen" plugins/rlm/rlm.la \
183 "-dlopen" plugins/rtnet/rtnet.la \
184 "-dlopen" plugins/rudp/rudp.la \
185 "-dlopen" plugins/v5ua/v5ua.la
187 endif # ENABLE_STATIC
195 # Optional objects that I know how to build. These will be
196 # linked into the ethereal executable.
197 # They will also be linked into the tethereal executable; if this
198 # list ever grows to include something that can't be linked with
199 # tethereal, or if tethereal needs something that ethereal doesn't,
200 # we should probably split this into stuff needed both
201 # by ethereal and tethereal and stuff needed only by one or the
203 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
204 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
206 # Additional libs that I know how to build. These will be
207 # linked into the ethereal executable.
208 ethereal_additional_libs = \
210 wiretap/libwiretap.la \
213 # This is the automake dependency variable for the executable
214 ethereal_DEPENDENCIES = \
215 $(ethereal_optional_objects) \
216 $(ethereal_additional_libs) \
219 # This automake variable adds to the link-line for the executable.
221 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
222 # they are included in @GTK_LIBS@, and doesn't have to be linked with
223 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
224 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
225 # applications are X applications).
228 ethereal_LDFLAGS = -Wl,-static -all-static
230 ethereal_LDFLAGS = -export-dynamic
234 $(ethereal_optional_objects) \
235 $(ethereal_additional_libs) \
236 @SNMP_LIBS@ @SSL_LIBS@ \
239 @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@
241 # Additional libs that I know how to build. These will be
242 # linked into the tethereal executable.
243 tethereal_additional_libs = \
244 wiretap/libwiretap.la \
247 # This is the automake dependency variable for the executable
248 tethereal_DEPENDENCIES = \
249 $(ethereal_optional_objects) \
250 $(tethereal_additional_libs) \
253 # This automake variable adds to the link-line for the executable
255 $(ethereal_optional_objects) \
256 $(tethereal_additional_libs) \
257 @SNMP_LIBS@ @SSL_LIBS@ \
261 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
264 tethereal_LDFLAGS = -Wl,-static -all-static
266 tethereal_LDFLAGS = -export-dynamic
269 # Optional objects that I know how to build, and that are needed by
271 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
273 text2pcap_DEPENDENCIES = text2pcap.h
275 # This automake variable adds to the link-line for the executable
276 text2pcap_LDADD = $(text2pcap_optional_objects) \
279 mergecap_DEPENDENCIES = wiretap/libwiretap.la
281 # This is the automake dependency variable for the executable
282 capinfos_DEPENDENCIES = wiretap/libwiretap.la
283 editcap_DEPENDENCIES = wiretap/libwiretap.la
285 # This automake variable adds to the link-line for the executable
286 capinfos_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
287 editcap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
288 mergecap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
291 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
294 # Build the version string
296 # FORCE is the portable version of .PHONY
300 $(PERL) $(srcdir)/make-version.pl
303 # Build the short version of the authors file for the about dialog
305 AUTHORS-SHORT: AUTHORS make-authors-short.pl
306 $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-short.pl < AUTHORS > AUTHORS-SHORT
309 # Build the short version of the authors file with formatting codes for the
312 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
313 $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
316 # Build shell scripts by doing variable substitution.
317 # Taken from autoconf 2.13.
319 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
324 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
327 # Build "tethereal-tap-register.c", which contains a function
328 # "register_all_tap_listeners()"
329 # that calls the register routines for all tehtereal tap listeners.
331 # We do this by grepping through sources.
333 # Formatting conventions: The name of the tap_listener_register_*
334 # routines must start in column zero, or must be preceded only by
335 # "void " starting in column zero, and must not be inside #if.
337 # The first argument is the directory in which the source files live.
338 # All subsequent arguments are the files to scan.
340 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
341 @echo Making tethereal-tap-register.c
342 @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
345 ./rdps $(srcdir)/print.ps ps.c
348 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
350 randpkt_additional_libs = wiretap/libwiretap.la
352 randpkt_DEPENDENCIES = \
353 $(randpkt_additional_libs)
356 $(randpkt_additional_libs) \
358 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
360 dftest_additional_libs = \
361 wiretap/libwiretap.la \
364 dftest_DEPENDENCIES = \
365 $(ethereal_optional_objects) \
366 $(dftest_additional_libs) \
369 # This automake variable adds to the link-line for the executable
371 $(ethereal_optional_objects) \
372 $(dftest_additional_libs) \
373 @SNMP_LIBS@ @SSL_LIBS@ \
377 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
379 dftest_LDFLAGS = -export-dynamic
390 MAINTAINERCLEANFILES = \
395 AUTHORS-SHORT-FORMAT \
410 aclocal-fallback/glib-2.0.m4 \
411 aclocal-fallback/glib.m4 \
412 aclocal-fallback/gtk-2.0.m4 \
413 aclocal-fallback/gtk.m4 \
422 debian/README.debian \
438 doc/README.developer \
441 doc/README.regression \
444 doc/README.xml-output \
448 doc/ethereal-filter.pod.template \
457 epan/libethereal.def \
464 image/Ethereal.icns \
465 image/Makefile.nmake \
467 image/capinfos.rc.in \
468 image/clist_ascend.xpm \
469 image/clist_descend.xpm \
471 image/editcap.rc.in \
472 image/eexcl3d64.xpm \
473 image/eicon3d16.xpm \
474 image/eicon3d32.xpm \
475 image/eicon3d48.xpm \
476 image/eicon3d64.xpm \
477 image/elogo3d48x48.png \
479 image/ethereal.rc.in \
480 image/ethereal48x48-trans.png \
481 image/ethereal48x48.png \
482 image/hi16-app-ethereal.png \
483 image/hi32-app-ethereal.png \
484 image/hi48-app-ethereal.png \
485 image/icon-ethereal.xpm \
486 image/icon-excl.xpm \
487 image/libethereal.rc.in \
488 image/lo16-app-ethereal.png \
489 image/lo32-app-ethereal.png \
490 image/lo48-app-ethereal.png \
491 image/mergecap.rc.in \
492 image/nsis-checked.bmp \
493 image/nsis-unchecked.bmp \
494 image/stock_dialog_error_48.xpm \
495 image/stock_dialog_warning_48.xpm \
496 image/stock_dialog_question_48.xpm \
497 image/stock_dialog_info_48.xpm \
498 image/tethereal.rc.in \
499 image/text2pcap.rc.in \
500 image/toolbar/capture_24.xpm \
501 image/toolbar/cfilter_24.xpm \
502 image/toolbar/dfilter_24.xpm \
503 image/toolbar/stock_add_24.xpm \
504 image/toolbar/stock_bottom_24.xpm \
505 image/toolbar/stock_close_24.xpm \
506 image/toolbar/stock_colorselector_24.xpm \
507 image/toolbar/stock_help_24.xpm \
508 image/toolbar/stock_jump_to_24.xpm \
509 image/toolbar/stock_left_arrow_24.xpm \
510 image/toolbar/stock_ok_20.xpm \
511 image/toolbar/stock_open_24.xpm \
512 image/toolbar/stock_preferences_24.xpm \
513 image/toolbar/stock_print_24.xpm \
514 image/toolbar/stock_properties_24.xpm \
515 image/toolbar/stock_refresh_24.xpm \
516 image/toolbar/stock_right_arrow_24.xpm \
517 image/toolbar/stock_save_24.xpm \
518 image/toolbar/stock_save_as_24.xpm \
519 image/toolbar/stock_search_24.xpm \
520 image/toolbar/stock_stop_24.xpm \
521 image/toolbar/stock_top_24.xpm \
522 image/toolbar/stock_zoom_1_24.xpm \
523 image/toolbar/stock_zoom_in_24.xpm \
524 image/toolbar/stock_zoom_out_24.xpm \
526 image/icon_layout_1.xpm \
527 image/icon_layout_2.xpm \
528 image/icon_layout_3.xpm \
529 image/icon_layout_4.xpm \
530 image/icon_layout_5.xpm \
531 image/icon_layout_6.xpm \
532 image/wiretap.rc.in \
534 make-authors-format.pl \
535 make-authors-short.pl \
549 text2pcap-scanner.l \
556 -chmod +s $(DESTDIR)$(bindir)/ethereal
557 -chmod +s $(DESTDIR)$(bindir)/tethereal
562 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk help
565 SUBDIRS = tools wiretap doc epan plugins packaging help @ethereal_SUBDIRS@
567 SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
570 ethereal.1: doc/ethereal.pod AUTHORS-SHORT-FORMAT
572 $(MAKE) ../ethereal.1 )
574 tethereal.1: doc/tethereal.pod
576 $(MAKE) ../tethereal.1 )
578 ethereal-filter.4: tethereal doc/ethereal-filter.pod.template
580 $(MAKE) ../ethereal-filter.4 )
582 capinfos.1: doc/capinfos.pod
584 $(MAKE) ../capinfos.1 )
586 editcap.1: doc/editcap.pod
588 $(MAKE) ../editcap.1 )
590 idl2eth.1: doc/idl2eth.pod
592 $(MAKE) ../idl2eth.1 )
594 mergecap.1: doc/mergecap.pod
596 $(MAKE) ../mergecap.1 )
598 text2pcap.1: doc/text2pcap.pod
600 $(MAKE) ../text2pcap.1 )
602 ethereal.html: doc/ethereal.pod AUTHORS-SHORT-FORMAT
604 $(MAKE) ../ethereal.html )
606 tethereal.html: doc/tethereal.pod
608 $(MAKE) ../tethereal.html )
610 ethereal-filter.html: tethereal doc/ethereal-filter.pod.template
612 $(MAKE) ../ethereal-filter.html )
614 capinfos.html: doc/capinfos.pod
616 $(MAKE) ../capinfos.html )
618 editcap.html: doc/editcap.pod
620 $(MAKE) ../editcap.html )
622 idl2eth.html: doc/idl2eth.pod
624 $(MAKE) ../idl2eth.html )
626 mergecap.html: doc/mergecap.pod
628 $(MAKE) ../mergecap.html )
630 text2pcap.html: doc/text2pcap.pod
632 $(MAKE) ../text2pcap.html )
634 libtool: $(LIBTOOL_DEPS)
635 $(SHELL) ./config.status --recheck
637 # We load top_stagedir with an explicit path so that libtool doesn't freak.
638 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
639 stagedir=$(top_stagedir)/$(PACKAGE).stage
643 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
644 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
645 rm -rf $(stagedir) ; \
646 $(MAKE) DESTDIR=$(stagedir) install; \
647 $(srcdir)/packaging/svr4/mkpkg \
649 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
653 echo "Error: SVR4 packaging tools not found." ; \
654 echo "Package build abandoned." ; \
657 solaris-package: svr4-package
659 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
661 if test x$(HAVE_RPM) = xyes ; then \
663 mkdir -p BUILD RPMS SOURCES ; \
665 ln -s ../../../$(distdir).tar.gz ; \
667 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
668 echo "Package successfully built in `pwd`/RPMS." ; \
670 echo "Error: RPM executable and/or source directory not found." ; \
673 if test x$(HAVE_RPM) = xyes ; then \
675 mkdir -p BUILD SRPMS SOURCES ; \
677 ln -s ../../../$(distdir).tar.gz ; \
679 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
680 echo "Package successfully built in `pwd`/SRPMS." ; \
682 echo "Error: RPM executable and/or source directory not found." ; \
685 debian-package: debian/rules
686 dpkg-buildpackage -rfakeroot -us -uc
689 rm -rf $(top_stagedir)
691 test-splint: $(ethereal_SOURCES)
693 -gnu-extensions -D_U_="" \
694 -I. `glib-config --cflags` \