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@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
66 man4_MANS = @etherealfilter_man@
69 EXTRA_PROGRAMS = ethereal tethereal editcap mergecap dftest randpkt text2pcap
70 EXTRA_SCRIPTS = idl2eth
73 # Ethereal configuration files are put in $(pkgdatadir). It currently
74 # contains the "AUTHORS-SHORT" and "manuf" files and a "diameter" directory.
76 pkgdata_DATA = AUTHORS-SHORT manuf ethereal.html tethereal.html \
77 ethereal-filter.html editcap.html idl2eth.html mergecap.html \
81 # Install the Diameter DTD and XML files in the "diameter" subdirectory
84 diameterdir = $(pkgdatadir)/diameter
85 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
86 nasreq.xml sunping.xml
88 PLATFORM_SRC = pcap-util-unix.c
90 include Makefile.common
95 plugins/artnet/artnet.la \
96 plugins/asn1/asn1.la \
97 plugins/ciscosm/ciscosm.la \
98 plugins/docsis/docsis.la \
99 plugins/enttec/enttec.la \
100 plugins/giop/cosnaming.la \
101 plugins/giop/coseventcomm.la \
102 plugins/gryphon/gryphon.la \
103 plugins/irda/irda.la \
104 plugins/lwres/lwres.la \
105 plugins/megaco/megaco.la \
106 plugins/mgcp/mgcp.la \
107 plugins/opsi/opsi.la \
108 plugins/pcli/pcli.la \
111 plugins/rtnet/rtnet.la \
112 plugins/rudp/rudp.la \
117 plugins/acn/packet-acn.o \
118 plugins/artnet/packet-artnet.o \
119 plugins/asn1/packet-asn1.o \
120 plugins/ciscosm/packet-sm.o \
121 plugins/docsis/packet-bpkmattr.o \
122 plugins/docsis/packet-bpkmreq.o \
123 plugins/docsis/packet-bpkmrsp.o \
124 plugins/docsis/packet-docsis.o \
125 plugins/docsis/packet-dsaack.o \
126 plugins/docsis/packet-dsareq.o \
127 plugins/docsis/packet-dsarsp.o \
128 plugins/docsis/packet-dscack.o \
129 plugins/docsis/packet-dscreq.o \
130 plugins/docsis/packet-dscrsp.o \
131 plugins/docsis/packet-dsdreq.o \
132 plugins/docsis/packet-dsdrsp.o \
133 plugins/docsis/packet-macmgmt.o \
134 plugins/docsis/packet-map.o \
135 plugins/docsis/packet-regack.o \
136 plugins/docsis/packet-regreq.o \
137 plugins/docsis/packet-regrsp.o \
138 plugins/docsis/packet-rngreq.o \
139 plugins/docsis/packet-rngrsp.o \
140 plugins/docsis/packet-tlv.o \
141 plugins/docsis/packet-uccreq.o \
142 plugins/docsis/packet-uccrsp.o \
143 plugins/docsis/packet-ucd.o \
144 plugins/enttec/packet-enttec.o \
145 plugins/giop/packet-cosnaming.o \
146 plugins/giop/packet-coseventcomm.o \
147 plugins/gryphon/packet-gryphon.o \
148 plugins/irda/packet-irda.o \
149 plugins/lwres/packet-lwres.o \
150 plugins/megaco/packet-megaco.o \
151 plugins/mgcp/packet-mgcp.o \
152 plugins/opsi/packet-opsi.o \
153 plugins/pcli/packet-pcli.o \
154 plugins/rdm/packet-rdm.o \
155 plugins/rlm/packet-rlm.o \
156 plugins/rtnet/packet-rtnet.o \
157 plugins/rudp/packet-rudp.o \
158 plugins/v5ua/packet-v5ua.o
163 "-dlopen" plugins/acn/acn.la \
164 "-dlopen" plugins/artnet/artnet.la \
165 "-dlopen" plugins/asn1/asn1.la \
166 "-dlopen" plugins/ciscosm/ciscosm.la \
167 "-dlopen" plugins/docsis/docsis.la \
168 "-dlopen" plugins/enttec/enttec.la \
169 "-dlopen" plugins/giop/cosnaming.la \
170 "-dlopen" plugins/giop/coseventcomm.la \
171 "-dlopen" plugins/gryphon/gryphon.la \
172 "-dlopen" plugins/irda/irda.la \
173 "-dlopen" plugins/lwres/lwres.la \
174 "-dlopen" plugins/megaco/megaco.la \
175 "-dlopen" plugins/mgcp/mgcp.la \
176 "-dlopen" plugins/opsi/opsi.la \
177 "-dlopen" plugins/pcli/pcli.la \
178 "-dlopen" plugins/rdm/rdm.la \
179 "-dlopen" plugins/rlm/rlm.la \
180 "-dlopen" plugins/rtnet/rtnet.la \
181 "-dlopen" plugins/rudp/rudp.la \
182 "-dlopen" plugins/v5ua/v5ua.la
184 endif # ENABLE_STATIC
192 # Optional objects that I know how to build. These will be
193 # linked into the ethereal executable.
194 # They will also be linked into the tethereal executable; if this
195 # list ever grows to include something that can't be linked with
196 # tethereal, or if tethereal needs something that ethereal doesn't,
197 # we should probably split this into stuff needed both
198 # by ethereal and tethereal and stuff needed only by one or the
200 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
201 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
203 # Additional libs that I know how to build. These will be
204 # linked into the ethereal executable.
205 ethereal_additional_libs = \
207 wiretap/libwiretap.la \
210 # This is the automake dependency variable for the executable
211 ethereal_DEPENDENCIES = \
212 $(ethereal_optional_objects) \
213 $(ethereal_additional_libs) \
216 # This automake variable adds to the link-line for the executable.
218 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
219 # they are included in @GTK_LIBS@, and doesn't have to be linked with
220 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
221 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
222 # applications are X applications).
225 ethereal_LDFLAGS = -Wl,-static -all-static
227 ethereal_LDFLAGS = -export-dynamic
231 $(ethereal_optional_objects) \
232 $(ethereal_additional_libs) \
233 @SNMP_LIBS@ @SSL_LIBS@ \
236 @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@
238 # Additional libs that I know how to build. These will be
239 # linked into the tethereal executable.
240 tethereal_additional_libs = \
241 wiretap/libwiretap.la \
244 # This is the automake dependency variable for the executable
245 tethereal_DEPENDENCIES = \
246 $(ethereal_optional_objects) \
247 $(tethereal_additional_libs) \
250 # This automake variable adds to the link-line for the executable
252 $(ethereal_optional_objects) \
253 $(tethereal_additional_libs) \
254 @SNMP_LIBS@ @SSL_LIBS@ \
258 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
261 tethereal_LDFLAGS = -Wl,-static -all-static
263 tethereal_LDFLAGS = -export-dynamic
266 # Optional objects that I know how to build, and that are needed by
268 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
270 text2pcap_DEPENDENCIES = text2pcap.h
272 # This automake variable adds to the link-line for the executable
273 text2pcap_LDADD = $(text2pcap_optional_objects) \
276 mergecap_DEPENDENCIES = wiretap/libwiretap.la
278 # This is the automake dependency variable for the executable
279 editcap_DEPENDENCIES = wiretap/libwiretap.la
281 # This automake variable adds to the link-line for the executable
282 editcap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
283 mergecap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
286 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
289 # Build the version string
291 # FORCE is the portable version of .PHONY
295 $(PERL) $(srcdir)/make-version.pl
298 # Build the short version of the authors file for the about dialog
300 AUTHORS-SHORT: AUTHORS make-authors-short.pl
301 $(PERL) $(srcdir)/make-authors-short.pl < AUTHORS > AUTHORS-SHORT
304 # Build shell scripts by doing variable substitution.
305 # Taken from autoconf 2.13.
307 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
312 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
315 # Build "tethereal-tap-register.c", which contains a function
316 # "register_all_tap_listeners()"
317 # that calls the register routines for all tehtereal tap listeners.
319 # We do this by grepping through sources.
321 # Formatting conventions: The name of the tap_listener_register_*
322 # routines must start in column zero, or must be preceded only by
323 # "void " starting in column zero, and must not be inside #if.
325 # The first argument is the directory in which the source files live.
326 # All subsequent arguments are the files to scan.
328 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
329 @echo Making tethereal-tap-register.c
330 @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
333 ./rdps $(srcdir)/print.ps ps.c
336 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
338 randpkt_additional_libs = wiretap/libwiretap.la
340 randpkt_DEPENDENCIES = \
341 $(randpkt_additional_libs)
344 $(randpkt_additional_libs) \
346 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
348 dftest_additional_libs = \
349 wiretap/libwiretap.la \
352 dftest_DEPENDENCIES = \
353 $(ethereal_optional_objects) \
354 $(dftest_additional_libs) \
357 # This automake variable adds to the link-line for the executable
359 $(ethereal_optional_objects) \
360 $(dftest_additional_libs) \
361 @SNMP_LIBS@ @SSL_LIBS@ \
365 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@
367 dftest_LDFLAGS = -export-dynamic
378 MAINTAINERCLEANFILES = \
398 aclocal-fallback/glib-2.0.m4 \
399 aclocal-fallback/glib.m4 \
400 aclocal-fallback/gtk-2.0.m4 \
401 aclocal-fallback/gtk.m4 \
409 debian/README.debian \
425 doc/README.developer \
428 doc/README.regression \
431 doc/README.xml-output \
434 doc/ethereal-filter.pod.template \
443 epan/libethereal.def \
449 image/Ethereal.icns \
450 image/Makefile.nmake \
452 image/clist_ascend.xpm \
453 image/clist_descend.xpm \
455 image/editcap.rc.in \
456 image/eexcl3d64.xpm \
457 image/eicon3d16.xpm \
458 image/eicon3d32.xpm \
459 image/eicon3d48.xpm \
460 image/eicon3d64.xpm \
461 image/elogo3d48x48.png \
463 image/ethereal.rc.in \
464 image/ethereal48x48-trans.png \
465 image/ethereal48x48.png \
466 image/hi16-app-ethereal.png \
467 image/hi32-app-ethereal.png \
468 image/hi48-app-ethereal.png \
469 image/icon-ethereal.xpm \
470 image/icon-excl.xpm \
471 image/libethereal.rc.in \
472 image/lo16-app-ethereal.png \
473 image/lo32-app-ethereal.png \
474 image/lo48-app-ethereal.png \
475 image/mergecap.rc.in \
476 image/nsis-checked.bmp \
477 image/nsis-unchecked.bmp \
478 image/stock_dialog_error_48.xpm \
479 image/stock_dialog_warning_48.xpm \
480 image/stock_dialog_question_48.xpm \
481 image/stock_dialog_info_48.xpm \
482 image/tethereal.rc.in \
483 image/text2pcap.rc.in \
484 image/toolbar/capture_24.xpm \
485 image/toolbar/cfilter_24.xpm \
486 image/toolbar/dfilter_24.xpm \
487 image/toolbar/stock_add_24.xpm \
488 image/toolbar/stock_bottom_24.xpm \
489 image/toolbar/stock_close_24.xpm \
490 image/toolbar/stock_colorselector_24.xpm \
491 image/toolbar/stock_help_24.xpm \
492 image/toolbar/stock_jump_to_24.xpm \
493 image/toolbar/stock_left_arrow_24.xpm \
494 image/toolbar/stock_ok_20.xpm \
495 image/toolbar/stock_open_24.xpm \
496 image/toolbar/stock_preferences_24.xpm \
497 image/toolbar/stock_print_24.xpm \
498 image/toolbar/stock_properties_24.xpm \
499 image/toolbar/stock_refresh_24.xpm \
500 image/toolbar/stock_right_arrow_24.xpm \
501 image/toolbar/stock_save_24.xpm \
502 image/toolbar/stock_save_as_24.xpm \
503 image/toolbar/stock_search_24.xpm \
504 image/toolbar/stock_stop_24.xpm \
505 image/toolbar/stock_top_24.xpm \
506 image/toolbar/stock_zoom_1_24.xpm \
507 image/toolbar/stock_zoom_in_24.xpm \
508 image/toolbar/stock_zoom_out_24.xpm \
510 image/icon_layout_1.xpm \
511 image/icon_layout_2.xpm \
512 image/icon_layout_3.xpm \
513 image/icon_layout_4.xpm \
514 image/icon_layout_5.xpm \
515 image/icon_layout_6.xpm \
516 make-authors-short.pl \
529 text2pcap-scanner.l \
536 -chmod +s $(DESTDIR)$(bindir)/ethereal
537 -chmod +s $(DESTDIR)$(bindir)/tethereal
542 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk help
545 SUBDIRS = tools wiretap doc epan plugins packaging help @ethereal_SUBDIRS@
547 SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
550 ethereal.1: doc/ethereal.pod AUTHORS-SHORT
552 $(MAKE) ../ethereal.1 )
554 tethereal.1: doc/tethereal.pod
556 $(MAKE) ../tethereal.1 )
558 ethereal-filter.4: tethereal doc/ethereal-filter.pod.template
560 $(MAKE) ../ethereal-filter.4 )
562 editcap.1: doc/editcap.pod
564 $(MAKE) ../editcap.1 )
566 idl2eth.1: doc/idl2eth.pod
568 $(MAKE) ../idl2eth.1 )
570 mergecap.1: doc/mergecap.pod
572 $(MAKE) ../mergecap.1 )
574 text2pcap.1: doc/text2pcap.pod
576 $(MAKE) ../text2pcap.1 )
578 ethereal.html: doc/ethereal.pod AUTHORS-SHORT
580 $(MAKE) ../ethereal.html )
582 tethereal.html: doc/tethereal.pod
584 $(MAKE) ../tethereal.html )
586 ethereal-filter.html: tethereal doc/ethereal-filter.pod.template
588 $(MAKE) ../ethereal-filter.html )
590 editcap.html: doc/editcap.pod
592 $(MAKE) ../editcap.html )
594 idl2eth.html: doc/idl2eth.pod
596 $(MAKE) ../idl2eth.html )
598 mergecap.html: doc/mergecap.pod
600 $(MAKE) ../mergecap.html )
602 text2pcap.html: doc/text2pcap.pod
604 $(MAKE) ../text2pcap.html )
606 libtool: $(LIBTOOL_DEPS)
607 $(SHELL) ./config.status --recheck
609 # We load top_stagedir with an explicit path so that libtool doesn't freak.
610 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
611 stagedir=$(top_stagedir)/$(PACKAGE).stage
615 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
616 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
617 rm -rf $(stagedir) ; \
618 $(MAKE) DESTDIR=$(stagedir) install; \
619 $(srcdir)/packaging/svr4/mkpkg \
621 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
625 echo "Error: SVR4 packaging tools not found." ; \
626 echo "Package build abandoned." ; \
629 solaris-package: svr4-package
631 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
633 if test x$(HAVE_RPM) = xyes ; then \
635 mkdir -p BUILD RPMS SOURCES ; \
637 ln -s ../../../$(distdir).tar.gz ; \
639 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
640 echo "Package successfully built in `pwd`/RPMS." ; \
642 echo "Error: RPM executable and/or source directory not found." ; \
645 if test x$(HAVE_RPM) = xyes ; then \
647 mkdir -p BUILD SRPMS SOURCES ; \
649 ln -s ../../../$(distdir).tar.gz ; \
651 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
652 echo "Package successfully built in `pwd`/SRPMS." ; \
654 echo "Error: RPM executable and/or source directory not found." ; \
657 debian-package: debian/rules
658 dpkg-buildpackage -rfakeroot -us -uc
661 rm -rf $(top_stagedir)
663 test-splint: $(ethereal_SOURCES)
665 -gnu-extensions -D_U_="" \
666 -I. `glib-config --cflags` \