2 # Automake file for Wireshark
4 # Wireshark - Network traffic analyzer
5 # By Gerald Combs <gerald@wireshark.org>
6 # Copyright 1998 Gerald Combs
8 # This program is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License
10 # as published by the Free Software Foundation; either version 2
11 # of the License, or (at your option) any later version.
13 # This program is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write to the Free Software
20 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 include ./Makefile.am.inc
24 AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
25 # Make sure to keep ACLOCAL_AMFLAGS in Makefile.am and AC_CONFIG_MACRO_DIRS
26 # in configure.ac in sync, otherwise there will be an error running autogen.sh.
27 ACLOCAL_AMFLAGS = -I m4
32 AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) $(COMMONCPPFLAGS)
50 EXTRA_PROGRAMS = wireshark-gtk wireshark tshark tfshark capinfos captype \
51 editcap mergecap dftest randpkt text2pcap dumpcap reordercap \
55 # Wireshark configuration files are put in $(pkgdatadir).
57 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
58 smi_modules ipmap.html pdml2html.xsl
60 pkgconfigdir = $(libdir)/pkgconfig
61 pkgconfig_DATA = wireshark.pc
64 # Install global profiles in the "profiles" subdirectory
66 profilesdir = $(pkgdatadir)
67 nobase_dist_profiles_DATA = \
68 profiles/Bluetooth/colorfilters \
69 profiles/Classic/colorfilters
72 # Install the Diameter DTD and XML files in the "diameter" subdirectory
75 diameterdir = $(pkgdatadir)/diameter
76 include diameter/Custom.make
77 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
78 diameter/chargecontrol.xml \
80 diameter/CiscoSystems.xml \
82 diameter/dictionary.dtd \
83 diameter/dictionary.xml \
85 diameter/Ericsson.xml \
86 diameter/etsie2e4.xml \
87 diameter/mobileipv4.xml \
88 diameter/mobileipv6.xml \
91 diameter/Starent.xml \
92 diameter/sunping.xml \
95 diameter/Vodafone.xml \
96 diameter/AlcatelLucent.xml \
98 diameter/NokiaSolutionsAndNetworks.xml \
103 # Install the DTDs directory files in the "dtds" subdirectory
106 dtdsdir = $(pkgdatadir)/dtds
111 dtds/pocsettings.dtd \
118 dtds/xcap-error.dtd \
122 # Install the RADIUS directory files in the "radius" subdirectory
125 radiusdir = $(pkgdatadir)/radius
126 include radius/Custom.make
127 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
128 radius/README.radius_dictionary \
129 radius/custom.includes \
131 radius/dictionary.3com \
132 radius/dictionary.3gpp \
133 radius/dictionary.3gpp2 \
134 radius/dictionary.acc \
135 radius/dictionary.acme \
136 radius/dictionary.airespace \
137 radius/dictionary.actelis \
138 radius/dictionary.aerohive \
139 radius/dictionary.alcatel \
140 radius/dictionary.alcatel.esam \
141 radius/dictionary.alcatel.sr \
142 radius/dictionary.alcatel-lucent.aaa \
143 radius/dictionary.alteon \
144 radius/dictionary.altiga \
145 radius/dictionary.alvarion \
146 radius/dictionary.alvarion.wimax.v2_2 \
147 radius/dictionary.apc \
148 radius/dictionary.aptis \
149 radius/dictionary.arbor \
150 radius/dictionary.aruba \
151 radius/dictionary.ascend \
152 radius/dictionary.asn \
153 radius/dictionary.audiocodes \
154 radius/dictionary.avaya \
155 radius/dictionary.azaire \
156 radius/dictionary.bay \
157 radius/dictionary.bluecoat \
158 radius/dictionary.bintec \
159 radius/dictionary.broadsoft \
160 radius/dictionary.brocade \
161 radius/dictionary.bskyb \
162 radius/dictionary.bristol \
163 radius/dictionary.bt \
164 radius/dictionary.camiant \
165 radius/dictionary.cablelabs \
166 radius/dictionary.cabletron \
167 radius/dictionary.chillispot \
168 radius/dictionary.cisco \
169 radius/dictionary.cisco.asa \
170 radius/dictionary.cisco.bbsm \
171 radius/dictionary.cisco.vpn3000 \
172 radius/dictionary.cisco.vpn5000 \
173 radius/dictionary.citrix \
174 radius/dictionary.clavister \
175 radius/dictionary.cnergee \
176 radius/dictionary.colubris \
177 radius/dictionary.columbia_university \
178 radius/dictionary.compatible \
179 radius/dictionary.compat \
180 radius/dictionary.cosine \
181 radius/dictionary.dante \
182 radius/dictionary.dhcp \
183 radius/dictionary.dlink \
184 radius/dictionary.digium \
185 radius/dictionary.dragonwave \
186 radius/dictionary.efficientip \
187 radius/dictionary.eltex \
188 radius/dictionary.epygi \
189 radius/dictionary.equallogic \
190 radius/dictionary.ericsson \
191 radius/dictionary.ericsson.ab \
192 radius/dictionary.ericsson.packet.core.networks \
193 radius/dictionary.erx \
194 radius/dictionary.extreme \
195 radius/dictionary.f5 \
196 radius/dictionary.fdxtended \
197 radius/dictionary.fortinet \
198 radius/dictionary.foundry \
199 radius/dictionary.freedhcp \
200 radius/dictionary.freeradius \
201 radius/dictionary.freeradius.internal \
202 radius/dictionary.freeswitch \
203 radius/dictionary.gandalf \
204 radius/dictionary.garderos \
205 radius/dictionary.gemtek \
206 radius/dictionary.h3c \
207 radius/dictionary.hp \
208 radius/dictionary.huawei \
209 radius/dictionary.iana \
210 radius/dictionary.iea \
211 radius/dictionary.infoblox \
212 radius/dictionary.infonet \
213 radius/dictionary.ipunplugged \
214 radius/dictionary.issanni \
215 radius/dictionary.itk \
216 radius/dictionary.jradius \
217 radius/dictionary.juniper \
218 radius/dictionary.kineto \
219 radius/dictionary.karlnet \
220 radius/dictionary.lancom \
221 radius/dictionary.livingston \
222 radius/dictionary.localweb \
223 radius/dictionary.lucent \
224 radius/dictionary.manzara \
225 radius/dictionary.meinberg \
226 radius/dictionary.merit \
227 radius/dictionary.meru \
228 radius/dictionary.microsemi \
229 radius/dictionary.microsoft \
230 radius/dictionary.mikrotik \
231 radius/dictionary.motorola \
232 radius/dictionary.motorola.wimax \
233 radius/dictionary.navini \
234 radius/dictionary.netscreen \
235 radius/dictionary.networkphysics \
236 radius/dictionary.nexans \
237 radius/dictionary.nokia \
238 radius/dictionary.nokia.conflict \
239 radius/dictionary.nomadix \
240 radius/dictionary.nortel \
241 radius/dictionary.ntua \
242 radius/dictionary.openser \
243 radius/dictionary.packeteer \
244 radius/dictionary.paloalto \
245 radius/dictionary.patton \
246 radius/dictionary.perle \
247 radius/dictionary.propel \
248 radius/dictionary.prosoft \
249 radius/dictionary.proxim \
250 radius/dictionary.purewave \
251 radius/dictionary.quiconnect \
252 radius/dictionary.quintum \
253 radius/dictionary.redcreek \
254 radius/dictionary.rfc2865 \
255 radius/dictionary.rfc2866 \
256 radius/dictionary.rfc2867 \
257 radius/dictionary.rfc2868 \
258 radius/dictionary.rfc2869 \
259 radius/dictionary.rfc3162 \
260 radius/dictionary.rfc3576 \
261 radius/dictionary.rfc3580 \
262 radius/dictionary.rfc4072 \
263 radius/dictionary.rfc4372 \
264 radius/dictionary.rfc4603 \
265 radius/dictionary.rfc4675 \
266 radius/dictionary.rfc4679 \
267 radius/dictionary.rfc4818 \
268 radius/dictionary.rfc4849 \
269 radius/dictionary.rfc5090 \
270 radius/dictionary.rfc5176 \
271 radius/dictionary.rfc5447 \
272 radius/dictionary.rfc5580 \
273 radius/dictionary.rfc5607 \
274 radius/dictionary.rfc5904 \
275 radius/dictionary.rfc6519 \
276 radius/dictionary.rfc6572 \
277 radius/dictionary.rfc6677 \
278 radius/dictionary.rfc6911 \
279 radius/dictionary.rfc6929 \
280 radius/dictionary.rfc6930 \
281 radius/dictionary.rfc7055 \
282 radius/dictionary.rfc7155 \
283 radius/dictionary.rfc7268 \
284 radius/dictionary.rfc7499 \
285 radius/dictionary.rfc7930 \
286 radius/dictionary.riverbed \
287 radius/dictionary.riverstone \
288 radius/dictionary.roaringpenguin \
289 radius/dictionary.ruckus \
290 radius/dictionary.ruggedcom \
291 radius/dictionary.sangoma \
292 radius/dictionary.sg \
293 radius/dictionary.shasta \
294 radius/dictionary.shiva \
295 radius/dictionary.siemens \
296 radius/dictionary.slipstream \
297 radius/dictionary.sofaware \
298 radius/dictionary.sonicwall \
299 radius/dictionary.springtide \
300 radius/dictionary.starent \
301 radius/dictionary.starent.vsa1 \
302 radius/dictionary.surfnet \
303 radius/dictionary.symbol \
304 radius/dictionary.t_systems_nova \
305 radius/dictionary.telebit \
306 radius/dictionary.telkom \
307 radius/dictionary.terena \
308 radius/dictionary.trapeze \
309 radius/dictionary.travelping \
310 radius/dictionary.tropos \
311 radius/dictionary.ukerna \
312 radius/dictionary.unix \
313 radius/dictionary.usr \
314 radius/dictionary.utstarcom \
315 radius/dictionary.valemount \
316 radius/dictionary.versanet \
317 radius/dictionary.vqp \
318 radius/dictionary.walabi \
319 radius/dictionary.waverider \
320 radius/dictionary.wichorus \
321 radius/dictionary.wimax \
322 radius/dictionary.wimax.alvarion \
323 radius/dictionary.wimax.wichorus \
324 radius/dictionary.wispr \
325 radius/dictionary.xedia \
326 radius/dictionary.xylan \
327 radius/dictionary.yubico \
328 radius/dictionary.zeus \
329 radius/dictionary.zte \
330 radius/dictionary.zyxel
333 # Install the tpncp directory files in the "tpncp" subdirectory
336 tpncpdir = $(pkgdatadir)/tpncp
341 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
344 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
345 dist_wimaxasncp_DATA = \
346 wimaxasncp/dictionary.xml \
347 wimaxasncp/dictionary.dtd
350 -include plugins/Custom.make
351 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
352 -dlopen plugins/docsis/docsis.la \
353 -dlopen plugins/ethercat/ethercat.la \
354 -dlopen plugins/gryphon/gryphon.la \
355 -dlopen plugins/irda/irda.la \
356 -dlopen plugins/m2m/m2m.la \
357 -dlopen plugins/mate/mate.la \
358 -dlopen plugins/opcua/opcua.la \
359 -dlopen plugins/profinet/profinet.la \
360 -dlopen plugins/stats_tree/stats_tree.la \
361 -dlopen plugins/unistim/unistim.la \
362 -dlopen plugins/wimax/wimax.la \
363 -dlopen plugins/wimaxmacphy/wimaxmacphy.la
371 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
372 BUILT_HEADER_FILES = \
377 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
379 # Header files generated from source files.
380 GENERATED_HEADER_FILES = \
381 text2pcap-scanner_lex.h \
382 $(BUILT_HEADER_FILES)
384 # C source files generated from source files.
387 # All the generated files.
388 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
390 EXTCAP_COMMON_SRC = \
395 EXTCAP_COMMON_INCLUDES = \
400 # sources common for wireshark, tshark, and rawshark
406 # corresponding headers
407 SHARK_COMMON_INCLUDES = \
415 # wireshark specifics
416 WIRESHARK_COMMON_SRC = \
417 $(SHARK_COMMON_SRC) \
426 # corresponding headers
427 WIRESHARK_COMMON_INCLUDES = \
437 SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
441 EXTRALINKFLAGS = -Wl,-static -all-static
443 EXTRALINKFLAGS = -export-dynamic
454 # Libraries and plugin flags with which to link wireshark.
456 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
457 # (see configure.ac for pkg-config modules used).
459 wireshark_common_ldadd = \
460 capchild/libcapchild.a \
461 caputils/libcaputils.a \
464 codecs/libwscodecs.la \
465 wiretap/libwiretap.la \
466 epan/libwireshark.la \
467 wsutil/libwsutil.la \
470 @APPLICATIONSERVICES_FRAMEWORKS@ \
471 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
472 @COREFOUNDATION_FRAMEWORKS@ \
477 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
479 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
481 wireshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS) $(Qt_LDFLAGS)
485 $(wireshark_common_ldadd) \
490 wireshark_LDADD += $(SPEEXDSP_LIBS)
495 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
497 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
499 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
501 wireshark_gtk_LDADD = \
503 $(wireshark_common_ldadd) \
509 $(SHARK_COMMON_SRC) \
515 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
517 tshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
519 # Libraries and plugin flags with which to link tshark.
521 capchild/libcapchild.a \
522 caputils/libcaputils.a \
525 wiretap/libwiretap.la \
526 epan/libwireshark.la \
527 wsutil/libwsutil.la \
532 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
533 @COREFOUNDATION_FRAMEWORKS@
536 $(SHARK_COMMON_SRC) \
540 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
542 tfshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
544 # Libraries and plugin flags with which to link tfshark.
548 wiretap/libwiretap.la \
549 epan/libwireshark.la \
550 wsutil/libwsutil.la \
555 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
556 @COREFOUNDATION_FRAMEWORKS@
559 $(SHARK_COMMON_SRC) \
563 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
565 rawshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
567 # Libraries and plugin flags with which to link rawshark.
569 caputils/libcaputils.a \
571 wiretap/libwiretap.la \
572 epan/libwireshark.la \
573 wsutil/libwsutil.la \
578 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
579 @COREFOUNDATION_FRAMEWORKS@
582 $(SHARK_COMMON_SRC) \
590 sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
592 sharkd_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
594 # Libraries and plugin flags with which to link sharkd.
598 wiretap/libwiretap.la \
599 epan/libwireshark.la \
600 wsutil/libwsutil.la \
605 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
606 @COREFOUNDATION_FRAMEWORKS@
608 text2pcap_SOURCES = \
610 text2pcap-scanner.l \
613 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
615 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
616 # which is generated (and therefore not always clean).
617 # We could generate text2pcap.o as a library with -Werror but for now it
618 # doesn't seem worth the effort.
619 text2pcap_CFLAGS = $(GENERATED_CFLAGS)
621 # Libraries with which to link text2pcap.
623 writecap/libwritecap.a \
624 wsutil/libwsutil.la \
631 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
633 # Libraries with which to link mergecap.
635 wiretap/libwiretap.la \
636 wsutil/libwsutil.la \
643 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
645 # Libraries with which to link capinfos.
647 wiretap/libwiretap.la \
648 wsutil/libwsutil.la \
656 captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
658 # Libraries with which to link captype.
660 wiretap/libwiretap.la \
661 wsutil/libwsutil.la \
668 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
670 # Libraries with which to link editcap.
672 wiretap/libwiretap.la \
673 wsutil/libwsutil.la \
677 reordercap_SOURCES = \
681 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
683 # Libraries with which to link reordercap.
685 wiretap/libwiretap.la \
686 wsutil/libwsutil.la \
693 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
695 # Libraries with which to link randpkt.
697 randpkt_core/librandpkt_core.a \
698 wiretap/libwiretap.la \
699 wsutil/libwsutil.la \
707 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
709 # Libraries and plugin flags with which to link dftest.
712 wiretap/libwiretap.la \
713 wsutil/libwsutil.la \
714 epan/libwireshark.la \
722 capture_stop_conditions.c \
730 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
732 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
734 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
736 # Libraries with which to link dumpcap.
738 caputils/libcaputils.a \
739 writecap/libwritecap.a \
740 wsutil/libwsutil.la \
743 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
744 @COREFOUNDATION_FRAMEWORKS@ \
748 # this target needed for distribution only
750 $(SHARK_COMMON_INCLUDES) \
751 $(EXTCAP_COMMON_INCLUDES) \
752 $(WIRESHARK_COMMON_INCLUDES) \
753 capture_stop_conditions.h \
760 # Build the version string
762 # FORCE is the portable version of .PHONY
766 $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
769 # Build shell scripts by doing variable substitution.
770 # Taken from autoconf 2.13.
772 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
777 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
780 $(PYTHON) $(srcdir)/tools/make-services.py
788 # We have to remove version.h with "make distclean", as, otherwise,
789 # "make distcheck" fails. We still need to make the tarballs work
790 # even if you do "make distclean" and try to rebuild; that's a work in
793 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
794 # list of files removed by "make distclean"? (It's deliberately
795 # included in that list.)
801 MAINTAINERCLEANFILES = \
827 abi-descriptor.template \
841 macosx-support-lib-patches \
847 text2pcap-scanner.l \
851 wireshark-gtk.desktop \
852 wireshark-mime-package.xml \
853 wireshark.appdata.xml \
857 CMakeListsCustom.txt.example \
861 ConfigureChecks.cmake \
866 if HAVE_DUMPCAP_GROUP
867 chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
870 $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
871 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
874 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
875 chmod +s $(DESTDIR)$(bindir)/dumpcap
913 @wireshark_SUBDIRS@ \
920 help/faq.txt: $(srcdir)/help/faq.py
921 $(AM_V_GEN)(cd help ; \
924 libtool: $(LIBTOOL_DEPS)
925 $(SHELL) ./config.status --recheck
929 # Install icons and other desktop files for (for use with GNOME, KDE, or
930 # any other freedesktop.org-compliant desktops).
932 # We use $(datadir). If the desktop doesn't look for them there,
933 # the desktop is broken; the latest XDG Base Directory Specification
936 # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
940 # $XDG_DATA_DIRS defines the preference-ordered set of base directories
941 # to search for data files in addition to the $XDG_DATA_HOME base
942 # directory. The directories in $XDG_DATA_DIRS should be seperated with a
945 # If $XDG_DATA_DIRS is either not set or empty, a value equal to
946 # /usr/local/share/:/usr/share/ should be used.
950 # if this is configured to install under /usr, that should Just Work,
951 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
952 # compliant with the latest version of the spec;
954 # if this installs under the default /usr/share, that should Just Work,
955 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
956 # compliant with the latest version of the spec;
958 # if this is configured to install somewhere else, whoever configured
959 # it should also have made sure that XDG_DATA_DIRS was set correctly
960 # and, if that doesn't work, the desktop isn't compliant with the
961 # latest version of the spec.
963 # We install these as part of the standard installation process, just
964 # as, for example, Inkscape does with its icons. See bug 10737.
966 # Do not use the -T flag to the install command, as it's not portable.
967 # Some versions of install don't support a -T flag at all, and the
968 # FreeBSD install command has a -T flag that takes an argument and
969 # that has completely different semantics.
971 # We neither need nor want any of this on macOS, nor do we want it if
972 # we're not building Wireshark (that being the only desktop app).
975 if BUILDING_WIRESHARK
977 mkdir -p $(DESTDIR)$(datadir)/mime/packages
978 install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
979 mkdir -p $(DESTDIR)$(datadir)/appdata
980 install -m 644 $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
981 mkdir -p $(DESTDIR)$(datadir)/applications
982 if test x$(DESKTOP_FILE_INSTALL) != x ; then \
983 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)$(datadir)/applications $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop ; \
985 install -m 644 $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications; \
987 for size in 16 24 32 48 64 128 256; \
989 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
990 install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
991 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
992 install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
994 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
995 install -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1000 if BUILDING_WIRESHARK
1002 rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
1003 rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
1004 rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
1005 rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
1006 for size in 16 24 32 48 64 128 256; \
1008 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1009 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1011 rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1015 install-data-hook: update-databases-and-caches-install
1016 uninstall-hook: update-databases-and-caches-uninstall
1019 # XXX - which of this stuff can, and should, we do ourselves?
1021 # If we're "installing" under $(DESTDIR) as part of the process of
1022 # building a package, we probably don't need to, and shouldn't, do
1025 # If we're installing for use, we may need to do some of this; which
1026 # of them do we need to tell where to search, especially if we're
1027 # installing somewhere other than under /usr or /usr/local?
1029 # What if we're installing in the user's home directory?
1031 # What if we're installing under /opt?
1033 # We only need to run ldconfig on systems where it's necessary in order
1034 # to update a shared library cache to know about our shared libraries.
1036 # We only need to run update-desktop-database and update-mime-database
1037 # on freedesktop.org desktops.
1039 # We only need to run gtk-update-icon-cache if we're installing a GTK+
1040 # version of Wireshark.
1042 # We neither need nor want any of this on macOS, nor do we want it if
1043 # we're not building Wireshark (that being the only desktop app).
1045 update-databases-and-caches-common:
1046 if BUILDING_WIRESHARK
1048 @echo "You may need to run \"ldconfig\" as root"
1049 @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
1050 @echo "You may need to run \"update-mime-database $(datadir)/mime\""
1051 @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
1055 update-databases-and-caches-install: update-databases-and-caches-common
1057 update-databases-and-caches-uninstall: update-databases-and-caches-common
1059 # Used by svr4-package and osx-package
1060 # We load top_stagedir with an absolute path so that libtool doesn't freak.
1061 top_stagedir=$(abs_top_builddir)/packaging/staging
1062 stagedir=$(top_stagedir)/$(PACKAGE).inst
1067 solaris-package: svr4-package
1069 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1070 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1071 rm -rf $(stagedir) ; \
1072 $(MAKE) DESTDIR=$(stagedir) install; \
1073 $(srcdir)/packaging/svr4/mkpkg \
1075 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1079 echo "Error: SVR4 packaging tools not found." ; \
1080 echo "Package build abandoned." ; \
1084 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1087 @cd $(rpm_topdir) && \
1088 mkdir -p BUILD RPMS SOURCES SRPMS && \
1090 ln -sf ../../../$(distdir).tar.xz && \
1092 $(RPMBUILD) --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1093 @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1094 echo "Package successfully built in `pwd`/RPMS." ; \
1095 rm -f SOURCES/$(distdir).tar.xz ../../$(distdir).tar.xz
1098 @echo "'rpmbuild' executable not available." ; \
1102 # XXX - This assumes we're building from the source directory.
1103 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1104 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1105 rm -rf $(stagedir) ; \
1106 $(MAKE) DESTDIR=$(stagedir) install; \
1107 cd $(srcdir)/packaging/macosx ; \
1108 ./osx-app.sh @OSX_APP_FLAGS@ \
1110 --binary-path ../staging/$(PACKAGE).inst$(bindir) \
1111 --plugin-path ../staging/$(PACKAGE).inst$(plugindir) \
1112 --extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
1113 --library-path ../staging/$(PACKAGE).inst$(libdir) ; \
1115 echo "Error: macOS packaging tools not found." ; \
1116 echo "Package build abandoned." ; \
1119 packaging/macosx/COPYING.txt: COPYING
1120 (cd packaging/macosx ; \
1121 $(MAKE) COPYING.txt ;)
1123 osx-package: osx-app packaging/macosx/COPYING.txt
1124 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1125 cd $(srcdir)/packaging/macosx ; \
1126 chmod +x ./osx-dmg.sh ; \
1127 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1130 osx-install: osx-app
1131 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1132 echo "Copying Wireshark.app to /Applications" ; \
1133 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ; \
1137 cd epan && $(MAKE) $@
1140 rm -rf $(top_stagedir)
1143 $(MAKE) -C wiretap dumpabi-libwiretap
1144 $(MAKE) -C epan dumpabi-libwireshark
1145 $(MAKE) -C wsutil dumpabi-libwsutil
1148 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
1149 -sourcedir=$(srcdir) \
1151 $(wireshark_gtk_SOURCES)
1152 # $(EXTRA_wireshark_gtk_SOURCES)
1154 checkapi: checkapi_local
1155 cd wiretap && $(MAKE) checkapi
1156 cd codecs && $(MAKE) checkapi
1157 cd capchild && $(MAKE) checkapi
1158 cd caputils && $(MAKE) checkapi
1159 cd ui && $(MAKE) checkapi
1160 cd ui/gtk && $(MAKE) checkapi
1161 cd ui/cli && $(MAKE) checkapi
1162 cd epan && $(MAKE) checkapi
1163 cd epan/crypt && $(MAKE) checkapi
1164 cd epan/dfilter && $(MAKE) checkapi
1165 cd epan/ftypes && $(MAKE) checkapi
1166 cd epan/wmem && $(MAKE) checkapi
1167 cd epan/wslua && $(MAKE) checkapi
1168 cd epan/dissectors && $(MAKE) checkapi
1169 cd plugins && $(MAKE) checkapi
1170 cd randpkt_core && $(MAKE) checkapi
1171 cd writecap && $(MAKE) checkapi
1172 cd wsutil && $(MAKE) checkapi
1175 # --external-sources requires 0.4.0 or later.
1177 cd $(top_srcdir) && \
1178 shellcheck --external-sources \
1179 tools/fuzz-test.sh \
1180 tools/randpkt-test.sh \
1182 tools/test-captures.sh \
1183 tools/valgrind-wireshark.sh
1186 @echo "Shellcheck not available." ; \
1190 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1193 cd epan && $(MAKE) $@
1194 cd capchild && $(MAKE) $@
1195 cd caputils && $(MAKE) $@
1196 cd randpkt_core && $(MAKE) $@
1198 (umask 022 ; $(DOXYGEN) doxygen.cfg)
1204 zip -rq wsar_html.zip wsar_html
1207 # Update AUTHORS file with entries from git shortlog
1209 cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1212 printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
1213 > $(top_distdir)/version.conf