2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.724 2004/03/22 16:05:48 gerald Exp $
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 "manuf" file and a "diameter" directory.
79 # Install the Diameter DTD and XML files in the "diameter" subdirectory
82 diameterdir = $(pkgdatadir)/diameter
83 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
84 nasreq.xml sunping.xml
86 PLATFORM_SRC = pcap-util-unix.c
88 include Makefile.common
93 plugins/artnet/artnet.la \
94 plugins/asn1/asn1.la \
95 plugins/docsis/docsis.la \
96 plugins/enttec/enttec.la \
97 plugins/giop/cosnaming.la \
98 plugins/giop/coseventcomm.la \
99 plugins/gryphon/gryphon.la \
100 plugins/irda/irda.la \
101 plugins/lwres/lwres.la \
102 plugins/megaco/megaco.la \
103 plugins/mgcp/mgcp.la \
104 plugins/pcli/pcli.la \
106 plugins/rtnet/rtnet.la \
111 plugins/acn/packet-acn.o \
112 plugins/artnet/packet-artnet.o \
113 plugins/asn1/packet-asn1.o \
114 plugins/docsis/packet-bpkmattr.o \
115 plugins/docsis/packet-bpkmreq.o \
116 plugins/docsis/packet-bpkmrsp.o \
117 plugins/docsis/packet-docsis.o \
118 plugins/docsis/packet-dsaack.o \
119 plugins/docsis/packet-dsareq.o \
120 plugins/docsis/packet-dsarsp.o \
121 plugins/docsis/packet-dscack.o \
122 plugins/docsis/packet-dscreq.o \
123 plugins/docsis/packet-dscrsp.o \
124 plugins/docsis/packet-dsdreq.o \
125 plugins/docsis/packet-dsdrsp.o \
126 plugins/docsis/packet-macmgmt.o \
127 plugins/docsis/packet-map.o \
128 plugins/docsis/packet-regack.o \
129 plugins/docsis/packet-regreq.o \
130 plugins/docsis/packet-regrsp.o \
131 plugins/docsis/packet-rngreq.o \
132 plugins/docsis/packet-rngrsp.o \
133 plugins/docsis/packet-tlv.o \
134 plugins/docsis/packet-uccreq.o \
135 plugins/docsis/packet-uccrsp.o \
136 plugins/docsis/packet-ucd.o \
137 plugins/enttec/packet-enttec.o \
138 plugins/giop/packet-cosnaming.o \
139 plugins/giop/packet-coseventcomm.o \
140 plugins/gryphon/packet-gryphon.o \
141 plugins/irda/packet-irda.o \
142 plugins/lwres/packet-lwres.o \
143 plugins/megaco/packet-megaco.o \
144 plugins/mgcp/packet-mgcp.o \
145 plugins/pcli/packet-pcli.o \
146 plugins/rdm/packet-rdm.o \
147 plugins/rtnet/packet-rtnet.o \
148 plugins/v5ua/packet-v5ua.o
153 "-dlopen" plugins/acn/acn.la \
154 "-dlopen" plugins/artnet/artnet.la \
155 "-dlopen" plugins/asn1/asn1.la \
156 "-dlopen" plugins/docsis/docsis.la \
157 "-dlopen" plugins/enttec/enttec.la \
158 "-dlopen" plugins/giop/cosnaming.la \
159 "-dlopen" plugins/giop/coseventcomm.la \
160 "-dlopen" plugins/gryphon/gryphon.la \
161 "-dlopen" plugins/irda/irda.la \
162 "-dlopen" plugins/lwres/lwres.la \
163 "-dlopen" plugins/megaco/megaco.la \
164 "-dlopen" plugins/mgcp/mgcp.la \
165 "-dlopen" plugins/pcli/pcli.la \
166 "-dlopen" plugins/rdm/rdm.la \
167 "-dlopen" plugins/rtnet/rtnet.la \
168 "-dlopen" plugins/v5ua/v5ua.la
170 endif # ENABLE_STATIC
178 # Optional objects that I know how to build. These will be
179 # linked into the ethereal executable.
180 # They will also be linked into the tethereal executable; if this
181 # list ever grows to include something that can't be linked with
182 # tethereal, or if tethereal needs something that ethereal doesn't,
183 # we should probably split this into stuff needed both
184 # by ethereal and tethereal and stuff needed only by one or the
186 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
187 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
189 # Additional libs that I know how to build. These will be
190 # linked into the ethereal executable.
191 ethereal_additional_libs = \
192 wiretap/libwiretap.la \
196 # This is the automake dependency variable for the executable
197 ethereal_DEPENDENCIES = \
198 $(ethereal_optional_objects) \
199 $(ethereal_additional_libs) \
202 # This automake variable adds to the link-line for the executable.
204 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
205 # they are included in @GTK_LIBS@, and doesn't have to be linked with
206 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
207 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
208 # applications are X applications).
211 ethereal_LDFLAGS = -Wl,-static -all-static
213 ethereal_LDFLAGS = -export-dynamic
217 $(ethereal_optional_objects) \
218 $(ethereal_additional_libs) \
219 @SNMP_LIBS@ @SSL_LIBS@ \
222 @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@
224 # Additional libs that I know how to build. These will be
225 # linked into the tethereal executable.
226 tethereal_additional_libs = \
227 wiretap/libwiretap.la \
230 # This is the automake dependency variable for the executable
231 tethereal_DEPENDENCIES = \
232 $(ethereal_optional_objects) \
233 $(tethereal_additional_libs) \
236 # This automake variable adds to the link-line for the executable
238 $(ethereal_optional_objects) \
239 $(tethereal_additional_libs) \
240 @SNMP_LIBS@ @SSL_LIBS@ \
244 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
247 tethereal_LDFLAGS = -Wl,-static -all-static
249 tethereal_LDFLAGS = -export-dynamic
252 # Optional objects that I know how to build, and that are needed by
254 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
256 text2pcap_DEPENDENCIES = text2pcap.h
258 # This automake variable adds to the link-line for the executable
259 text2pcap_LDADD = $(text2pcap_optional_objects) \
262 mergecap_DEPENDENCIES = wiretap/libwiretap.la
264 # This is the automake dependency variable for the executable
265 editcap_DEPENDENCIES = wiretap/libwiretap.la
267 # This automake variable adds to the link-line for the executable
268 editcap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
269 mergecap_LDADD = wiretap/libwiretap.la @GLIB_LIBS@
272 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
275 # Build the version string
277 # FORCE is the portable version of .PHONY
281 $(PERL) $(srcdir)/make-version.pl
284 # Build shell scripts by doing variable substitution.
285 # Taken from autoconf 2.13.
287 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
292 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
295 # Build "tethereal-tap-register.c", which contains a function
296 # "register_all_tap_listeners()"
297 # that calls the register routines for all tehtereal tap listeners.
299 # We do this by grepping through sources.
301 # Formatting conventions: The name of the tap_listener_register_*
302 # routines must start in column zero, or must be preceded only by
303 # "void " starting in column zero, and must not be inside #if.
305 # The first argument is the directory in which the source files live.
306 # All subsequent arguments are the files to scan.
308 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
309 @echo Making tethereal-tap-register.c
310 @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
313 ./rdps $(srcdir)/print.ps ps.c
316 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
318 randpkt_additional_libs = wiretap/libwiretap.la
320 randpkt_DEPENDENCIES = \
321 $(randpkt_additional_libs)
324 $(randpkt_additional_libs) \
326 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
328 dftest_additional_libs = \
329 wiretap/libwiretap.la \
332 dftest_DEPENDENCIES = \
333 $(ethereal_optional_objects) \
334 $(dftest_additional_libs) \
337 # This automake variable adds to the link-line for the executable
339 $(ethereal_optional_objects) \
340 $(dftest_additional_libs) \
341 @SNMP_LIBS@ @SSL_LIBS@ \
345 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
347 dftest_LDFLAGS = -export-dynamic
358 MAINTAINERCLEANFILES = \
377 aclocal-fallback/glib-2.0.m4 \
378 aclocal-fallback/glib.m4 \
379 aclocal-fallback/gtk-2.0.m4 \
380 aclocal-fallback/gtk.m4 \
389 debian/README.debian \
405 doc/README.developer \
408 doc/README.regression \
411 doc/README.xml-output \
414 doc/ethereal-filter.pod.template \
427 image/Ethereal.icns \
428 image/Makefile.nmake \
430 image/clist_ascend.xpm \
431 image/clist_descend.xpm \
433 image/editcap.rc.in \
434 image/eexcl3d64.xpm \
435 image/eicon3d16.xpm \
436 image/eicon3d32.xpm \
437 image/eicon3d48.xpm \
438 image/eicon3d64.xpm \
439 image/elogo3d48x48.png \
441 image/ethereal.rc.in \
442 image/ethereal48x48-trans.png \
443 image/ethereal48x48.png \
444 image/hi16-app-ethereal.png \
445 image/hi32-app-ethereal.png \
446 image/hi48-app-ethereal.png \
447 image/icon-ethereal.xpm \
448 image/icon-excl.xpm \
449 image/lo16-app-ethereal.png \
450 image/lo32-app-ethereal.png \
451 image/lo48-app-ethereal.png \
452 image/mergecap.rc.in \
453 image/nsis-checked.bmp \
454 image/nsis-unchecked.bmp \
455 image/stock_dialog_error_48.xpm \
456 image/stock_dialog_warning_48.xpm \
457 image/stock_dialog_question_48.xpm \
458 image/stock_dialog_info_48.xpm \
459 image/tethereal.rc.in \
460 image/text2pcap.rc.in \
461 image/toolbar/capture_24.xpm \
462 image/toolbar/cfilter_24.xpm \
463 image/toolbar/dfilter_24.xpm \
464 image/toolbar/stock_add_24.xpm \
465 image/toolbar/stock_bottom_24.xpm \
466 image/toolbar/stock_close_24.xpm \
467 image/toolbar/stock_colorselector_24.xpm \
468 image/toolbar/stock_help_24.xpm \
469 image/toolbar/stock_jump_to_24.xpm \
470 image/toolbar/stock_left_arrow_24.xpm \
471 image/toolbar/stock_ok_20.xpm \
472 image/toolbar/stock_open_24.xpm \
473 image/toolbar/stock_preferences_24.xpm \
474 image/toolbar/stock_print_24.xpm \
475 image/toolbar/stock_properties_24.xpm \
476 image/toolbar/stock_refresh_24.xpm \
477 image/toolbar/stock_right_arrow_24.xpm \
478 image/toolbar/stock_save_24.xpm \
479 image/toolbar/stock_save_as_24.xpm \
480 image/toolbar/stock_search_24.xpm \
481 image/toolbar/stock_stop_24.xpm \
482 image/toolbar/stock_top_24.xpm \
483 image/toolbar/stock_zoom_1_24.xpm \
484 image/toolbar/stock_zoom_in_24.xpm \
485 image/toolbar/stock_zoom_out_24.xpm \
500 process-x11-fields.pl \
504 text2pcap-scanner.l \
512 -chmod +s $(DESTDIR)$(bindir)/ethereal
513 -chmod +s $(DESTDIR)$(bindir)/tethereal
518 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk help
521 SUBDIRS = tools wiretap doc epan plugins packaging help @ethereal_SUBDIRS@
523 SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
526 ethereal.1: ethereal doc/ethereal.pod
528 $(MAKE) ../ethereal.1 )
530 tethereal.1: tethereal doc/tethereal.pod
532 $(MAKE) ../tethereal.1 )
534 ethereal-filter.4: tethereal doc/ethereal-filter.pod.template
536 $(MAKE) ../ethereal-filter.4 )
538 editcap.1: doc/editcap.pod
540 $(MAKE) ../editcap.1 )
542 idl2eth.1: doc/idl2eth.pod
544 $(MAKE) ../idl2eth.1 )
546 mergecap.1: doc/mergecap.pod
548 $(MAKE) ../mergecap.1 )
550 text2pcap.1: doc/text2pcap.pod
552 $(MAKE) ../text2pcap.1 )
554 libtool: $(LIBTOOL_DEPS)
555 $(SHELL) ./config.status --recheck
557 # We load top_stagedir with an explicit path so that libtool doesn't freak.
558 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
559 stagedir=$(top_stagedir)/$(PACKAGE).stage
563 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
564 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
565 rm -rf $(stagedir) ; \
566 $(MAKE) DESTDIR=$(stagedir) install; \
567 $(srcdir)/packaging/svr4/mkpkg \
569 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
573 echo "Error: SVR4 packaging tools not found." ; \
574 echo "Package build abandoned." ; \
577 solaris-package: svr4-package
579 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
581 if test x$(HAVE_RPM) = xyes ; then \
583 mkdir -p BUILD RPMS SOURCES ; \
585 ln -s ../../../$(distdir).tar.gz ; \
587 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
588 echo "Package successfully built in `pwd`/RPMS." ; \
590 echo "Error: RPM executable and/or source directory not found." ; \
593 if test x$(HAVE_RPM) = xyes ; then \
595 mkdir -p BUILD SRPMS SOURCES ; \
597 ln -s ../../../$(distdir).tar.gz ; \
599 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
600 echo "Package successfully built in `pwd`/SRPMS." ; \
602 echo "Error: RPM executable and/or source directory not found." ; \
605 debian-package: debian/rules
606 dpkg-buildpackage -rfakeroot -us -uc
609 rm -rf $(top_stagedir)
611 test-splint: $(ethereal_SOURCES)
613 -gnu-extensions -D_U_="" \
614 -I. `glib-config --cflags` \