2 # Automake file for Ethereal
4 # $Id: Makefile.am,v 1.565 2003/03/06 09:01:40 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 tethereal editcap mergecap dftest text2pcap
69 EXTRA_SCRIPTS = idl2eth
72 # Directory for Ethereal configuration files. Currently contains
73 # "manuf" file and diamter directory.
75 etherealconfdir = $(prefix)/share/ethereal
76 etherealconf_DATA = manuf
79 # Install the Diameter DTD and XML files in the "diameter" subdirectory
82 diameterdir = $(etherealconfdir)/diameter
83 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
84 nasreq.xml sunping.xml
107 packet-bootparams.c \
124 packet-dcerpc-afs4int.c \
125 packet-dcerpc-bossvr.c \
126 packet-dcerpc-browser.c \
127 packet-dcerpc-cds_clerkserver.c \
128 packet-dcerpc-cds_solicit.c \
129 packet-dcerpc-conv.c \
130 packet-dcerpc-cprpc_server.c \
131 packet-dcerpc-dce122.c \
132 packet-dcerpc-dfs.c \
133 packet-dcerpc-dnsserver.c \
134 packet-dcerpc-dtsprovider.c \
135 packet-dcerpc-dtsstime_req.c \
136 packet-dcerpc-epm.c \
137 packet-dcerpc-fldb.c \
138 packet-dcerpc-ftserver.c \
139 packet-dcerpc-krb5rpc.c \
140 packet-dcerpc-lsa.c \
141 packet-dcerpc-lsa-ds.c \
142 packet-dcerpc-mapi.c \
143 packet-dcerpc-mgmt.c \
144 packet-dcerpc-ndr.c \
145 packet-dcerpc-netlogon.c \
146 packet-dcerpc-nspi.c \
147 packet-dcerpc-oxid.c \
148 packet-dcerpc-reg.c \
149 packet-dcerpc-remact.c \
150 packet-dcerpc-rep_proc.c \
151 packet-dcerpc-roverride.c \
152 packet-dcerpc-rpriv.c \
153 packet-dcerpc-rs_acct.c \
154 packet-dcerpc-rs_attr.c \
155 packet-dcerpc-rs_misc.c \
156 packet-dcerpc-rs_pgo.c \
157 packet-dcerpc-rs_repadm.c \
158 packet-dcerpc-rs_replist.c \
159 packet-dcerpc-rs_unix.c \
160 packet-dcerpc-rsec_login.c \
161 packet-dcerpc-samr.c \
162 packet-dcerpc-secidmap.c \
163 packet-dcerpc-spoolss.c \
164 packet-dcerpc-srvsvc.c \
165 packet-dcerpc-tapi.c \
166 packet-dcerpc-tkn4int.c \
167 packet-dcerpc-ubikdisk.c \
168 packet-dcerpc-ubikvote.c \
169 packet-dcerpc-update.c \
170 packet-dcerpc-wkssvc.c \
238 packet-isis-hello.c \
270 packet-msn-messenger.c \
295 packet-osi-options.c \
313 packet-quakeworld.c \
346 packet-slowprotocols.c \
348 packet-smb-browse.c \
349 packet-smb-common.c \
351 packet-smb-mailslot.c \
366 packet-stat-notify.c \
393 packet-wfleet-hdlc.c \
415 plugins/docsis/docsis.la \
416 plugins/giop/cosnaming.la \
417 plugins/giop/coseventcomm.la \
418 plugins/gryphon/gryphon.la \
419 plugins/megaco/megaco.la \
420 plugins/mgcp/mgcp.la \
425 plugins/docsis/packet-bpkmattr-static.o \
426 plugins/docsis/packet-bpkmreq-static.o \
427 plugins/docsis/packet-bpkmrsp-static.o \
428 plugins/docsis/packet-docsis-static.o \
429 plugins/docsis/packet-dsaack-static.o \
430 plugins/docsis/packet-dsareq-static.o \
431 plugins/docsis/packet-dsarsp-static.o \
432 plugins/docsis/packet-dscack-static.o \
433 plugins/docsis/packet-dscreq-static.o \
434 plugins/docsis/packet-dscrsp-static.o \
435 plugins/docsis/packet-dsdreq-static.o \
436 plugins/docsis/packet-dsdrsp-static.o \
437 plugins/docsis/packet-macmgmt-static.o \
438 plugins/docsis/packet-map-static.o \
439 plugins/docsis/packet-regack-static.o \
440 plugins/docsis/packet-regreq-static.o \
441 plugins/docsis/packet-regrsp-static.o \
442 plugins/docsis/packet-rngreq-static.o \
443 plugins/docsis/packet-rngrsp-static.o \
444 plugins/docsis/packet-tlv-static.o \
445 plugins/docsis/packet-uccreq-static.o \
446 plugins/docsis/packet-uccrsp-static.o \
447 plugins/docsis/packet-ucd-static.o \
448 plugins/giop/packet-cosnaming-static.o \
449 plugins/giop/packet-coseventcomm-static.o \
450 plugins/gryphon/packet-gryphon-static.o \
451 plugins/megaco/packet-megaco-static.o \
452 plugins/mgcp/packet-mgcp-static.o \
453 plugins/pcli/packet-pcli-static.o
456 plugins/docsis/packet-bpkmattr.c \
457 plugins/docsis/packet-bpkmreq.c \
458 plugins/docsis/packet-bpkmrsp.c \
459 plugins/docsis/packet-docsis.c \
460 plugins/docsis/packet-dsaack.c \
461 plugins/docsis/packet-dsareq.c \
462 plugins/docsis/packet-dsarsp.c \
463 plugins/docsis/packet-dscack.c \
464 plugins/docsis/packet-dscreq.c \
465 plugins/docsis/packet-dscrsp.c \
466 plugins/docsis/packet-dsdreq.c \
467 plugins/docsis/packet-dsdrsp.c \
468 plugins/docsis/packet-macmgmt.c \
469 plugins/docsis/packet-map.c \
470 plugins/docsis/packet-regack.c \
471 plugins/docsis/packet-regreq.c \
472 plugins/docsis/packet-regrsp.c \
473 plugins/docsis/packet-rngreq.c \
474 plugins/docsis/packet-rngrsp.c \
475 plugins/docsis/packet-tlv.c \
476 plugins/docsis/packet-uccreq.c \
477 plugins/docsis/packet-uccrsp.c \
478 plugins/docsis/packet-ucd.c \
479 plugins/giop/packet-cosnaming.c \
480 plugins/giop/packet-coseventcomm.c \
481 plugins/gryphon/packet-gryphon.c \
482 plugins/megaco/packet-megaco.c \
483 plugins/mgcp/packet-mgcp.c \
484 plugins/pcli/packet-pcli.c
489 "-dlopen" plugins/docsis/docsis.la \
490 "-dlopen" plugins/giop/cosnaming.la \
491 "-dlopen" plugins/giop/coseventcomm.la \
492 "-dlopen" plugins/gryphon/gryphon.la \
493 "-dlopen" plugins/megaco/megaco.la \
494 "-dlopen" plugins/mgcp/mgcp.la \
495 "-dlopen" plugins/pcli/pcli.la
499 endif # ENABLE_STATIC
512 packet-afs-macros.h \
513 packet-afs-register-info.h \
520 packet-bootparams.h \
526 packet-dcerpc-browser.h \
527 packet-dcerpc-dce122.h \
528 packet-dcerpc-dfs.h \
529 packet-dcerpc-dnsserver.h \
530 packet-dcerpc-lsa.h \
531 packet-dcerpc-mapi.h \
532 packet-dcerpc-netlogon.h \
534 packet-dcerpc-reg.h \
535 packet-dcerpc-samr.h \
536 packet-dcerpc-spoolss.h \
537 packet-dcerpc-srvsvc.h \
538 packet-dcerpc-tapi.h \
539 packet-dcerpc-wkssvc.h \
542 packet-diameter-defs.h \
575 packet-isis-hello.h \
598 packet-osi-options.h \
619 packet-smb-browse.h \
620 packet-smb-common.h \
622 packet-smb-mailslot.h \
627 packet-stat-notify.h \
642 packet-x11-keysym.h \
648 ETHEREAL_COMMON_SRC = \
657 capture_stop_conditions.c \
658 capture_stop_conditions.h \
714 x11-register-info.h \
727 $(ETHEREAL_COMMON_SRC) \
745 EXTRA_ethereal_SOURCES = \
758 # Optional objects that I know how to build. These will be
759 # linked into the ethereal executable.
760 # They will also be linked into the tethereal executable; if this
761 # list ever grows to include something that can't be linked with
762 # tethereal, or if tethereal needs something that ethereal doesn't,
763 # we should probably split this into stuff needed both
764 # by ethereal and tethereal and stuff needed only by one or the
766 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
767 @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
769 # Additional libs that I know how to build. These will be
770 # linked into the ethereal executable.
771 ethereal_additional_libs = \
772 wiretap/libwiretap.a \
775 epan/ftypes/libftypes.a \
776 epan/dfilter/libdfilter.a
778 # This is the automake dependency variable for the executable
779 ethereal_DEPENDENCIES = \
780 $(ethereal_optional_objects) \
781 $(ethereal_additional_libs) \
784 # This automake variable adds to the link-line for the executable.
786 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
787 # they are included in @GTK_LIBS@, and doesn't have to be linked with
788 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
789 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
790 # applications are X applications).
793 ethereal_LDFLAGS = -Wl,-static -all-static
795 ethereal_LDFLAGS = -export-dynamic
799 $(ethereal_optional_objects) \
800 $(ethereal_additional_libs) \
801 @SNMP_LIBS@ @SSL_LIBS@ \
803 @PCAP_LIBS@ @GTK_LIBS@
805 TETHEREAL_TAP_SRC = \
811 tap-protohierstat.c \
816 tethereal_SOURCES = \
818 $(ETHEREAL_COMMON_SRC) \
819 $(TETHEREAL_TAP_SRC) \
820 tethereal-tap-register.c \
824 # Additional libs that I know how to build. These will be
825 # linked into the tethereal executable.
826 tethereal_additional_libs = \
827 wiretap/libwiretap.a \
829 epan/ftypes/libftypes.a \
830 epan/dfilter/libdfilter.a
832 # This is the automake dependency variable for the executable
833 tethereal_DEPENDENCIES = \
834 $(ethereal_optional_objects) \
835 $(tethereal_additional_libs) \
838 # This automake variable adds to the link-line for the executable
840 $(ethereal_optional_objects) \
841 $(tethereal_additional_libs) \
842 @SNMP_LIBS@ @SSL_LIBS@ \
845 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
848 tethereal_LDFLAGS = -Wl,-static -all-static
850 tethereal_LDFLAGS = -export-dynamic
853 # Optional objects that I know how to build, and that are needed by
855 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
857 text2pcap_SOURCES = text2pcap.c text2pcap-scanner.l
858 text2pcap_DEPENDENCIES = text2pcap.h
860 # This automake variable adds to the link-line for the executable
861 text2pcap_LDADD = $(text2pcap_optional_objects) \
864 mergecap_SOURCES = mergecap.c
865 mergecap_DEPENDENCIES = wiretap/libwiretap.a
867 editcap_SOURCES = editcap.c
869 # This is the automake dependency variable for the executable
870 editcap_DEPENDENCIES = wiretap/libwiretap.a
872 # This automake variable adds to the link-line for the executable
873 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
874 mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
877 # Build various header files for the X11 dissector.
879 x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
880 $(PERL) $(srcdir)/process-x11-fields.pl <$(srcdir)/x11-fields
883 # Build shell scripts by doing variable substitution.
884 # Taken from autoconf 2.13.
886 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
891 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
894 # Build "register.c", which contains a function "register_all_protocols()"
895 # that calls the register routines for all protocols.
897 # We do this by grepping through sources. If that turns out to be too slow,
898 # maybe we could just require every .o file to have an register routine
899 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
901 # Formatting conventions: The name of the proto_register_* routines must
902 # start in column zero, or must be preceded only by "void " starting in
903 # column zero, and must not be inside #if.
905 # We assume that all dissector routines are in "packet-XXX.c" files.
907 # For some unknown reason, having a big "for" loop in the Makefile
908 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
909 # they seem to pass only the first few names in the list to the shell,
912 # Therefore, we have a script to generate the "register.c" file.
914 # The first argument is the name of the file to write.
915 # The second argument is the directory in which the source files live.
916 # All subsequent arguments are the files to scan.
918 register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
919 @echo Making register.c
920 @$(srcdir)/make-reg-dotc register.c $(srcdir) $(plugin_src) $(DISSECTOR_SRC)
923 # Build "tethereal-tap-register.c", which contains a function
924 # "register_all_tap_listeners()"
925 # that calls the register routines for all tehtereal tap listeners.
927 # We do this by grepping through sources.
929 # Formatting conventions: The name of the tap_listener_register_*
930 # routines must start in column zero, or must be preceded only by
931 # "void " starting in column zero, and must not be inside #if.
933 # The first argument is the directory in which the source files live.
934 # All subsequent arguments are the files to scan.
936 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
937 @echo Making tethereal-tap-register.c
938 @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
941 ./rdps $(srcdir)/print.ps ps.c
944 $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
947 $(CC) -DHAVE_CONFIG_H -I. `glib-config --cflags` -c $(srcdir)/randpkt.c
949 randpkt: randpkt.o wiretap/libwiretap.a
950 $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
955 $(ETHEREAL_COMMON_SRC) \
959 dftest_additional_libs = \
960 wiretap/libwiretap.a \
962 epan/ftypes/libftypes.a \
963 epan/dfilter/libdfilter.a
965 dftest_DEPENDENCIES = \
966 $(ethereal_optional_objects) \
967 $(dftest_additional_libs) \
970 # This automake variable adds to the link-line for the executable
972 $(ethereal_optional_objects) \
973 $(dftest_additional_libs) \
974 @SNMP_LIBS@ @SSL_LIBS@ \
977 @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
979 dftest_LDFLAGS = -export-dynamic
985 aclocal-missing/*.m4 \
990 MAINTAINERCLEANFILES = \
1009 aclocal-fallback/glib-2.0.m4 \
1010 aclocal-fallback/glib.m4 \
1011 aclocal-fallback/gtk-2.0.m4 \
1012 aclocal-fallback/gtk.m4 \
1014 aclocal-missing/dummy \
1021 debian/README.debian \
1034 doc/Makefile.nmake \
1036 doc/README.developer \
1037 doc/README.idl2eth \
1038 doc/README.plugins \
1039 doc/README.regression \
1040 doc/README.tapping \
1042 doc/dfilter2pod.pl \
1044 doc/ethereal.pod.template \
1048 doc/tethereal.pod.template \
1056 image/Makefile.nmake \
1057 image/README.image \
1058 image/clist_ascend.xpm \
1059 image/clist_descend.xpm \
1060 image/dn_arrow.xpm \
1061 image/editcap.rc.in \
1062 image/eexcl3d64.xpm \
1063 image/eicon3d16.xpm \
1064 image/eicon3d32.xpm \
1065 image/eicon3d48.xpm \
1066 image/eicon3d64.xpm \
1067 image/elogo3d48x48.png \
1068 image/ethereal.ico \
1069 image/ethereal.rc.in \
1070 image/ethereal48x48-trans.png \
1071 image/ethereal48x48.png \
1072 image/hi16-app-ethereal.png \
1073 image/hi32-app-ethereal.png \
1074 image/hi48-app-ethereal.png \
1075 image/icon-ethereal.xpm \
1076 image/icon-excl.xpm \
1077 image/lo16-app-ethereal.png \
1078 image/lo32-app-ethereal.png \
1079 image/lo48-app-ethereal.png \
1080 image/mergecap.rc.in \
1081 image/nsis-checked.bmp \
1082 image/nsis-unchecked.bmp \
1083 image/tethereal.rc.in \
1084 image/text2pcap.rc.in \
1085 image/up_arrow.xpm \
1096 packet-ncp2222.inc \
1098 process-x11-fields.pl \
1102 text2pcap-scanner.l \
1110 -chmod +s $(DESTDIR)$(bindir)/ethereal
1111 -chmod +s $(DESTDIR)$(bindir)/tethereal
1117 # Currently register.c can be included in the distribution because
1118 # we always build all protocol dissectors. We used to have to check
1119 # whether or not to build the snmp dissector. If we again need to
1120 # variably build something, making register.c non-portable, uncomment
1121 # the dist-hook line below.
1123 # Oh, yuk. We don't want to include "register.c" in the distribution, as
1124 # its contents depend on the configuration, and therefore we want it
1125 # to be built when the first "make" is done; however, Automake insists
1126 # on putting *all* source into the distribution.
1128 # We work around this by having a "dist-hook" rule that deletes
1129 # "register.c", so that "dist" won't pick it up.
1132 # @rm -f $(distdir)/register.c
1134 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk
1137 SUBDIRS = tools wiretap doc epan plugins packaging @ethereal_SUBDIRS@
1139 SUBDIRS = tools wiretap doc epan packaging @ethereal_SUBDIRS@
1142 ethereal.1: ethereal doc/ethereal.pod.template
1144 $(MAKE) ../ethereal.1 )
1146 tethereal.1: tethereal doc/tethereal.pod.template
1148 $(MAKE) ../tethereal.1 )
1150 editcap.1: doc/editcap.pod
1152 $(MAKE) ../editcap.1 )
1154 idl2eth.1: doc/idl2eth.pod
1156 $(MAKE) ../idl2eth.1 )
1158 mergecap.1: doc/mergecap.pod
1160 $(MAKE) ../mergecap.1 )
1162 text2pcap.1: doc/text2pcap.pod
1164 $(MAKE) ../text2pcap.1 )
1166 packet-ncp2222.c : ncp2222.py
1167 $(PYTHON) $(srcdir)/ncp2222.py -o $@
1169 libtool: $(LIBTOOL_DEPS)
1170 $(SHELL) ./config.status --recheck
1172 # We load top_stagedir with an explicit path so that libtool doesn't freak.
1173 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
1174 stagedir=$(top_stagedir)/$(PACKAGE).stage
1178 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
1179 if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1180 rm -rf $(stagedir) ; \
1181 $(MAKE) DESTDIR=$(stagedir) install; \
1182 $(srcdir)/packaging/svr4/mkpkg \
1184 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1188 echo "Error: SVR4 packaging tools not found." ; \
1189 echo "Package build abandoned." ; \
1192 solaris-package: svr4-package
1194 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
1196 if test x$(HAVE_RPM) = xyes ; then \
1197 cd $(rpm_topdir) ; \
1198 mkdir -p BUILD RPMS SOURCES ; \
1200 ln -s ../../../$(distdir).tar.gz ; \
1202 rpm --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
1203 echo "Package successfully built in `pwd`/RPMS." ; \
1205 echo "Error: RPM executable and/or source directory not found." ; \
1208 if test x$(HAVE_RPM) = xyes ; then \
1209 cd $(rpm_topdir) ; \
1210 mkdir -p BUILD SRPMS SOURCES ; \
1212 ln -s ../../../$(distdir).tar.gz ; \
1214 rpm --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
1215 echo "Package successfully built in `pwd`/SRPMS." ; \
1217 echo "Error: RPM executable and/or source directory not found." ; \
1220 debian-package: debian/rules
1221 dpkg-buildpackage -rfakeroot -us -uc
1224 rm -rf $(top_stagedir)
1226 test-splint: $(ethereal_SOURCES)
1228 -gnu-extensions -D_U_="" \
1229 -I. `glib-config --cflags` \