2 # Automake file for Wireshark
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
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`
26 INCLUDES= @LUA_INCLUDES@
29 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
31 py_dissectors_dir = -DPYTHON_DIR=
35 if HAVE_WARNINGS_AS_ERRORS
36 AM_CLEAN_CFLAGS = -Werror
50 bin_SCRIPTS = @idl2wrs_bin@
52 EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
53 randpkt text2pcap dumpcap rawshark
54 EXTRA_SCRIPTS = idl2wrs
56 idl2wrs: tools/idl2wrs.sh Makefile
57 cp tools/idl2wrs.sh idl2wrs
61 # Wireshark configuration files are put in $(pkgdatadir).
63 pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
64 smi_modules ipmap.html
67 # Install the Diameter DTD and XML files in the "diameter" subdirectory
70 diameterdir = $(pkgdatadir)/diameter
72 diameter/chargecontrol.xml \
73 diameter/dictionary.dtd \
74 diameter/dictionary.xml \
76 diameter/Ericsson.xml \
77 diameter/etsie2e4.xml \
78 diameter/gqpolicy.xml \
79 diameter/imscxdx.xml \
80 diameter/mobileipv4.xml \
83 diameter/sunping.xml \
84 diameter/TGPPGmb.xml \
89 # Install the DTDs directory files in the "dtds" subdirectory
92 dtdsdir = $(pkgdatadir)/dtds
97 dtds/pocsettings.dtd \
104 dtds/xcap-error.dtd \
108 # Install the RADIUS directory files in the "radius" subdirectory
111 radiusdir = $(pkgdatadir)/radius
114 radius/dictionary.3com \
115 radius/dictionary.3gpp \
116 radius/dictionary.3gpp2 \
117 radius/dictionary.acc \
118 radius/dictionary.alcatel \
119 radius/dictionary.alteon \
120 radius/dictionary.altiga \
121 radius/dictionary.aptis \
122 radius/dictionary.ascend \
123 radius/dictionary.aruba \
124 radius/dictionary.bay \
125 radius/dictionary.bintec \
126 radius/dictionary.bristol \
127 radius/dictionary.cablelabs \
128 radius/dictionary.cabletron \
129 radius/dictionary.cisco \
130 radius/dictionary.cisco.bbsm \
131 radius/dictionary.cisco.vpn3000 \
132 radius/dictionary.cisco.vpn5000 \
133 radius/dictionary.colubris \
134 radius/dictionary.columbia_university \
135 radius/dictionary.compat \
136 radius/dictionary.cosine \
137 radius/dictionary.ericsson \
138 radius/dictionary.erx \
139 radius/dictionary.extreme \
140 radius/dictionary.foundry \
141 radius/dictionary.freeradius \
142 radius/dictionary.gandalf \
143 radius/dictionary.garderos \
144 radius/dictionary.gemtek \
145 radius/dictionary.itk \
146 radius/dictionary.juniper \
147 radius/dictionary.karlnet \
148 radius/dictionary.livingston \
149 radius/dictionary.localweb \
150 radius/dictionary.merit \
151 radius/dictionary.microsoft \
152 radius/dictionary.mikrotik \
153 radius/dictionary.navini \
154 radius/dictionary.netscreen \
155 radius/dictionary.nokia \
156 radius/dictionary.nomadix \
157 radius/dictionary.propel \
158 radius/dictionary.quintum \
159 radius/dictionary.redback \
160 radius/dictionary.redcreek \
161 radius/dictionary.shasta \
162 radius/dictionary.shiva \
163 radius/dictionary.sonicwall \
164 radius/dictionary.springtide \
165 radius/dictionary.starent \
166 radius/dictionary.t_systems_nova \
167 radius/dictionary.telebit \
168 radius/dictionary.trapeze \
169 radius/dictionary.tunnel \
170 radius/dictionary.unisphere \
171 radius/dictionary.unix \
172 radius/dictionary.usr \
173 radius/dictionary.valemount \
174 radius/dictionary.versanet \
175 radius/dictionary.wimax \
176 radius/dictionary.wispr \
177 radius/dictionary.xedia
180 # Install the tpncp directory files in the "tpncp" subdirectory
183 tpncpdir = $(pkgdatadir)/tpncp
189 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
192 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
194 wimaxasncp/dictionary.xml \
195 wimaxasncp/dictionary.dtd
197 PLATFORM_SRC = capture-pcap-util-unix.c
200 -include plugins/Custom.make
201 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
202 -dlopen plugins/asn1/asn1.la \
203 -dlopen plugins/docsis/docsis.la \
204 -dlopen plugins/ethercat/ethercat.la \
205 -dlopen plugins/giop/cosnaming.la \
206 -dlopen plugins/giop/coseventcomm.la \
207 -dlopen plugins/gryphon/gryphon.la \
208 -dlopen plugins/irda/irda.la \
209 -dlopen plugins/m2m/m2m.la \
210 -dlopen plugins/mate/mate.la \
211 -dlopen plugins/opcua/opcua.la \
212 -dlopen plugins/profinet/profinet.la \
213 -dlopen plugins/sercosiii/sercosiii.la \
214 -dlopen plugins/stats_tree/stats_tree.la \
215 -dlopen plugins/unistim/unistim.la \
216 -dlopen plugins/wimax/wimax.la
218 WTAP_PLUGIN_SOURCES = \
226 WTAP_PLUGIN_SOURCES =
230 include Makefile.common
232 # Optional objects that I know how to build. These will be
233 # linked into the wireshark executable.
234 # They will also be linked into the tshark executable; if this
235 # list ever grows to include something that can't be linked with
236 # tshark, or if tshark needs something that wireshark doesn't,
237 # we should probably split this into stuff needed both
238 # by wireshark and tshark and stuff needed only by one or the
240 wireshark_optional_objects = @GETOPT_O@ @STRERROR_O@ \
241 @STRCASECMP_O@ @STRNCASECMP_O@ @STRPTIME_O@
244 wireshark_LDFLAGS = -Wl,-static -all-static
246 wireshark_LDFLAGS = -export-dynamic
249 # Libraries and plugin flags with which to link wireshark.
251 # Note that Wireshark doesn't have to be linked with @GLIB_LIBS@, as
252 # they are included in @GTK_LIBS@, and doesn't have to be linked with
253 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
254 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
255 # applications are X applications).
257 $(wireshark_optional_objects) \
260 wiretap/libwiretap.la \
261 epan/libwireshark.la \
262 wsutil/libwsutil.la \
278 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
281 tshark_LDFLAGS = -Wl,-static -all-static
283 tshark_LDFLAGS = -export-dynamic
286 # Libraries and plugin flags with which to link tshark.
288 $(wireshark_optional_objects) \
289 wiretap/libwiretap.la \
290 epan/libwireshark.la \
291 wsutil/libwsutil.la \
308 tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
311 rawshark_LDFLAGS = -Wl,-static -all-static
313 rawshark_LDFLAGS = -export-dynamic
316 # Libraries and plugin flags with which to link tshark.
318 $(wireshark_optional_objects) \
319 wiretap/libwiretap.la \
320 epan/libwireshark.la \
321 wsutil/libwsutil.la \
338 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
340 # Optional objects that I know how to build, and that are needed by
342 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
344 # Libraries with which to link text2pcap.
346 $(text2pcap_optional_objects) \
347 wiretap/libwiretap.la \
348 wsutil/libwsutil.la \
350 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
351 # which is generated (and therefore not always clean).
352 # We could generate text2pcap.o as a library with -Werror but for now it
353 # doesn't seem worth the effort.
354 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
356 # Libraries with which to link mergecap.
358 wiretap/libwiretap.la \
359 wsutil/libwsutil.la \
361 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
363 # Libraries with which to link capinfos.
365 wiretap/libwiretap.la \
366 wsutil/libwsutil.la \
368 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
370 # Libraries with which to link editcap.
372 wiretap/libwiretap.la \
373 wsutil/libwsutil.la \
375 editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
377 # Libraries with which to link randpkt.
379 wiretap/libwiretap.la \
380 wsutil/libwsutil.la \
387 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
389 # Libraries and plugin flags with which to link dftest.
391 $(wireshark_optional_objects) \
392 wiretap/libwiretap.la \
393 wsutil/libwsutil.la \
394 epan/libwireshark.la \
408 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
410 # Libraries with which to link dumpcap.
412 wiretap/libwiretap.la \
413 wsutil/libwsutil.la \
423 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
426 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
427 $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS)
430 # Build the version string
432 # FORCE is the portable version of .PHONY
436 LANG=C $(PERL) $(srcdir)/make-version.pl $(srcdir)
439 # Build shell scripts by doing variable substitution.
440 # Taken from autoconf 2.13.
442 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
447 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
450 # Build "tshark-tap-register.c", which contains a function
451 # "register_all_tap_listeners()"
452 # that calls the register routines for all tshark tap listeners.
454 # We do this by grepping through sources.
456 # Formatting conventions: The name of the tap_listener_register_*
457 # routines must start in column zero, or must be preceded only by
458 # "void " starting in column zero, and must not be inside #if.
460 # The first argument is the directory in which the source files live.
461 # All subsequent arguments are the files to scan.
463 tshark-tap-register.c: $(TSHARK_TAP_SRC) $(srcdir)/make-tapreg-dotc
464 @echo Making tshark-tap-register.c
465 @$(srcdir)/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC)
467 ps.c: print.ps rdps.py
468 $(PYTHON) $(srcdir)/rdps.py $(srcdir)/print.ps ps.c
471 # XXX - "svnversion.h" is distributed in the release tarball; should
472 # we be deleting it with "make clean", or should we only do that with
473 # "make maintainer-clean"?
482 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
483 # list of files removed by "make distclean"? (It's deliberately
484 # included in that list.)
489 MAINTAINERCLEANFILES = \
515 aclocal-fallback/glib-2.0.m4 \
516 aclocal-fallback/gtk-2.0.m4 \
524 capture_wpcap_packet.c \
525 capture_wpcap_packet.h \
535 debian/headers-check.c \
536 debian/patches/00list \
537 debian/patches/03_preferences.dpatch \
542 debian/README.source \
543 debian/tshark.files \
544 debian/tshark.manpages \
546 debian/wireshark-common.files \
547 debian/wireshark-common.manpages \
548 debian/wireshark-common.shlibs \
549 debian/wireshark-dev.docs \
550 debian/wireshark-dev.files \
551 debian/wireshark-dev.header-files \
552 debian/wireshark-dev.manpages \
553 debian/wireshark-dev.prerm \
554 debian/wireshark-root.desktop \
555 debian/wireshark.desktop \
556 debian/wireshark.files \
557 debian/wireshark.manpages \
558 debian/wireshark.menu \
560 docbook/Makefile.auto.am \
579 idl/parlay/cccs.idl \
581 idl/parlay/common_cc_data.idl \
584 idl/parlay/fw_data.idl \
585 idl/parlay/fw_if.idl \
586 idl/parlay/fw_if_access.idl \
587 idl/parlay/fw_if_app.idl \
588 idl/parlay/fw_if_entop.idl \
589 idl/parlay/fw_if_service.idl \
590 idl/parlay/gcc_data.idl \
591 idl/parlay/gcc_interfaces.idl \
594 idl/parlay/mmccs.idl \
596 idl/parlay/mpcc_data.idl \
597 idl/parlay/mpcc_interfaces.idl \
599 idl/parlay/pam_data.idl \
600 idl/parlay/pam_interfaces.idl \
601 idl/parlay/Parlay.idl \
602 idl/parlay/policy_data.idl \
603 idl/parlay/policy_interfaces.idl \
604 idl/parlay/README.parlay \
605 idl/parlay/termcap.idl \
606 idl/parlay/ui_data.idl \
607 idl/parlay/ui_interfaces.idl \
608 image/capinfos.rc.in \
609 image/clist_ascend.xpm \
610 image/clist_descend.xpm \
612 image/dumpcap.rc.in \
613 image/editcap.rc.in \
614 image/expert_chat.xpm \
615 image/expert_error.xpm \
616 image/expert_none.xpm \
617 image/expert_note.xpm \
618 image/expert_warn.xpm \
619 image/file_dlg_win32.rc \
620 image/hi16-app-wireshark.png \
621 image/hi32-app-wireshark.png \
622 image/hi48-app-wireshark.png \
623 image/icon_layout_1.xpm \
624 image/icon_layout_2.xpm \
625 image/icon_layout_3.xpm \
626 image/icon_layout_4.xpm \
627 image/icon_layout_5.xpm \
628 image/icon_layout_6.xpm \
629 image/libwireshark.rc.in \
630 image/libwsutil.rc.in \
631 image/lo16-app-wireshark.png \
632 image/lo32-app-wireshark.png \
633 image/lo48-app-wireshark.png \
634 image/Makefile.nmake \
635 image/mergecap.rc.in \
636 image/nsis-checked.bmp \
637 image/nsis-unchecked.bmp \
638 image/rawshark.rc.in \
640 image/stock_dialog_error_48.xpm \
641 image/stock_dialog_info_48.xpm \
642 image/stock_dialog_question_48.xpm \
643 image/stock_dialog_stop_48.xpm \
644 image/stock_dialog_warning_48.xpm \
645 image/text2pcap.rc.in \
646 image/toolbar/autoscroll_24.xpm \
647 image/toolbar/capture_airpcap_16.xpm \
648 image/toolbar/capture_capture_16.xpm \
649 image/toolbar/capture_details_16.xpm \
650 image/toolbar/capture_details_24.xpm \
651 image/toolbar/capture_ethernet_16.xpm \
652 image/toolbar/capture_filter_24.xpm \
653 image/toolbar/capture_interfaces_24.xpm \
654 image/toolbar/capture_options_24.xpm \
655 image/toolbar/capture_prepare_16.xpm \
656 image/toolbar/capture_restart_24.xpm \
657 image/toolbar/capture_start_24.xpm \
658 image/toolbar/capture_stop_24.xpm \
659 image/toolbar/checkbox_16.xpm \
660 image/toolbar/colorize_24.xpm \
661 image/toolbar/conversations_16.xpm \
662 image/toolbar/decode_as_16.xpm \
663 image/toolbar/display_filter_24.xpm \
664 image/toolbar/endpoints_16.xpm \
665 image/toolbar/expert_info_16.xpm \
666 image/toolbar/file_set_list_16.xpm \
667 image/toolbar/file_set_next_16.xpm \
668 image/toolbar/file_set_previous_16.xpm \
669 image/toolbar/flow_graph_16.xpm \
670 image/toolbar/graphs_16.xpm \
671 image/toolbar/icon_color_0.xpm \
672 image/toolbar/icon_color_1.xpm \
673 image/toolbar/icon_color_2.xpm \
674 image/toolbar/icon_color_3.xpm \
675 image/toolbar/icon_color_4.xpm \
676 image/toolbar/icon_color_5.xpm \
677 image/toolbar/icon_color_6.xpm \
678 image/toolbar/icon_color_7.xpm \
679 image/toolbar/icon_color_8.xpm \
680 image/toolbar/icon_color_9.xpm \
681 image/toolbar/internet_24.xpm \
682 image/toolbar/modem_16.png \
683 image/toolbar/modem_16.xpm \
684 image/toolbar/network_bluetooth_16.png \
685 image/toolbar/network_bluetooth_16.xpm \
686 image/toolbar/network_virtual_16.xpm \
687 image/toolbar/network_wired_16.png \
688 image/toolbar/network_wired_16.xpm \
689 image/toolbar/network_wireless_16.png \
690 image/toolbar/network_wireless_16.xpm \
691 image/toolbar/resize_columns_24.xpm \
692 image/toolbar/telephony_16.xpm \
693 image/toolbar/time_24.xpm \
694 image/toolbar/web_support_24.xpm \
695 image/toolbar/wep_closed_24.xpm \
696 image/toolbar/wiki_24.xpm \
699 image/wiresharkdoc.ico \
700 image/wireshark.exe.manifest.in \
701 image/wireshark.ico \
702 image/wiresharkinst.ico \
703 image/wireshark.rc.in \
704 image/wiretap.rc.in \
707 image/wsicon256.png \
714 image/wsiconcap16.xpm \
715 image/wsiconcap256.png \
716 image/wsiconcap32.xpm \
717 image/wsiconcap48.xpm \
718 image/wsiconcap.svg \
719 image/wsicondoc256.png \
720 image/wsicondoc.svg \
721 image/wsiconinst256.png \
722 image/wsiconinst.svg \
727 image/wssplash-dev.xpm \
744 text2pcap-scanner.l \
753 -chmod +s $(DESTDIR)$(bindir)/dumpcap
758 DIST_SUBDIRS = asn1 codecs doc epan gtk help packaging plugins tools wiretap wsutil
761 SUBDIRS = tools wsutil wiretap epan plugins packaging help @wireshark_SUBDIRS@ . doc
763 SUBDIRS = tools wsutil wiretap epan packaging help @wireshark_SUBDIRS@ . doc
766 help/faq.txt: $(srcdir)/help/faq.py
770 libtool: $(LIBTOOL_DEPS)
771 $(SHELL) ./config.status --recheck
773 # Used by svr4-package and osx-package
774 # We load top_stagedir with an explicit path so that libtool doesn't freak.
775 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/staging
776 stagedir=$(top_stagedir)/$(PACKAGE).inst
781 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
782 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
783 rm -rf $(stagedir) ; \
784 $(MAKE) DESTDIR=$(stagedir) install; \
785 $(srcdir)/packaging/svr4/mkpkg \
787 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
791 echo "Error: SVR4 packaging tools not found." ; \
792 echo "Package build abandoned." ; \
795 solaris-package: svr4-package
797 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
799 if test x$(HAVE_RPM) = xyes ; then \
801 mkdir -p BUILD RPMS SOURCES ; \
803 ln -s ../../../$(distdir).tar.gz ; \
804 ln -s ../../../wireshark.desktop ; \
805 ln -s ../../../image/wsicon64.png wireshark.png ; \
807 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/wireshark.spec && \
808 echo "Package successfully built in `pwd`/RPMS." ; \
810 echo "Error: RPM executable and/or source directory not found." ; \
813 if test x$(HAVE_RPM) = xyes ; then \
815 mkdir -p BUILD SRPMS SOURCES ; \
817 ln -s ../../../$(distdir).tar.gz ; \
818 ln -s ../../../wireshark.desktop ; \
819 ln -s ../../../image/wsicon64.png wireshark.png ; \
821 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/wireshark.spec && \
822 echo "Package successfully built in `pwd`/SRPMS." ; \
824 echo "Error: RPM executable and/or source directory not found." ; \
827 debian-package: debian/rules
828 @if test x$(HAVE_DPKG_BUILDPACKAGE) = xyes ; then \
829 dpkg-buildpackage -rfakeroot -us -uc ; \
831 echo "Error: Debian packaging tools not found." ; \
832 echo "Package build abandoned." ; \
835 # XXX - This assumes we're building from the source directory.
836 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
837 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
838 rm -rf $(stagedir) ; \
839 $(MAKE) DESTDIR=$(stagedir) install; \
840 cd $(srcdir)/packaging/macosx ; \
841 ./osx-app.sh -bp ../staging/$(PACKAGE).inst$(bindir) ; \
843 echo "Error: OS X packaging tools not found." ; \
844 echo "Package build abandoned." ; \
848 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
849 cd $(srcdir)/packaging/macosx ; \
854 rm -rf $(top_stagedir)
857 $(PERL) tools/checkAPIs.pl \
859 # $(wireshark_SOURCES)
860 # $(EXTRA_wireshark_SOURCES)
862 checkapi: checkapi_local
863 cd wiretap && $(MAKE) checkapi
864 cd ../codecs && $(MAKE) checkapi
865 ## cd ../gtk && $(MAKE) checkapi
866 ## cd ../epan && $(MAKE) checkapi
867 ## cd ../epan/crypt && $(MAKE) checkapi
868 cd ../dfilter && $(MAKE) checkapi
869 ## cd ../ftypes && $(MAKE) checkapi
870 ## cd ../wslua && $(MAKE) checkapi
871 cd ../dissectors && $(MAKE) checkapi
872 cd ../../plugins && $(MAKE) checkapi
873 cd ../wsutil && $(MAKE) checkapi