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).
76 pkgdata_DATA = AUTHORS-SHORT manuf ethereal.html tethereal.html \
77 ethereal-filter.html capinfos.html editcap.html \
78 idl2eth.html mergecap.html text2pcap.html \
79 cfilters colorfilters dfilters
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/agentx/agentx.la \
97 plugins/artnet/artnet.la \
98 plugins/asn1/asn1.la \
99 plugins/ciscosm/ciscosm.la \
100 plugins/docsis/docsis.la \
101 plugins/enttec/enttec.la \
102 plugins/giop/cosnaming.la \
103 plugins/giop/coseventcomm.la \
104 plugins/gryphon/gryphon.la \
105 plugins/irda/irda.la \
106 plugins/lwres/lwres.la \
107 plugins/megaco/megaco.la \
108 plugins/mgcp/mgcp.la \
109 plugins/opsi/opsi.la \
110 plugins/pcli/pcli.la \
111 plugins/profinet/profinet.la \
114 plugins/rtnet/rtnet.la \
115 plugins/rudp/rudp.la \
119 plugin_ldadd = $(plugin_libs)
124 "-dlopen" plugins/acn/acn.la \
125 "-dlopen" plugins/agentx/agentx.la \
126 "-dlopen" plugins/artnet/artnet.la \
127 "-dlopen" plugins/asn1/asn1.la \
128 "-dlopen" plugins/ciscosm/ciscosm.la \
129 "-dlopen" plugins/docsis/docsis.la \
130 "-dlopen" plugins/enttec/enttec.la \
131 "-dlopen" plugins/giop/cosnaming.la \
132 "-dlopen" plugins/giop/coseventcomm.la \
133 "-dlopen" plugins/gryphon/gryphon.la \
134 "-dlopen" plugins/irda/irda.la \
135 "-dlopen" plugins/lwres/lwres.la \
136 "-dlopen" plugins/megaco/megaco.la \
137 "-dlopen" plugins/mgcp/mgcp.la \
138 "-dlopen" plugins/opsi/opsi.la \
139 "-dlopen" plugins/pcli/pcli.la \
140 "-dlopen" plugins/profinet/profinet.la \
141 "-dlopen" plugins/rdm/rdm.la \
142 "-dlopen" plugins/rlm/rlm.la \
143 "-dlopen" plugins/rtnet/rtnet.la \
144 "-dlopen" plugins/rudp/rudp.la \
145 "-dlopen" plugins/v5ua/v5ua.la
147 endif # ENABLE_STATIC
155 # Optional objects that I know how to build. These will be
156 # linked into the ethereal executable.
157 # They will also be linked into the tethereal executable; if this
158 # list ever grows to include something that can't be linked with
159 # tethereal, or if tethereal needs something that ethereal doesn't,
160 # we should probably split this into stuff needed both
161 # by ethereal and tethereal and stuff needed only by one or the
163 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
164 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
166 # Additional libs that I know how to build. These will be
167 # linked into the ethereal executable.
168 ethereal_additional_libs = \
170 wiretap/libwiretap.la \
173 # This is the automake dependency variable for the executable
174 ethereal_DEPENDENCIES = \
175 $(ethereal_optional_objects) \
176 $(ethereal_additional_libs) \
179 # This automake variable adds to the link-line for the executable.
181 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
182 # they are included in @GTK_LIBS@, and doesn't have to be linked with
183 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
184 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
185 # applications are X applications).
188 ethereal_LDFLAGS = -Wl,-static -all-static
190 ethereal_LDFLAGS = -export-dynamic
194 $(ethereal_optional_objects) \
195 $(ethereal_additional_libs) \
196 @SNMP_LIBS@ @SSL_LIBS@ \
199 @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@
201 # Additional libs that I know how to build. These will be
202 # linked into the tethereal executable.
203 tethereal_additional_libs = \
204 wiretap/libwiretap.la \
207 # This is the automake dependency variable for the executable
208 tethereal_DEPENDENCIES = \
209 $(ethereal_optional_objects) \
210 $(tethereal_additional_libs) \
213 # This automake variable adds to the link-line for the executable
215 $(ethereal_optional_objects) \
216 $(tethereal_additional_libs) \
217 @SNMP_LIBS@ @SSL_LIBS@ \
221 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
224 tethereal_LDFLAGS = -Wl,-static -all-static
226 tethereal_LDFLAGS = -export-dynamic
229 # Optional objects that I know how to build, and that are needed by
231 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
233 text2pcap_DEPENDENCIES = text2pcap.h
235 # This automake variable adds to the link-line for the executable
236 text2pcap_LDADD = $(text2pcap_optional_objects) \
239 mergecap_DEPENDENCIES = wiretap/libwiretap.la
241 # This is the automake dependency variable for the executable
242 capinfos_DEPENDENCIES = wiretap/libwiretap.la
243 editcap_DEPENDENCIES = wiretap/libwiretap.la
245 # This automake variable adds to the link-line for the executable
246 capinfos_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
247 editcap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
248 mergecap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
251 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
254 # Build the version string
256 # FORCE is the portable version of .PHONY
260 $(PERL) $(srcdir)/make-version.pl $(srcdir)
263 # Build the short version of the authors file for the about dialog
265 AUTHORS-SHORT: AUTHORS make-authors-short.pl
266 $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-short.pl < $(srcdir)/AUTHORS > AUTHORS-SHORT
269 # Build the short version of the authors file with formatting codes for the
272 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
273 $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
276 # Build shell scripts by doing variable substitution.
277 # Taken from autoconf 2.13.
279 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
284 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
287 # Build "tethereal-tap-register.c", which contains a function
288 # "register_all_tap_listeners()"
289 # that calls the register routines for all tehtereal tap listeners.
291 # We do this by grepping through sources.
293 # Formatting conventions: The name of the tap_listener_register_*
294 # routines must start in column zero, or must be preceded only by
295 # "void " starting in column zero, and must not be inside #if.
297 # The first argument is the directory in which the source files live.
298 # All subsequent arguments are the files to scan.
300 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
301 @echo Making tethereal-tap-register.c
302 @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
305 ./rdps $(srcdir)/print.ps ps.c
308 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
310 randpkt_additional_libs = wiretap/libwiretap.la
312 randpkt_DEPENDENCIES = \
313 $(randpkt_additional_libs)
316 $(randpkt_additional_libs) \
318 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
320 dftest_additional_libs = \
321 wiretap/libwiretap.la \
324 dftest_DEPENDENCIES = \
325 $(ethereal_optional_objects) \
326 $(dftest_additional_libs) \
329 # This automake variable adds to the link-line for the executable
331 $(ethereal_optional_objects) \
332 $(dftest_additional_libs) \
333 @SNMP_LIBS@ @SSL_LIBS@ \
337 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
339 dftest_LDFLAGS = -export-dynamic
342 # XXX - "svnversion.h" is distributed in the release tarball; should
343 # we be deleting it with "make clean", or should we only do that with
344 # "make maintainer-clean"?
353 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
354 # list of files removed by "make distclean"? (It's deliberately
355 # included in that list.)
359 AUTHORS-SHORT-FORMAT \
362 MAINTAINERCLEANFILES = \
387 aclocal-fallback/glib-2.0.m4 \
388 aclocal-fallback/glib.m4 \
389 aclocal-fallback/gtk-2.0.m4 \
390 aclocal-fallback/gtk.m4 \
396 capture_wpcap_packet.c \
397 capture_wpcap_packet.h \
403 debian/README.debian \
420 doc/README.developer \
423 doc/README.regression \
426 doc/README.xml-output \
430 doc/ethereal-filter.pod.template \
437 docbook/Makefile.auto.am \
440 epan/libethereal.def \
447 image/Ethereal.icns \
448 image/Makefile.nmake \
450 image/capinfos.rc.in \
451 image/clist_ascend.xpm \
452 image/clist_descend.xpm \
454 image/editcap.rc.in \
455 image/eexcl3d64.xpm \
456 image/eicon3d16.xpm \
457 image/eicon3d32.xpm \
458 image/eicon3d48.xpm \
459 image/eicon3d64.xpm \
460 image/elogo3d48x48.png \
462 image/ethereal.rc.in \
463 image/ethereal48x48-trans.png \
464 image/ethereal48x48.png \
465 image/hi16-app-ethereal.png \
466 image/hi32-app-ethereal.png \
467 image/hi48-app-ethereal.png \
468 image/icon-ethereal.xpm \
469 image/icon-excl.xpm \
470 image/libethereal.rc.in \
471 image/lo16-app-ethereal.png \
472 image/lo32-app-ethereal.png \
473 image/lo48-app-ethereal.png \
474 image/mergecap.rc.in \
475 image/nsis-checked.bmp \
476 image/nsis-unchecked.bmp \
477 image/stock_dialog_error_48.xpm \
478 image/stock_dialog_warning_48.xpm \
479 image/stock_dialog_question_48.xpm \
480 image/stock_dialog_info_48.xpm \
481 image/tethereal.rc.in \
482 image/text2pcap.rc.in \
483 image/toolbar/autoscroll_24.xpm \
484 image/toolbar/capture_filter_24.xpm \
485 image/toolbar/capture_interfaces_24.xpm \
486 image/toolbar/capture_options_24.xpm \
487 image/toolbar/capture_restart_24.xpm \
488 image/toolbar/capture_start_24.xpm \
489 image/toolbar/capture_stop_24.xpm \
490 image/toolbar/checkbox_16.xpm \
491 image/toolbar/colorize_24.xpm \
492 image/toolbar/conversations_16.xpm \
493 image/toolbar/decode_as_16.xpm \
494 image/toolbar/display_filter_24.xpm \
495 image/toolbar/endpoints_16.xpm \
496 image/toolbar/file_set_list_16.xpm \
497 image/toolbar/file_set_next_16.xpm \
498 image/toolbar/file_set_previous_16.xpm \
499 image/toolbar/graphs_16.xpm \
500 image/toolbar/internet_24.xpm \
501 image/toolbar/resize_columns_24.xpm \
502 image/toolbar/stock_add_24.xpm \
503 image/toolbar/stock_bottom_24.xpm \
504 image/toolbar/stock_clear_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 \
525 image/toolbar/telephony_16.xpm \
526 image/toolbar/time_24.xpm \
527 image/toolbar/web_support_24.xpm \
528 image/toolbar/wiki_24.xpm \
530 image/icon_layout_1.xpm \
531 image/icon_layout_2.xpm \
532 image/icon_layout_3.xpm \
533 image/icon_layout_4.xpm \
534 image/icon_layout_5.xpm \
535 image/icon_layout_6.xpm \
536 image/wiretap.rc.in \
538 make-authors-format.pl \
539 make-authors-short.pl \
553 text2pcap-scanner.l \
560 -chmod +s $(DESTDIR)$(bindir)/ethereal
561 -chmod +s $(DESTDIR)$(bindir)/tethereal
566 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk help
569 SUBDIRS = tools wiretap doc epan plugins packaging help @ethereal_SUBDIRS@
571 SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
574 ethereal.1: doc/ethereal.pod AUTHORS-SHORT-FORMAT
576 $(MAKE) ../ethereal.1 )
578 tethereal.1: doc/tethereal.pod
580 $(MAKE) ../tethereal.1 )
582 ethereal-filter.4: tethereal doc/ethereal-filter.pod.template
584 $(MAKE) ../ethereal-filter.4 )
586 capinfos.1: doc/capinfos.pod
588 $(MAKE) ../capinfos.1 )
590 editcap.1: doc/editcap.pod
592 $(MAKE) ../editcap.1 )
594 idl2eth.1: doc/idl2eth.pod
596 $(MAKE) ../idl2eth.1 )
598 mergecap.1: doc/mergecap.pod
600 $(MAKE) ../mergecap.1 )
602 text2pcap.1: doc/text2pcap.pod
604 $(MAKE) ../text2pcap.1 )
606 ethereal.html: doc/ethereal.pod AUTHORS-SHORT-FORMAT
608 $(MAKE) ../ethereal.html )
610 tethereal.html: doc/tethereal.pod
612 $(MAKE) ../tethereal.html )
614 ethereal-filter.html: tethereal doc/ethereal-filter.pod.template
616 $(MAKE) ../ethereal-filter.html )
618 capinfos.html: doc/capinfos.pod
620 $(MAKE) ../capinfos.html )
622 editcap.html: doc/editcap.pod
624 $(MAKE) ../editcap.html )
626 idl2eth.html: doc/idl2eth.pod
628 $(MAKE) ../idl2eth.html )
630 mergecap.html: doc/mergecap.pod
632 $(MAKE) ../mergecap.html )
634 text2pcap.html: doc/text2pcap.pod
636 $(MAKE) ../text2pcap.html )
638 libtool: $(LIBTOOL_DEPS)
639 $(SHELL) ./config.status --recheck
641 # We load top_stagedir with an explicit path so that libtool doesn't freak.
642 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
643 stagedir=$(top_stagedir)/$(PACKAGE).stage
647 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
648 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
649 rm -rf $(stagedir) ; \
650 $(MAKE) DESTDIR=$(stagedir) install; \
651 $(srcdir)/packaging/svr4/mkpkg \
653 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
657 echo "Error: SVR4 packaging tools not found." ; \
658 echo "Package build abandoned." ; \
661 solaris-package: svr4-package
663 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
665 if test x$(HAVE_RPM) = xyes ; then \
667 mkdir -p BUILD RPMS SOURCES ; \
669 ln -s ../../../$(distdir).tar.gz ; \
671 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
672 echo "Package successfully built in `pwd`/RPMS." ; \
674 echo "Error: RPM executable and/or source directory not found." ; \
677 if test x$(HAVE_RPM) = xyes ; then \
679 mkdir -p BUILD SRPMS SOURCES ; \
681 ln -s ../../../$(distdir).tar.gz ; \
683 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
684 echo "Package successfully built in `pwd`/SRPMS." ; \
686 echo "Error: RPM executable and/or source directory not found." ; \
689 debian-package: debian/rules
690 dpkg-buildpackage -rfakeroot -us -uc
693 rm -rf $(top_stagedir)
695 test-splint: $(ethereal_SOURCES)
697 -gnu-extensions -D_U_="" \
698 -I. `glib-config --cflags` \