2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.239 2000/10/26 09:14:28 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 ACLOCAL_AMFLAGS = `./aclocal-flags`
27 EXTRA_PROGRAMS = ethereal_static
28 bin_PROGRAMS = ethereal editcap tethereal
30 man_MANS = ethereal.1 editcap.1 tethereal.1
110 packet-osi-options.c \
137 packet-smb-browse.c \
138 packet-smb-common.c \
140 packet-smb-mailslot.c \
182 packet-bootparams.h \
190 packet-diameter-defs.h \
205 packet-isis-hello.h \
223 packet-osi-options.h \
238 packet-smb-common.h \
253 packet-x11-declarations.h \
254 packet-x11-register-info.h \
255 packet-x11-keysym.h \
262 ETHEREAL_COMMON_SOURCES = \
295 $(DISSECTOR_SOURCES) \
296 $(ETHEREAL_COMMON_SOURCES) \
308 ethereal_static_SOURCES = \
311 EXTRA_ethereal_SOURCES = \
322 # Optional objects that I know how to build. These will be
323 # linked into the ethereal executable.
324 # They will also be linked into the tethereal executable; if this
325 # list ever grows to include something that can't be linked with
326 # tethereal, or if tethereal needs something that ethereal doesn't,
327 # we should probably split this into stuff needed both
328 # by ethereal and tethereal and stuff needed only by one or the
330 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
331 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@
333 # Additional libs that I know how to build. These will be
334 # linked into the ethereal executable.
335 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a epan/libethereal.a
337 # This is the automake dependency variable for the executable
338 ethereal_DEPENDENCIES = \
339 $(ethereal_optional_objects) \
340 $(ethereal_additional_libs) \
341 plugins/gryphon/gryphon.la
343 ethereal_static_DEPENDENCIES = \
344 $(ethereal_optional_objects) \
345 $(ethereal_additional_libs)
347 # This automake variable adds to the link-line for the executable.
349 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
350 # they are included in @GTK_LIBS@, and doesn't have to be linked with
351 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
352 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
353 # applications are X applications).
355 $(ethereal_optional_objects) \
356 $(ethereal_additional_libs) \
359 "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
361 ethereal_static_LDADD = \
362 $(ethereal_optional_objects) \
363 $(ethereal_additional_libs) \
365 @PCAP_LIBS@ @GTK_LIBS@
367 ethereal_LDFLAGS = -export-dynamic
368 ethereal_static_LDFLAGS = -Wl,-static
370 tethereal_SOURCES = \
371 $(DISSECTOR_SOURCES) \
372 $(ETHEREAL_COMMON_SOURCES) \
375 # Additional libs that I know how to build. These will be
376 # linked into the tethereal executable.
377 tethereal_additional_libs = wiretap/libwiretap.a epan/libethereal.a
379 # This is the automake dependency variable for the executable
380 tethereal_DEPENDENCIES = \
381 $(ethereal_optional_objects) \
382 $(tethereal_additional_libs) \
383 plugins/gryphon/gryphon.la
385 # This automake variable adds to the link-line for the executable
386 tethereal_LDADD = wiretap/libwiretap.a \
387 $(ethereal_optional_objects) \
388 $(tethereal_additional_libs) \
391 "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
392 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
394 tethereal_LDFLAGS = -export-dynamic
396 editcap_SOURCES = editcap.c
398 # This is the automake dependency variable for the executable
399 editcap_DEPENDENCIES = wiretap/libwiretap.a
401 # This automake variable adds to the link-line for the executable
402 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
405 # Build "register.c", which contains a function "register_all_protocols()"
406 # that calls the register routines for all protocols.
408 # We do this by grepping through sources. If that turns out to be too slow,
409 # maybe we could just require every .o file to have an register routine
410 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
412 # Formatting conventions: The name of the proto_register_* routines must
413 # start in column zero, or must be preceded only by "void " starting in
414 # column zero, and must not be inside #if.
416 # We assume that all dissector routines are in "packet-XXX.c" files.
418 # For some unknown reason, having a big "for" loop in the Makefile
419 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
420 # they seem to pass only the first few names in the list to the shell,
423 # Therefore, we have a script to generate the "register.c" file.
425 # The first argument is the directory in which the source files live.
426 # All subsequent arguments are the files to scan.
428 register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
429 @echo Making register.c
430 @$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
433 ./rdps $(srcdir)/print.ps ps.c
436 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
439 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
441 randpkt: randpkt.o wiretap/libwiretap.a
442 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
454 debian/README.debian \
464 doc/README.developer \
467 doc/README.regression \
471 doc/ethereal.pod.template \
473 doc/tethereal.pod.template \
479 image/ethereal48x48-trans.png \
480 image/ethereal48x48.png \
483 image/icon-excl.xpm \
484 image/icon-ethereal.xpm \
487 libpcap-0.4.HPUX.HPUXPAC.patch \
488 libpcap-0.4.HPUX.LBL.patch \
489 libpcap-0.5.HPUX.tcpdump.org.patch \
510 -chmod +s $(DESTDIR)$(bindir)/ethereal
511 -chmod +s $(DESTDIR)$(bindir)/tethereal
512 -chmod +s $(DESTDIR)$(bindir)/ethereal_static
518 # Currently register.c can be included in the distribution because
519 # we always build all protocol dissectors. We used to have to check
520 # whether or not to build the snmp dissector. If we again need to
521 # variably build something, making register.c non-portable, uncomment
522 # the dist-hook line below.
524 # Oh, yuk. We don't want to include "register.c" in the distribution, as
525 # its contents depend on the configuration, and therefore we want it
526 # to be built when the first "make" is done; however, Automake insists
527 # on putting *all* source into the distribution.
529 # We work around this by having a "dist-hook" rule that deletes
530 # "register.c", so that "dist" won't pick it up.
533 # @rm -f $(distdir)/register.c
535 SUBDIRS = wiretap epan gtk plugins packaging @ethereal_SUBDIRS@
537 ethereal.1: ethereal doc/ethereal.pod.template
539 $(MAKE) ../ethereal.1 )
541 tethereal.1: tethereal doc/tethereal.pod.template
543 $(MAKE) ../tethereal.1 )
545 editcap.1: doc/editcap.pod
547 $(MAKE) ../editcap.1 )
549 packet-ncp2222.c : ncp2222.py
550 $(PYTHON) $(srcdir)/ncp2222.py > $@
552 libtool: $(LIBTOOL_DEPS)
553 $(SHELL) ./config.status --recheck
555 # We load top_stagedir with an explicit path so that libtool doesn't freak.
556 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
557 stagedir=$(top_stagedir)/$(PACKAGE).stage
561 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
562 if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
563 rm -rf $(stagedir) ; \
564 $(MAKE) DESTDIR=$(stagedir) install-strip; \
565 $(srcdir)/packaging/svr4/mkpkg \
567 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
571 echo "Error: SVR4 packaging tools not found." ; \
572 echo "Package build abandoned." ; \
575 solaris-package: svr4-package
577 specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
580 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
581 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
582 rpm -bb --clean --rmsource $(specfile) ; \
584 echo "Error: RPM executable and/or source directory not found." ; \
585 echo "Package build abandoned." ; \
589 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
590 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
591 rpm -bs --clean --rmsource $(specfile) ; \
593 echo "Error: RPM executable and/or source directory not found." ; \
594 echo "Package build abandoned." ; \
597 debian-package: debian/rules
598 dpkg-buildpackage -rfakeroot -us -uc
601 rm -rf $(top_stagedir)