2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.241 2000/11/04 07:50:47 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 \
138 packet-smb-browse.c \
139 packet-smb-common.c \
141 packet-smb-mailslot.c \
185 packet-bootparams.h \
193 packet-diameter-defs.h \
208 packet-isis-hello.h \
226 packet-osi-options.h \
241 packet-smb-common.h \
259 packet-x11-declarations.h \
260 packet-x11-register-info.h \
261 packet-x11-keysym.h \
268 ETHEREAL_COMMON_SOURCES = \
301 $(DISSECTOR_SOURCES) \
302 $(ETHEREAL_COMMON_SOURCES) \
314 ethereal_static_SOURCES = \
317 EXTRA_ethereal_SOURCES = \
328 # Optional objects that I know how to build. These will be
329 # linked into the ethereal executable.
330 # They will also be linked into the tethereal executable; if this
331 # list ever grows to include something that can't be linked with
332 # tethereal, or if tethereal needs something that ethereal doesn't,
333 # we should probably split this into stuff needed both
334 # by ethereal and tethereal and stuff needed only by one or the
336 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
337 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@
339 # Additional libs that I know how to build. These will be
340 # linked into the ethereal executable.
341 ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a epan/libethereal.a
343 # This is the automake dependency variable for the executable
344 ethereal_DEPENDENCIES = \
345 $(ethereal_optional_objects) \
346 $(ethereal_additional_libs) \
347 plugins/gryphon/gryphon.la
349 ethereal_static_DEPENDENCIES = \
350 $(ethereal_optional_objects) \
351 $(ethereal_additional_libs)
353 # This automake variable adds to the link-line for the executable.
355 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
356 # they are included in @GTK_LIBS@, and doesn't have to be linked with
357 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
358 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
359 # applications are X applications).
361 $(ethereal_optional_objects) \
362 $(ethereal_additional_libs) \
365 "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
367 ethereal_static_LDADD = \
368 $(ethereal_optional_objects) \
369 $(ethereal_additional_libs) \
371 @PCAP_LIBS@ @GTK_LIBS@
373 ethereal_LDFLAGS = -export-dynamic
374 ethereal_static_LDFLAGS = -Wl,-static
376 tethereal_SOURCES = \
377 $(DISSECTOR_SOURCES) \
378 $(ETHEREAL_COMMON_SOURCES) \
381 # Additional libs that I know how to build. These will be
382 # linked into the tethereal executable.
383 tethereal_additional_libs = wiretap/libwiretap.a epan/libethereal.a
385 # This is the automake dependency variable for the executable
386 tethereal_DEPENDENCIES = \
387 $(ethereal_optional_objects) \
388 $(tethereal_additional_libs) \
389 plugins/gryphon/gryphon.la
391 # This automake variable adds to the link-line for the executable
392 tethereal_LDADD = wiretap/libwiretap.a \
393 $(ethereal_optional_objects) \
394 $(tethereal_additional_libs) \
397 "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
398 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
400 tethereal_LDFLAGS = -export-dynamic
402 editcap_SOURCES = editcap.c
404 # This is the automake dependency variable for the executable
405 editcap_DEPENDENCIES = wiretap/libwiretap.a
407 # This automake variable adds to the link-line for the executable
408 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
411 # Build "register.c", which contains a function "register_all_protocols()"
412 # that calls the register routines for all protocols.
414 # We do this by grepping through sources. If that turns out to be too slow,
415 # maybe we could just require every .o file to have an register routine
416 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
418 # Formatting conventions: The name of the proto_register_* routines must
419 # start in column zero, or must be preceded only by "void " starting in
420 # column zero, and must not be inside #if.
422 # We assume that all dissector routines are in "packet-XXX.c" files.
424 # For some unknown reason, having a big "for" loop in the Makefile
425 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
426 # they seem to pass only the first few names in the list to the shell,
429 # Therefore, we have a script to generate the "register.c" file.
431 # The first argument is the directory in which the source files live.
432 # All subsequent arguments are the files to scan.
434 register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
435 @echo Making register.c
436 @$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
439 ./rdps $(srcdir)/print.ps ps.c
442 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
445 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
447 randpkt: randpkt.o wiretap/libwiretap.a
448 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
460 debian/README.debian \
470 doc/README.developer \
473 doc/README.regression \
477 doc/ethereal.pod.template \
479 doc/tethereal.pod.template \
485 image/ethereal48x48-trans.png \
486 image/ethereal48x48.png \
489 image/icon-excl.xpm \
490 image/icon-ethereal.xpm \
493 libpcap-0.4.HPUX.HPUXPAC.patch \
494 libpcap-0.4.HPUX.LBL.patch \
495 libpcap-0.5.HPUX.tcpdump.org.patch \
516 -chmod +s $(DESTDIR)$(bindir)/ethereal
517 -chmod +s $(DESTDIR)$(bindir)/tethereal
518 -chmod +s $(DESTDIR)$(bindir)/ethereal_static
524 # Currently register.c can be included in the distribution because
525 # we always build all protocol dissectors. We used to have to check
526 # whether or not to build the snmp dissector. If we again need to
527 # variably build something, making register.c non-portable, uncomment
528 # the dist-hook line below.
530 # Oh, yuk. We don't want to include "register.c" in the distribution, as
531 # its contents depend on the configuration, and therefore we want it
532 # to be built when the first "make" is done; however, Automake insists
533 # on putting *all* source into the distribution.
535 # We work around this by having a "dist-hook" rule that deletes
536 # "register.c", so that "dist" won't pick it up.
539 # @rm -f $(distdir)/register.c
541 SUBDIRS = wiretap epan gtk plugins packaging @ethereal_SUBDIRS@
543 ethereal.1: ethereal doc/ethereal.pod.template
545 $(MAKE) ../ethereal.1 )
547 tethereal.1: tethereal doc/tethereal.pod.template
549 $(MAKE) ../tethereal.1 )
551 editcap.1: doc/editcap.pod
553 $(MAKE) ../editcap.1 )
555 packet-ncp2222.c : ncp2222.py
556 $(PYTHON) $(srcdir)/ncp2222.py > $@
558 libtool: $(LIBTOOL_DEPS)
559 $(SHELL) ./config.status --recheck
561 # We load top_stagedir with an explicit path so that libtool doesn't freak.
562 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
563 stagedir=$(top_stagedir)/$(PACKAGE).stage
567 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
568 if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
569 rm -rf $(stagedir) ; \
570 $(MAKE) DESTDIR=$(stagedir) install-strip; \
571 $(srcdir)/packaging/svr4/mkpkg \
573 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
577 echo "Error: SVR4 packaging tools not found." ; \
578 echo "Package build abandoned." ; \
581 solaris-package: svr4-package
583 specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
586 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
587 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
588 rpm -bb --clean --rmsource $(specfile) ; \
590 echo "Error: RPM executable and/or source directory not found." ; \
591 echo "Package build abandoned." ; \
595 if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
596 cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
597 rpm -bs --clean --rmsource $(specfile) ; \
599 echo "Error: RPM executable and/or source directory not found." ; \
600 echo "Package build abandoned." ; \
603 debian-package: debian/rules
604 dpkg-buildpackage -rfakeroot -us -uc
607 rm -rf $(top_stagedir)