2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.254 2000/11/29 06:17:34 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 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @tethereal_bin@
28 man_MANS = @ethereal_man@ @editcap_man@ @tethereal_man@
30 EXTRA_PROGRAMS = ethereal ethereal_static tethereal editcap
31 EXTRA_MANS = ethereal.1 tethereal.1 editcap.1
113 packet-osi-options.c \
141 packet-smb-browse.c \
142 packet-smb-common.c \
144 packet-smb-mailslot.c \
183 packet-afs-macros.h \
184 packet-afs-register-info.h \
189 packet-bootparams.h \
195 packet-diameter-defs.h \
210 packet-isis-hello.h \
226 packet-osi-options.h \
240 packet-smb-common.h \
258 packet-x11-declarations.h \
259 packet-x11-register-info.h \
260 packet-x11-keysym.h \
267 ETHEREAL_COMMON_SOURCES = \
302 $(DISSECTOR_SOURCES) \
303 $(ETHEREAL_COMMON_SOURCES) \
315 ethereal_static_SOURCES = \
318 EXTRA_ethereal_SOURCES = \
329 # Optional objects that I know how to build. These will be
330 # linked into the ethereal executable.
331 # They will also be linked into the tethereal executable; if this
332 # list ever grows to include something that can't be linked with
333 # tethereal, or if tethereal needs something that ethereal doesn't,
334 # we should probably split this into stuff needed both
335 # by ethereal and tethereal and stuff needed only by one or the
337 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
338 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@
340 # Additional libs that I know how to build. These will be
341 # linked into the ethereal executable.
342 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a epan/libethereal.a
344 # This is the automake dependency variable for the executable
345 ethereal_DEPENDENCIES = \
346 $(ethereal_optional_objects) \
347 $(ethereal_additional_libs) \
348 plugins/gryphon/gryphon.la \
351 ethereal_static_DEPENDENCIES = \
352 $(ethereal_optional_objects) \
353 $(ethereal_additional_libs)
355 # This automake variable adds to the link-line for the executable.
357 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
358 # they are included in @GTK_LIBS@, and doesn't have to be linked with
359 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
360 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
361 # applications are X applications).
363 $(ethereal_optional_objects) \
364 $(ethereal_additional_libs) \
367 "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@ \
368 "-dlopen" plugins/mgcp/mgcp.la @PCAP_LIBS@ @GTK_LIBS@
370 ethereal_static_LDADD = \
371 $(ethereal_optional_objects) \
372 $(ethereal_additional_libs) \
374 @PCAP_LIBS@ @GTK_LIBS@
376 ethereal_LDFLAGS = -export-dynamic
377 ethereal_static_LDFLAGS = -Wl,-static
379 tethereal_SOURCES = \
380 $(DISSECTOR_SOURCES) \
381 $(ETHEREAL_COMMON_SOURCES) \
384 # Additional libs that I know how to build. These will be
385 # linked into the tethereal executable.
386 tethereal_additional_libs = wiretap/libwiretap.a epan/libethereal.a
388 # This is the automake dependency variable for the executable
389 tethereal_DEPENDENCIES = \
390 $(ethereal_optional_objects) \
391 $(tethereal_additional_libs) \
392 plugins/gryphon/gryphon.la \
395 # This automake variable adds to the link-line for the executable
396 tethereal_LDADD = wiretap/libwiretap.a \
397 $(ethereal_optional_objects) \
398 $(tethereal_additional_libs) \
401 "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
402 "-dlopen" plugins/mgcp/mgcp.la @GLIB_LIBS@ -lm \
403 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
405 tethereal_LDFLAGS = -export-dynamic
407 editcap_SOURCES = editcap.c
409 # This is the automake dependency variable for the executable
410 editcap_DEPENDENCIES = wiretap/libwiretap.a
412 # This automake variable adds to the link-line for the executable
413 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
416 # Build "register.c", which contains a function "register_all_protocols()"
417 # that calls the register routines for all protocols.
419 # We do this by grepping through sources. If that turns out to be too slow,
420 # maybe we could just require every .o file to have an register routine
421 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
423 # Formatting conventions: The name of the proto_register_* routines must
424 # start in column zero, or must be preceded only by "void " starting in
425 # column zero, and must not be inside #if.
427 # We assume that all dissector routines are in "packet-XXX.c" files.
429 # For some unknown reason, having a big "for" loop in the Makefile
430 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
431 # they seem to pass only the first few names in the list to the shell,
434 # Therefore, we have a script to generate the "register.c" file.
436 # The first argument is the directory in which the source files live.
437 # All subsequent arguments are the files to scan.
439 register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
440 @echo Making register.c
441 @$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
444 ./rdps $(srcdir)/print.ps ps.c
447 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
450 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
452 randpkt: randpkt.o wiretap/libwiretap.a
453 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
465 debian/README.debian \
475 doc/README.developer \
478 doc/README.regression \
482 doc/ethereal.pod.template \
484 doc/tethereal.pod.template \
490 image/ethereal48x48-trans.png \
491 image/ethereal48x48.png \
494 image/icon-excl.xpm \
495 image/icon-ethereal.xpm \
498 libpcap-0.4.HPUX.HPUXPAC.patch \
499 libpcap-0.4.HPUX.LBL.patch \
500 libpcap-0.5.HPUX.tcpdump.org.patch \
521 -chmod +s $(DESTDIR)$(bindir)/ethereal
522 -chmod +s $(DESTDIR)$(bindir)/tethereal
523 -chmod +s $(DESTDIR)$(bindir)/ethereal_static
529 # Currently register.c can be included in the distribution because
530 # we always build all protocol dissectors. We used to have to check
531 # whether or not to build the snmp dissector. If we again need to
532 # variably build something, making register.c non-portable, uncomment
533 # the dist-hook line below.
535 # Oh, yuk. We don't want to include "register.c" in the distribution, as
536 # its contents depend on the configuration, and therefore we want it
537 # to be built when the first "make" is done; however, Automake insists
538 # on putting *all* source into the distribution.
540 # We work around this by having a "dist-hook" rule that deletes
541 # "register.c", so that "dist" won't pick it up.
544 # @rm -f $(distdir)/register.c
546 SUBDIRS = wiretap epan plugins packaging @ethereal_SUBDIRS@
548 ethereal.1: ethereal doc/ethereal.pod.template
550 $(MAKE) ../ethereal.1 )
552 tethereal.1: tethereal doc/tethereal.pod.template
554 $(MAKE) ../tethereal.1 )
556 editcap.1: doc/editcap.pod
558 $(MAKE) ../editcap.1 )
560 packet-ncp2222.c : ncp2222.py
561 $(PYTHON) $(srcdir)/ncp2222.py > $@
563 libtool: $(LIBTOOL_DEPS)
564 $(SHELL) ./config.status --recheck
566 # We load top_stagedir with an explicit path so that libtool doesn't freak.
567 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
568 stagedir=$(top_stagedir)/$(PACKAGE).stage
572 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
573 if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
574 rm -rf $(stagedir) ; \
575 $(MAKE) DESTDIR=$(stagedir) install-strip; \
576 $(srcdir)/packaging/svr4/mkpkg \
578 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
582 echo "Error: SVR4 packaging tools not found." ; \
583 echo "Package build abandoned." ; \
586 solaris-package: svr4-package
588 specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
591 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
592 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
593 rpm -bb --clean --rmsource $(specfile) ; \
595 echo "Error: RPM executable and/or source directory not found." ; \
596 echo "Package build abandoned." ; \
600 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
601 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
602 rpm -bs --clean --rmsource $(specfile) ; \
604 echo "Error: RPM executable and/or source directory not found." ; \
605 echo "Package build abandoned." ; \
608 debian-package: debian/rules
609 dpkg-buildpackage -rfakeroot -us -uc
612 rm -rf $(top_stagedir)