2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.161 2000/02/05 05:54:17 guy Exp $
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@zing.org>
8 # Copyright 1998 Gerald Combs
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.
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.
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.
25 EXTRA_PROGRAMS = ethereal_static
26 bin_PROGRAMS = ethereal editcap tethereal
28 man_MANS = ethereal.1 editcap.1 tethereal.1
32 # Any POSIX-compatible YACC should honor the -p flag
176 ETHEREAL_COMMON_SOURCES = \
223 $(DISSECTOR_SOURCES) \
224 $(ETHEREAL_COMMON_SOURCES) \
238 ethereal_static_SOURCES = \
241 EXTRA_ethereal_SOURCES = \
257 # Optional objects that I know how to build. These will be
258 # linked into the ethereal executable.
259 # They will also be linked into the tethereal executable; if this
260 # list ever grows to include something that can't be linked with
261 # tethereal, or if tethereal needs something that ethereal doesn't,
262 # we should probably split this into stuff needed both
263 # by ethereal and tethereal and stuff needed only by one or the
265 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
266 @STRNCASECMP_O@ @MKSTEMP_O@ \
267 @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
269 # Additional libs that I know how to build. These will be
270 # linked into the ethereal executable.
271 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
273 # This is the automake dependency variable for the executable
274 ethereal_DEPENDENCIES = \
275 $(ethereal_optional_objects) \
276 $(ethereal_additional_libs) \
277 plugins/gryphon/gryphon.la
279 ethereal_static_DEPENDENCIES = \
280 $(ethereal_optional_objects) \
281 $(ethereal_additional_libs)
283 # This automake variable adds to the link-line for the executable.
285 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
286 # they are included in @GTK_LIBS@, and doesn't have to be linked with
287 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
288 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
289 # applications are X applications).
291 $(ethereal_optional_objects) \
292 $(ethereal_additional_libs) \
295 "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
297 ethereal_static_LDADD = \
298 $(ethereal_optional_objects) \
299 $(ethereal_additional_libs) \
301 @PCAP_LIBS@ @GTK_LIBS@
303 ethereal_LDFLAGS = -export-dynamic
304 ethereal_static_LDFLAGS = -Wl,-static
306 tethereal_SOURCES = \
307 $(DISSECTOR_SOURCES) \
308 $(ETHEREAL_COMMON_SOURCES) \
311 # Additional libs that I know how to build. These will be
312 # linked into the tethereal executable.
313 tethereal_additional_libs = wiretap/libwiretap.a
315 # This is the automake dependency variable for the executable
316 tethereal_DEPENDENCIES = \
317 $(ethereal_optional_objects) \
318 $(tethereal_additional_libs) \
319 plugins/gryphon/gryphon.la
321 # This automake variable adds to the link-line for the executable
322 tethereal_LDADD = wiretap/libwiretap.a \
323 $(ethereal_optional_objects) \
324 $(tethereal_additional_libs) \
327 "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
328 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
330 tethereal_LDFLAGS = -export-dynamic
332 editcap_SOURCES = editcap.c
334 # This is the automake dependency variable for the executable
335 editcap_DEPENDENCIES = wiretap/libwiretap.a
337 # This automake variable adds to the link-line for the executable
338 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
341 # Build "register.c", which contains a function "register_all_protocols()"
342 # that calls the register routines for all protocols.
344 # We do this by grepping through sources. If that turns out to be too slow,
345 # maybe we could just require every .o file to have an register routine
346 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
348 # Formatting conventions: The name of the proto_register_* routines must
349 # start in column zero, or must be preceded only by "void " starting in
350 # column zero, and must not be inside #if.
352 # We assume that all dissector routines are in "packet-XXX.c" files,
355 # For some unknown reason, having a big "for" loop in the Makefile
356 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
357 # they seem to pass only the first few names in the list to the shell,
360 # Therefore, we have a script to generate the "register.c" file.
362 # The first argument is the directory in which the source files live.
363 # All subsequent arguments are the files to scan.
365 register.c: packet.c $(DISSECTOR_SOURCES)
366 @echo Making register.c
367 @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
370 ./rdps $(srcdir)/print.ps ps.c
373 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
376 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
378 randpkt: randpkt.o wiretap/libwiretap.a
379 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
389 debian/README.debian \
403 doc/ethereal.pod.template \
406 doc/tethereal.pod.template \
409 image/ethereal48x48-trans.png \
410 image/ethereal48x48.png \
411 image/icon-excl.xpm \
412 image/icon-ethereal.xpm \
430 # Currently register.c can be included in the distribution because
431 # we always build all protocol dissectors. We used to have to check
432 # whether or not to build the snmp dissector. If we again need to
433 # variably build something, making register.c non-portable, uncomment
434 # the dist-hook line below.
436 # Oh, yuk. We don't want to include "register.c" in the distribution, as
437 # its contents depend on the configuration, and therefore we want it
438 # to be built when the first "make" is done; however, Automake insists
439 # on putting *all* source into the distribution.
441 # We work around this by having a "dist-hook" rule that deletes
442 # "register.c", so that "dist" won't pick it up.
445 # @rm -f $(distdir)/register.c
447 SUBDIRS = wiretap gtk plugins @ethereal_SUBDIRS@
449 ethereal.1: ethereal doc/ethereal.pod.template
451 $(MAKE) ../ethereal.1 )
453 tethereal.1: tethereal doc/tethereal.pod.template
455 $(MAKE) ../tethereal.1 )
457 editcap.1: doc/editcap.pod
459 $(MAKE) ../editcap.1 )
461 dfilter-scanner.c : dfilter-scanner.l
462 $(LEX) -Pdfilter_ -t $(srcdir)/dfilter-scanner.l > dfilter-scanner.c
464 libtool: $(LIBTOOL_DEPS)
465 $(SHELL) ./config.status --recheck