2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.203 2000/06/07 22:57:43 gram 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
104 packet-osi-options.c \
128 packet-smb-browse.c \
129 packet-smb-common.c \
131 packet-smb-mailslot.c \
168 packet-bootparams.h \
187 packet-isis-hello.h \
203 packet-osi-options.h \
218 packet-smb-common.h \
239 ETHEREAL_COMMON_SOURCES = \
292 $(DISSECTOR_SOURCES) \
293 $(ETHEREAL_COMMON_SOURCES) \
305 ethereal_static_SOURCES = \
308 EXTRA_ethereal_SOURCES = \
324 # Optional objects that I know how to build. These will be
325 # linked into the ethereal executable.
326 # They will also be linked into the tethereal executable; if this
327 # list ever grows to include something that can't be linked with
328 # tethereal, or if tethereal needs something that ethereal doesn't,
329 # we should probably split this into stuff needed both
330 # by ethereal and tethereal and stuff needed only by one or the
332 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
333 @STRNCASECMP_O@ @MKSTEMP_O@ \
334 @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@
336 # Additional libs that I know how to build. These will be
337 # linked into the ethereal executable.
338 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
340 # This is the automake dependency variable for the executable
341 ethereal_DEPENDENCIES = \
342 $(ethereal_optional_objects) \
343 $(ethereal_additional_libs) \
344 plugins/gryphon/gryphon.la
346 ethereal_static_DEPENDENCIES = \
347 $(ethereal_optional_objects) \
348 $(ethereal_additional_libs)
350 # This automake variable adds to the link-line for the executable.
352 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
353 # they are included in @GTK_LIBS@, and doesn't have to be linked with
354 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
355 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
356 # applications are X applications).
358 $(ethereal_optional_objects) \
359 $(ethereal_additional_libs) \
362 "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
364 ethereal_static_LDADD = \
365 $(ethereal_optional_objects) \
366 $(ethereal_additional_libs) \
368 @PCAP_LIBS@ @GTK_LIBS@
370 ethereal_LDFLAGS = -export-dynamic
371 ethereal_static_LDFLAGS = -Wl,-static
373 tethereal_SOURCES = \
374 $(DISSECTOR_SOURCES) \
375 $(ETHEREAL_COMMON_SOURCES) \
378 # Additional libs that I know how to build. These will be
379 # linked into the tethereal executable.
380 tethereal_additional_libs = wiretap/libwiretap.a
382 # This is the automake dependency variable for the executable
383 tethereal_DEPENDENCIES = \
384 $(ethereal_optional_objects) \
385 $(tethereal_additional_libs) \
386 plugins/gryphon/gryphon.la
388 # This automake variable adds to the link-line for the executable
389 tethereal_LDADD = wiretap/libwiretap.a \
390 $(ethereal_optional_objects) \
391 $(tethereal_additional_libs) \
394 "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
395 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
397 tethereal_LDFLAGS = -export-dynamic
399 editcap_SOURCES = editcap.c
401 # This is the automake dependency variable for the executable
402 editcap_DEPENDENCIES = wiretap/libwiretap.a
404 # This automake variable adds to the link-line for the executable
405 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
408 # Build "register.c", which contains a function "register_all_protocols()"
409 # that calls the register routines for all protocols.
411 # We do this by grepping through sources. If that turns out to be too slow,
412 # maybe we could just require every .o file to have an register routine
413 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
415 # Formatting conventions: The name of the proto_register_* routines must
416 # start in column zero, or must be preceded only by "void " starting in
417 # column zero, and must not be inside #if.
419 # We assume that all dissector routines are in "packet-XXX.c" files,
422 # For some unknown reason, having a big "for" loop in the Makefile
423 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
424 # they seem to pass only the first few names in the list to the shell,
427 # Therefore, we have a script to generate the "register.c" file.
429 # The first argument is the directory in which the source files live.
430 # All subsequent arguments are the files to scan.
432 register.c: packet.c $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
433 @echo Making register.c
434 @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
437 ./rdps $(srcdir)/print.ps ps.c
440 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
443 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
445 randpkt: randpkt.o wiretap/libwiretap.a
446 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
448 tvbtest: tvbtest.o tvbuff.o except.o
459 debian/README.debian \
469 doc/README.developer \
472 doc/README.regression \
476 doc/ethereal.pod.template \
478 doc/tethereal.pod.template \
485 image/ethereal48x48-trans.png \
486 image/ethereal48x48.png \
489 image/icon-excl.xpm \
490 image/icon-ethereal.xpm \
512 -chmod +s $(DESTDIR)$(bindir)/ethereal
513 -chmod +s $(DESTDIR)$(bindir)/tethereal
514 -chmod +s $(DESTDIR)$(bindir)/ethereal_static
520 # Currently register.c can be included in the distribution because
521 # we always build all protocol dissectors. We used to have to check
522 # whether or not to build the snmp dissector. If we again need to
523 # variably build something, making register.c non-portable, uncomment
524 # the dist-hook line below.
526 # Oh, yuk. We don't want to include "register.c" in the distribution, as
527 # its contents depend on the configuration, and therefore we want it
528 # to be built when the first "make" is done; however, Automake insists
529 # on putting *all* source into the distribution.
531 # We work around this by having a "dist-hook" rule that deletes
532 # "register.c", so that "dist" won't pick it up.
535 # @rm -f $(distdir)/register.c
537 SUBDIRS = wiretap gtk plugins @ethereal_SUBDIRS@
539 ethereal.1: ethereal doc/ethereal.pod.template
541 $(MAKE) ../ethereal.1 )
543 tethereal.1: tethereal doc/tethereal.pod.template
545 $(MAKE) ../tethereal.1 )
547 editcap.1: doc/editcap.pod
549 $(MAKE) ../editcap.1 )
551 dfilter-scanner.c : dfilter-scanner.l
552 $(LEX) -Pdfilter_ -odfilter-scanner.c $(srcdir)/dfilter-scanner.l
554 libtool: $(LIBTOOL_DEPS)
555 $(SHELL) ./config.status --recheck