2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.479 2002/09/10 11:26:27 sahlberg Exp $
6 # Ethereal - Network traffic analyzer
7 # By Gerald Combs <gerald@ethereal.com>
8 # Copyright 1998 Gerald Combs
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
27 # This is a hideous hack.
29 # Automake needs to know into which sections to install various man
30 # pages; if the names in "man_MANS" have suffixes, it can infer the
31 # sections from the name (e.g., "hello.1" goes in section 1), but if
32 # they don't have suffixes, it can't tell what sections to put them, and
33 # it just gives up and doesn't create any rules to install them (and it
34 # gives up silently, so you have no clue what's wrong).
36 # Therefore, we can't just set "man_MANS" to a list of variables to be
37 # filled in by the configure script, as those variables don't have man
38 # page section numbers.
40 # It turns out (although this is not documented anywhere I could find
41 # in the automake Info file) that if you define, instead, variables with
42 # names like "man{section}_MANS", automake will infer that the names in
43 # those variables are the names of man pages to be installed in section
46 # So, as all our man pages go in section 1, we define "man1_MANS" to
47 # contain all the man page.
49 # *However*, if "man_MANS" isn't defined at all, automake concludes that
50 # there are no man pages, the fact that, say, "man1_MANS" is defined
51 # nonwithstanding! (I suspect this is the result of a mistaken attempt
52 # to get people to fix their automake files not to use "MANS"; if "MANS"
53 # is defined, it prints a warning and sets the exit status, but doesn't
54 # exit, and then it just gives up if "man_MANS" isn't defined,
55 # presumably on the theory that the only reason it wouldn't be defined
56 # is because the automake file uses the obsolete "MANS" variable instead
57 # of the shiny new "man_MANS" variable.)
59 # So we also define "man_MANS", but don't define it as anything;
60 # automake will arrange that the Makefile define it as the union of all
61 # the "man{section}_MANS" variables.
63 bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_man@ @editcap_man@ @mergecap_man@ @tethereal_man@ @text2pcap_man@ @idl2eth_man@
68 EXTRA_PROGRAMS = ethereal ethereal_static tethereal tethereal_static editcap mergecap dftest text2pcap
69 EXTRA_SCRIPTS = idl2eth
72 # Install "manuf" in the directory for Ethereal configuration files.
77 # Install the Diameter DTD and XML files in the "diameter" subdirectory
80 diameterdir = $(sysconfdir)/diameter
81 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
82 nasreq.xml sunping.xml
103 packet-bootparams.c \
117 packet-dcerpc-browser.c \
118 packet-dcerpc-conv.c \
119 packet-dcerpc-dfs.c \
120 packet-dcerpc-epm.c \
121 packet-dcerpc-lsa.c \
122 packet-dcerpc-mapi.c \
123 packet-dcerpc-mgmt.c \
124 packet-dcerpc-ndr.c \
125 packet-dcerpc-netlogon.c \
126 packet-dcerpc-nspi.c \
128 packet-dcerpc-oxid.c \
129 packet-dcerpc-reg.c \
130 packet-dcerpc-remact.c \
131 packet-dcerpc-rs_acct.c \
132 packet-dcerpc-rs_attr.c \
133 packet-dcerpc-rs_misc.c \
134 packet-dcerpc-rs_pgo.c \
135 packet-dcerpc-rs_replist.c \
136 packet-dcerpc-rs_unix.c \
137 packet-dcerpc-samr.c \
138 packet-dcerpc-spoolss.c \
139 packet-dcerpc-srvsvc.c \
140 packet-dcerpc-tapi.c \
141 packet-dcerpc-wkssvc.c \
194 packet-isis-hello.c \
245 packet-osi-options.c \
264 packet-quakeworld.c \
292 packet-slowprotocols.c \
293 packet-smb-browse.c \
294 packet-smb-common.c \
296 packet-smb-mailslot.c \
310 packet-stat-notify.c \
354 plugins/docsis/packet-bpkmattr.c \
355 plugins/docsis/packet-bpkmreq.c \
356 plugins/docsis/packet-bpkmrsp.c \
357 plugins/docsis/packet-docsis.c \
358 plugins/docsis/packet-dsaack.c \
359 plugins/docsis/packet-dsareq.c \
360 plugins/docsis/packet-dsarsp.c \
361 plugins/docsis/packet-dscack.c \
362 plugins/docsis/packet-dscreq.c \
363 plugins/docsis/packet-dscrsp.c \
364 plugins/docsis/packet-dsdreq.c \
365 plugins/docsis/packet-dsdrsp.c \
366 plugins/docsis/packet-macmgmt.c \
367 plugins/docsis/packet-map.c \
368 plugins/docsis/packet-regack.c \
369 plugins/docsis/packet-regreq.c \
370 plugins/docsis/packet-regrsp.c \
371 plugins/docsis/packet-rngreq.c \
372 plugins/docsis/packet-rngrsp.c \
373 plugins/docsis/packet-tlv.c \
374 plugins/docsis/packet-uccreq.c \
375 plugins/docsis/packet-uccrsp.c \
376 plugins/docsis/packet-ucd.c \
377 plugins/giop/packet-cosnaming.c \
378 plugins/giop/packet-coseventcomm.c \
379 plugins/gryphon/packet-gryphon.c \
380 plugins/mgcp/packet-mgcp.c
383 plugin_static_ldadd = \
384 plugins/docsis/packet-bpkmattr-static.o \
385 plugins/docsis/packet-bpkmreq-static.o \
386 plugins/docsis/packet-bpkmrsp-static.o \
387 plugins/docsis/packet-docsis-static.o \
388 plugins/docsis/packet-dsaack-static.o \
389 plugins/docsis/packet-dsareq-static.o \
390 plugins/docsis/packet-dsarsp-static.o \
391 plugins/docsis/packet-dscack-static.o \
392 plugins/docsis/packet-dscreq-static.o \
393 plugins/docsis/packet-dscrsp-static.o \
394 plugins/docsis/packet-dsdreq-static.o \
395 plugins/docsis/packet-dsdrsp-static.o \
396 plugins/docsis/packet-macmgmt-static.o \
397 plugins/docsis/packet-map-static.o \
398 plugins/docsis/packet-regack-static.o \
399 plugins/docsis/packet-regreq-static.o \
400 plugins/docsis/packet-regrsp-static.o \
401 plugins/docsis/packet-rngreq-static.o \
402 plugins/docsis/packet-rngrsp-static.o \
403 plugins/docsis/packet-tlv-static.o \
404 plugins/docsis/packet-uccreq-static.o \
405 plugins/docsis/packet-uccrsp-static.o \
406 plugins/docsis/packet-ucd-static.o \
407 plugins/giop/packet-cosnaming-static.o \
408 plugins/giop/packet-coseventcomm-static.o \
409 plugins/gryphon/packet-gryphon-static.o \
410 plugins/mgcp/packet-mgcp-static.o
413 plugins/docsis/docsis.la \
414 plugins/giop/cosnaming.la \
415 plugins/giop/coseventcomm.la \
416 plugins/gryphon/gryphon.la \
421 "-dlopen" plugins/docsis/docsis.la \
422 "-dlopen" plugins/giop/cosnaming.la \
423 "-dlopen" plugins/giop/coseventcomm.la \
424 "-dlopen" plugins/gryphon/gryphon.la \
425 "-dlopen" plugins/mgcp/mgcp.la
429 plugin_static_ldadd =
439 packet-afs-macros.h \
440 packet-afs-register-info.h \
446 packet-bootparams.h \
451 packet-dcerpc-browser.h \
452 packet-dcerpc-dfs.h \
453 packet-dcerpc-lsa.h \
454 packet-dcerpc-mapi.h \
455 packet-dcerpc-netlogon.h \
457 packet-dcerpc-reg.h \
458 packet-dcerpc-samr.h \
459 packet-dcerpc-spoolss.h \
460 packet-dcerpc-srvsvc.h \
461 packet-dcerpc-tapi.h \
462 packet-dcerpc-wkssvc.h \
465 packet-diameter-defs.h \
486 packet-isis-hello.h \
507 packet-osi-options.h \
528 packet-smb-browse.h \
529 packet-smb-common.h \
531 packet-smb-mailslot.h \
536 packet-stat-notify.h \
550 packet-x11-keysym.h \
557 ETHEREAL_COMMON_SRC = \
565 capture_stop_conditions.c \
566 capture_stop_conditions.h \
615 x11-register-info.h \
628 $(ETHEREAL_COMMON_SRC) \
648 ethereal_static_SOURCES = \
650 $(ETHEREAL_COMMON_SRC) \
670 EXTRA_ethereal_SOURCES = \
683 # Optional objects that I know how to build. These will be
684 # linked into the ethereal executable.
685 # They will also be linked into the tethereal executable; if this
686 # list ever grows to include something that can't be linked with
687 # tethereal, or if tethereal needs something that ethereal doesn't,
688 # we should probably split this into stuff needed both
689 # by ethereal and tethereal and stuff needed only by one or the
691 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
692 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
694 # Additional libs that I know how to build. These will be
695 # linked into the ethereal executable.
697 ethereal_additional_libs = \
698 wiretap/libwiretap.a \
701 epan/ftypes/libftypes.a \
702 epan/dfilter/libdfilter.a
704 ethereal_additional_libs = \
705 wiretap/libwiretap.a \
708 epan/ftypes/libftypes.a \
709 epan/dfilter/libdfilter.a
712 # This is the automake dependency variable for the executable
713 ethereal_DEPENDENCIES = \
714 $(ethereal_optional_objects) \
715 $(ethereal_additional_libs) \
718 ethereal_static_DEPENDENCIES = \
719 $(ethereal_optional_objects) \
720 $(ethereal_additional_libs)
722 # This automake variable adds to the link-line for the executable.
724 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
725 # they are included in @GTK_LIBS@, and doesn't have to be linked with
726 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
727 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
728 # applications are X applications).
730 $(ethereal_optional_objects) \
731 $(ethereal_additional_libs) \
732 @SNMP_LIBS@ @SSL_LIBS@ \
734 @PCAP_LIBS@ @GTK_LIBS@
736 ethereal_static_LDADD = \
738 $(plugin_static_ldadd) \
739 $(ethereal_optional_objects) \
740 $(ethereal_additional_libs) \
741 @SNMP_LIBS@ @SSL_LIBS@ \
742 @PCAP_LIBS@ @GTK_LIBS@
744 ethereal_LDFLAGS = -export-dynamic
745 ethereal_static_LDFLAGS = -Wl,-static
747 tethereal_SOURCES = \
749 $(ETHEREAL_COMMON_SRC) \
753 tethereal_static_SOURCES = \
755 $(ETHEREAL_COMMON_SRC) \
759 # Additional libs that I know how to build. These will be
760 # linked into the tethereal executable.
761 tethereal_additional_libs = \
762 wiretap/libwiretap.a \
764 epan/ftypes/libftypes.a \
765 epan/dfilter/libdfilter.a
767 # This is the automake dependency variable for the executable
768 tethereal_DEPENDENCIES = \
769 $(ethereal_optional_objects) \
770 $(tethereal_additional_libs) \
773 tethereal_static_DEPENDENCIES = \
774 $(ethereal_optional_objects) \
775 $(tethereal_additional_libs)
777 # This automake variable adds to the link-line for the executable
778 tethereal_LDADD = wiretap/libwiretap.a \
779 $(ethereal_optional_objects) \
780 $(tethereal_additional_libs) \
781 @SNMP_LIBS@ @SSL_LIBS@ \
784 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
786 tethereal_static_LDADD = \
788 $(plugin_static_ldadd) \
789 wiretap/libwiretap.a \
790 $(ethereal_optional_objects) \
791 $(tethereal_additional_libs) \
792 @SNMP_LIBS@ @SSL_LIBS@ \
794 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
796 tethereal_LDFLAGS = -export-dynamic
797 tethereal_static_LDFLAGS = -Wl,-static
799 # Optional objects that I know how to build, and that are needed by
801 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
803 text2pcap_SOURCES = text2pcap.c text2pcap-scanner.l
804 text2pcap_DEPENDENCIES = text2pcap.h
806 # This automake variable adds to the link-line for the executable
807 text2pcap_LDADD = $(text2pcap_optional_objects) \
810 mergecap_SOURCES = mergecap.c
811 mergecap_DEPENDENCIES = wiretap/libwiretap.a
813 editcap_SOURCES = editcap.c
815 # This is the automake dependency variable for the executable
816 editcap_DEPENDENCIES = wiretap/libwiretap.a
818 # This automake variable adds to the link-line for the executable
819 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
820 mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
823 # Build various header files for the X11 dissector.
825 x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
826 $(PERL) $(srcdir)/process-x11-fields.pl <$(srcdir)/x11-fields
829 # Build shell scripts by doing variable substitution.
830 # Taken from autoconf 2.13.
832 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
837 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
840 # Build "register.c", which contains a function "register_all_protocols()"
841 # that calls the register routines for all protocols.
843 # We do this by grepping through sources. If that turns out to be too slow,
844 # maybe we could just require every .o file to have an register routine
845 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
847 # Formatting conventions: The name of the proto_register_* routines must
848 # start in column zero, or must be preceded only by "void " starting in
849 # column zero, and must not be inside #if.
851 # We assume that all dissector routines are in "packet-XXX.c" files.
853 # For some unknown reason, having a big "for" loop in the Makefile
854 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
855 # they seem to pass only the first few names in the list to the shell,
858 # Therefore, we have a script to generate the "register.c" file.
860 # The first argument is the directory in which the source files live.
861 # All subsequent arguments are the files to scan.
863 register.c: $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
864 @echo Making register.c
865 @$(srcdir)/make-reg-dotc register.c $(srcdir) $(DISSECTOR_SRC)
867 register-static.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
868 @echo Making register-static.c
869 @$(srcdir)/make-reg-dotc register-static.c $(srcdir) $(plugin_src) $(DISSECTOR_SRC)
872 ./rdps $(srcdir)/print.ps ps.c
875 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
878 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
880 randpkt: randpkt.o wiretap/libwiretap.a
881 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
886 $(ETHEREAL_COMMON_SRC) \
890 dftest_additional_libs = \
891 wiretap/libwiretap.a \
893 epan/ftypes/libftypes.a \
894 epan/dfilter/libdfilter.a
896 dftest_DEPENDENCIES = \
897 $(ethereal_optional_objects) \
898 $(dftest_additional_libs) \
901 # This automake variable adds to the link-line for the executable
903 $(ethereal_optional_objects) \
904 $(dftest_additional_libs) \
905 @SNMP_LIBS@ @SSL_LIBS@ \
908 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
910 dftest_LDFLAGS = -export-dynamic
916 aclocal-missing/*.m4 \
937 aclocal-fallback/*.m4 \
945 debian/README.debian \
960 doc/README.developer \
963 doc/README.regression \
967 doc/ethereal.pod.template \
971 doc/tethereal.pod.template \
979 image/Makefile.nmake \
981 image/clist_ascend.xpm \
982 image/clist_descend.xpm \
984 image/editcap.rc.in \
985 image/eexcl3d64.xpm \
986 image/eicon3d16.xpm \
987 image/eicon3d32.xpm \
988 image/eicon3d48.xpm \
989 image/eicon3d64.xpm \
990 image/elogo3d48x48.png \
992 image/ethereal.rc.in \
993 image/ethereal48x48-trans.png \
994 image/ethereal48x48.png \
995 image/hi16-app-ethereal.png \
996 image/hi32-app-ethereal.png \
997 image/hi48-app-ethereal.png \
998 image/icon-ethereal.xpm \
999 image/icon-excl.xpm \
1000 image/lo16-app-ethereal.png \
1001 image/lo32-app-ethereal.png \
1002 image/lo48-app-ethereal.png \
1003 image/mergecap.rc.in \
1004 image/nsis-checked.bmp \
1005 image/nsis-unchecked.bmp \
1006 image/tethereal.rc.in \
1007 image/text2pcap.rc.in \
1008 image/up_arrow.xpm \
1018 packet-ncp2222.inc \
1020 process-x11-fields.pl \
1024 text2pcap-scanner.l \
1032 -chmod +s $(DESTDIR)$(bindir)/ethereal
1033 -chmod +s $(DESTDIR)$(bindir)/tethereal
1034 -chmod +s $(DESTDIR)$(bindir)/ethereal_static
1040 # Currently register.c can be included in the distribution because
1041 # we always build all protocol dissectors. We used to have to check
1042 # whether or not to build the snmp dissector. If we again need to
1043 # variably build something, making register.c non-portable, uncomment
1044 # the dist-hook line below.
1046 # Oh, yuk. We don't want to include "register.c" in the distribution, as
1047 # its contents depend on the configuration, and therefore we want it
1048 # to be built when the first "make" is done; however, Automake insists
1049 # on putting *all* source into the distribution.
1051 # We work around this by having a "dist-hook" rule that deletes
1052 # "register.c", so that "dist" won't pick it up.
1055 # @rm -f $(distdir)/register.c
1057 # Hack around the problem that I haven't found a way to include an
1058 # empty directroy in the distribution tarball.
1060 mkdir -p aclocal-missing
1062 DIST_SUBDIRS = tools wiretap doc epan plugins packaging \
1066 SUBDIRS = tools wiretap doc epan plugins packaging @ethereal_SUBDIRS@
1068 SUBDIRS = tools wiretap doc epan packaging @ethereal_SUBDIRS@
1071 ethereal.1: ethereal doc/ethereal.pod.template
1073 $(MAKE) ../ethereal.1 )
1075 tethereal.1: tethereal doc/tethereal.pod.template
1077 $(MAKE) ../tethereal.1 )
1079 editcap.1: doc/editcap.pod
1081 $(MAKE) ../editcap.1 )
1083 idl2eth.1: doc/idl2eth.pod
1085 $(MAKE) ../idl2eth.1 )
1087 mergecap.1: doc/mergecap.pod
1089 $(MAKE) ../mergecap.1 )
1091 text2pcap.1: doc/text2pcap.pod
1093 $(MAKE) ../text2pcap.1 )
1095 packet-ncp2222.c : ncp2222.py
1096 $(PYTHON) $(srcdir)/ncp2222.py -o $@
1098 libtool: $(LIBTOOL_DEPS)
1099 $(SHELL) ./config.status --recheck
1101 # We load top_stagedir with an explicit path so that libtool doesn't freak.
1102 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
1103 stagedir=$(top_stagedir)/$(PACKAGE).stage
1107 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
1108 if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1109 rm -rf $(stagedir) ; \
1110 $(MAKE) DESTDIR=$(stagedir) install; \
1111 $(srcdir)/packaging/svr4/mkpkg \
1113 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1117 echo "Error: SVR4 packaging tools not found." ; \
1118 echo "Package build abandoned." ; \
1121 solaris-package: svr4-package
1123 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
1125 if test x$(HAVE_RPM) = xyes ; then \
1126 cd $(rpm_topdir) ; \
1127 mkdir -p BUILD RPMS SOURCES ; \
1129 ln -s ../../../$(distdir).tar.gz ; \
1131 rpm --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
1132 echo "Package successfully built in `pwd`/RPMS." ; \
1134 echo "Error: RPM executable and/or source directory not found." ; \
1137 if test x$(HAVE_RPM) = xyes ; then \
1138 cd $(rpm_topdir) ; \
1139 mkdir -p BUILD SRPMS SOURCES ; \
1141 ln -s ../../../$(distdir).tar.gz ; \
1143 rpm --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
1144 echo "Package successfully built in `pwd`/SRPMS." ; \
1146 echo "Error: RPM executable and/or source directory not found." ; \
1149 debian-package: debian/rules
1150 dpkg-buildpackage -rfakeroot -us -uc
1153 rm -rf $(top_stagedir)