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/Juniper.xml \
88 diameter/mobileipv4.xml \
89 diameter/mobileipv6.xml \
92 diameter/Starent.xml \
93 diameter/sunping.xml \
96 diameter/Vodafone.xml \
97 diameter/AlcatelLucent.xml \
99 diameter/NokiaSolutionsAndNetworks.xml \
104 # Install the DTDs directory files in the "dtds" subdirectory
107 dtdsdir = $(pkgdatadir)/dtds
112 dtds/pocsettings.dtd \
119 dtds/xcap-error.dtd \
123 # Install the RADIUS directory files in the "radius" subdirectory
126 radiusdir = $(pkgdatadir)/radius
127 include radius/Custom.make
128 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
129 radius/README.radius_dictionary \
130 radius/custom.includes \
132 radius/dictionary.3com \
133 radius/dictionary.3gpp \
134 radius/dictionary.3gpp2 \
135 radius/dictionary.acc \
136 radius/dictionary.acme \
137 radius/dictionary.airespace \
138 radius/dictionary.actelis \
139 radius/dictionary.aerohive \
140 radius/dictionary.alcatel \
141 radius/dictionary.alcatel.esam \
142 radius/dictionary.alcatel.sr \
143 radius/dictionary.alcatel-lucent.aaa \
144 radius/dictionary.alteon \
145 radius/dictionary.altiga \
146 radius/dictionary.alvarion \
147 radius/dictionary.alvarion.wimax.v2_2 \
148 radius/dictionary.apc \
149 radius/dictionary.aptis \
150 radius/dictionary.arbor \
151 radius/dictionary.aruba \
152 radius/dictionary.ascend \
153 radius/dictionary.asn \
154 radius/dictionary.audiocodes \
155 radius/dictionary.avaya \
156 radius/dictionary.azaire \
157 radius/dictionary.bay \
158 radius/dictionary.bluecoat \
159 radius/dictionary.bintec \
160 radius/dictionary.broadsoft \
161 radius/dictionary.brocade \
162 radius/dictionary.bskyb \
163 radius/dictionary.bristol \
164 radius/dictionary.bt \
165 radius/dictionary.camiant \
166 radius/dictionary.cablelabs \
167 radius/dictionary.cabletron \
168 radius/dictionary.chillispot \
169 radius/dictionary.cisco \
170 radius/dictionary.cisco.asa \
171 radius/dictionary.cisco.bbsm \
172 radius/dictionary.cisco.vpn3000 \
173 radius/dictionary.cisco.vpn5000 \
174 radius/dictionary.citrix \
175 radius/dictionary.clavister \
176 radius/dictionary.cnergee \
177 radius/dictionary.colubris \
178 radius/dictionary.columbia_university \
179 radius/dictionary.compatible \
180 radius/dictionary.compat \
181 radius/dictionary.cosine \
182 radius/dictionary.dante \
183 radius/dictionary.dhcp \
184 radius/dictionary.dlink \
185 radius/dictionary.digium \
186 radius/dictionary.dragonwave \
187 radius/dictionary.efficientip \
188 radius/dictionary.eltex \
189 radius/dictionary.epygi \
190 radius/dictionary.equallogic \
191 radius/dictionary.ericsson \
192 radius/dictionary.ericsson.ab \
193 radius/dictionary.ericsson.packet.core.networks \
194 radius/dictionary.erx \
195 radius/dictionary.extreme \
196 radius/dictionary.f5 \
197 radius/dictionary.fdxtended \
198 radius/dictionary.fortinet \
199 radius/dictionary.foundry \
200 radius/dictionary.freedhcp \
201 radius/dictionary.freeradius \
202 radius/dictionary.freeradius.internal \
203 radius/dictionary.freeswitch \
204 radius/dictionary.gandalf \
205 radius/dictionary.garderos \
206 radius/dictionary.gemtek \
207 radius/dictionary.h3c \
208 radius/dictionary.hp \
209 radius/dictionary.huawei \
210 radius/dictionary.iana \
211 radius/dictionary.iea \
212 radius/dictionary.infoblox \
213 radius/dictionary.infonet \
214 radius/dictionary.ipunplugged \
215 radius/dictionary.issanni \
216 radius/dictionary.itk \
217 radius/dictionary.jradius \
218 radius/dictionary.juniper \
219 radius/dictionary.kineto \
220 radius/dictionary.karlnet \
221 radius/dictionary.lancom \
222 radius/dictionary.livingston \
223 radius/dictionary.localweb \
224 radius/dictionary.lucent \
225 radius/dictionary.manzara \
226 radius/dictionary.meinberg \
227 radius/dictionary.merit \
228 radius/dictionary.meru \
229 radius/dictionary.microsemi \
230 radius/dictionary.microsoft \
231 radius/dictionary.mikrotik \
232 radius/dictionary.motorola \
233 radius/dictionary.motorola.wimax \
234 radius/dictionary.navini \
235 radius/dictionary.netscreen \
236 radius/dictionary.networkphysics \
237 radius/dictionary.nexans \
238 radius/dictionary.nokia \
239 radius/dictionary.nokia.conflict \
240 radius/dictionary.nomadix \
241 radius/dictionary.nortel \
242 radius/dictionary.ntua \
243 radius/dictionary.openser \
244 radius/dictionary.packeteer \
245 radius/dictionary.paloalto \
246 radius/dictionary.patton \
247 radius/dictionary.perle \
248 radius/dictionary.propel \
249 radius/dictionary.prosoft \
250 radius/dictionary.proxim \
251 radius/dictionary.purewave \
252 radius/dictionary.quiconnect \
253 radius/dictionary.quintum \
254 radius/dictionary.redcreek \
255 radius/dictionary.rfc2865 \
256 radius/dictionary.rfc2866 \
257 radius/dictionary.rfc2867 \
258 radius/dictionary.rfc2868 \
259 radius/dictionary.rfc2869 \
260 radius/dictionary.rfc3162 \
261 radius/dictionary.rfc3576 \
262 radius/dictionary.rfc3580 \
263 radius/dictionary.rfc4072 \
264 radius/dictionary.rfc4372 \
265 radius/dictionary.rfc4603 \
266 radius/dictionary.rfc4675 \
267 radius/dictionary.rfc4679 \
268 radius/dictionary.rfc4818 \
269 radius/dictionary.rfc4849 \
270 radius/dictionary.rfc5090 \
271 radius/dictionary.rfc5176 \
272 radius/dictionary.rfc5447 \
273 radius/dictionary.rfc5580 \
274 radius/dictionary.rfc5607 \
275 radius/dictionary.rfc5904 \
276 radius/dictionary.rfc6519 \
277 radius/dictionary.rfc6572 \
278 radius/dictionary.rfc6677 \
279 radius/dictionary.rfc6911 \
280 radius/dictionary.rfc6929 \
281 radius/dictionary.rfc6930 \
282 radius/dictionary.rfc7055 \
283 radius/dictionary.rfc7155 \
284 radius/dictionary.rfc7268 \
285 radius/dictionary.rfc7499 \
286 radius/dictionary.rfc7930 \
287 radius/dictionary.riverbed \
288 radius/dictionary.riverstone \
289 radius/dictionary.roaringpenguin \
290 radius/dictionary.ruckus \
291 radius/dictionary.ruggedcom \
292 radius/dictionary.sangoma \
293 radius/dictionary.sg \
294 radius/dictionary.shasta \
295 radius/dictionary.shiva \
296 radius/dictionary.siemens \
297 radius/dictionary.slipstream \
298 radius/dictionary.sofaware \
299 radius/dictionary.sonicwall \
300 radius/dictionary.springtide \
301 radius/dictionary.starent \
302 radius/dictionary.starent.vsa1 \
303 radius/dictionary.surfnet \
304 radius/dictionary.symbol \
305 radius/dictionary.t_systems_nova \
306 radius/dictionary.telebit \
307 radius/dictionary.telkom \
308 radius/dictionary.terena \
309 radius/dictionary.trapeze \
310 radius/dictionary.travelping \
311 radius/dictionary.tropos \
312 radius/dictionary.ukerna \
313 radius/dictionary.unix \
314 radius/dictionary.usr \
315 radius/dictionary.utstarcom \
316 radius/dictionary.valemount \
317 radius/dictionary.versanet \
318 radius/dictionary.vqp \
319 radius/dictionary.walabi \
320 radius/dictionary.waverider \
321 radius/dictionary.wichorus \
322 radius/dictionary.wimax \
323 radius/dictionary.wimax.alvarion \
324 radius/dictionary.wimax.wichorus \
325 radius/dictionary.wispr \
326 radius/dictionary.xedia \
327 radius/dictionary.xylan \
328 radius/dictionary.yubico \
329 radius/dictionary.zeus \
330 radius/dictionary.zte \
331 radius/dictionary.zyxel
334 # Install the tpncp directory files in the "tpncp" subdirectory
337 tpncpdir = $(pkgdatadir)/tpncp
342 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
345 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
346 dist_wimaxasncp_DATA = \
347 wimaxasncp/dictionary.xml \
348 wimaxasncp/dictionary.dtd
351 -include plugins/Custom.make
352 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
353 -dlopen plugins/docsis/docsis.la \
354 -dlopen plugins/ethercat/ethercat.la \
355 -dlopen plugins/gryphon/gryphon.la \
356 -dlopen plugins/irda/irda.la \
357 -dlopen plugins/m2m/m2m.la \
358 -dlopen plugins/mate/mate.la \
359 -dlopen plugins/opcua/opcua.la \
360 -dlopen plugins/profinet/profinet.la \
361 -dlopen plugins/stats_tree/stats_tree.la \
362 -dlopen plugins/unistim/unistim.la \
363 -dlopen plugins/wimax/wimax.la \
364 -dlopen plugins/wimaxmacphy/wimaxmacphy.la
372 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
373 BUILT_HEADER_FILES = \
378 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
380 # Header files generated from source files.
381 GENERATED_HEADER_FILES = \
382 text2pcap-scanner_lex.h \
383 $(BUILT_HEADER_FILES)
385 # C source files generated from source files.
388 # All the generated files.
389 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
391 EXTCAP_COMMON_SRC = \
396 EXTCAP_COMMON_INCLUDES = \
401 # sources common for wireshark, tshark, and rawshark
407 # corresponding headers
408 SHARK_COMMON_INCLUDES = \
416 # wireshark specifics
417 WIRESHARK_COMMON_SRC = \
418 $(SHARK_COMMON_SRC) \
426 # corresponding headers
427 WIRESHARK_COMMON_INCLUDES = \
436 SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
440 EXTRALINKFLAGS = -Wl,-static -all-static
442 EXTRALINKFLAGS = -export-dynamic
453 # Libraries and plugin flags with which to link wireshark.
455 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
456 # (see configure.ac for pkg-config modules used).
458 wireshark_common_ldadd = \
459 capchild/libcapchild.a \
460 caputils/libcaputils.a \
463 codecs/libwscodecs.la \
464 wiretap/libwiretap.la \
465 epan/libwireshark.la \
466 wsutil/libwsutil.la \
469 @APPLICATIONSERVICES_FRAMEWORKS@ \
470 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
471 @COREFOUNDATION_FRAMEWORKS@ \
476 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
478 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
480 wireshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS) $(Qt_LDFLAGS)
484 $(wireshark_common_ldadd) \
489 wireshark_LDADD += $(SPEEXDSP_LIBS)
494 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
496 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
498 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
500 wireshark_gtk_LDADD = \
502 $(wireshark_common_ldadd) \
508 $(SHARK_COMMON_SRC) \
513 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
515 tshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
517 # Libraries and plugin flags with which to link tshark.
519 capchild/libcapchild.a \
520 caputils/libcaputils.a \
523 wiretap/libwiretap.la \
524 epan/libwireshark.la \
525 wsutil/libwsutil.la \
530 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
531 @COREFOUNDATION_FRAMEWORKS@
534 $(SHARK_COMMON_SRC) \
538 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
540 tfshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
542 # Libraries and plugin flags with which to link tfshark.
546 wiretap/libwiretap.la \
547 epan/libwireshark.la \
548 wsutil/libwsutil.la \
553 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
554 @COREFOUNDATION_FRAMEWORKS@
557 $(SHARK_COMMON_SRC) \
561 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
563 rawshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
565 # Libraries and plugin flags with which to link rawshark.
567 caputils/libcaputils.a \
569 wiretap/libwiretap.la \
570 epan/libwireshark.la \
571 wsutil/libwsutil.la \
576 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
577 @COREFOUNDATION_FRAMEWORKS@
580 $(SHARK_COMMON_SRC) \
587 sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
589 sharkd_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
591 # Libraries and plugin flags with which to link sharkd.
595 codecs/libwscodecs.la \
596 wiretap/libwiretap.la \
597 epan/libwireshark.la \
598 wsutil/libwsutil.la \
603 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
604 @COREFOUNDATION_FRAMEWORKS@
606 text2pcap_SOURCES = \
608 text2pcap-scanner.l \
611 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
613 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
614 # which is generated (and therefore not always clean).
615 # We could generate text2pcap.o as a library with -Werror but for now it
616 # doesn't seem worth the effort.
617 text2pcap_CFLAGS = $(GENERATED_CFLAGS)
619 # Libraries with which to link text2pcap.
621 writecap/libwritecap.a \
622 wsutil/libwsutil.la \
629 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
631 # Libraries with which to link mergecap.
634 wiretap/libwiretap.la \
635 wsutil/libwsutil.la \
642 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
644 # 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.
661 wiretap/libwiretap.la \
662 wsutil/libwsutil.la \
669 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
671 # Libraries with which to link editcap.
674 wiretap/libwiretap.la \
675 wsutil/libwsutil.la \
679 reordercap_SOURCES = \
683 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
685 # Libraries with which to link reordercap.
688 wiretap/libwiretap.la \
689 wsutil/libwsutil.la \
696 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
698 # Libraries with which to link randpkt.
700 randpkt_core/librandpkt_core.a \
702 wiretap/libwiretap.la \
703 wsutil/libwsutil.la \
711 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
713 # Libraries and plugin flags with which to link dftest.
716 wiretap/libwiretap.la \
717 wsutil/libwsutil.la \
718 epan/libwireshark.la \
726 capture_stop_conditions.c \
733 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
735 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
737 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
739 # Libraries with which to link dumpcap.
741 caputils/libcaputils.a \
743 writecap/libwritecap.a \
744 wsutil/libwsutil.la \
747 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
748 @COREFOUNDATION_FRAMEWORKS@ \
752 # this target needed for distribution only
754 $(SHARK_COMMON_INCLUDES) \
755 $(EXTCAP_COMMON_INCLUDES) \
756 $(WIRESHARK_COMMON_INCLUDES) \
757 capture_stop_conditions.h \
764 # Build the version string
766 # FORCE is the portable version of .PHONY
770 $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
773 # Build shell scripts by doing variable substitution.
774 # Taken from autoconf 2.13.
776 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
781 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
784 $(PYTHON) $(srcdir)/tools/make-services.py
792 # We have to remove version.h with "make distclean", as, otherwise,
793 # "make distcheck" fails. We still need to make the tarballs work
794 # even if you do "make distclean" and try to rebuild; that's a work in
797 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
798 # list of files removed by "make distclean"? (It's deliberately
799 # included in that list.)
805 MAINTAINERCLEANFILES = \
831 abi-descriptor.template \
845 macosx-support-lib-patches \
851 text2pcap-scanner.l \
855 wireshark-gtk.desktop \
856 wireshark-mime-package.xml \
857 wireshark.appdata.xml \
861 CMakeListsCustom.txt.example \
865 ConfigureChecks.cmake \
870 if HAVE_DUMPCAP_GROUP
871 chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
874 $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
875 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
878 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
879 chmod +s $(DESTDIR)$(bindir)/dumpcap
918 @wireshark_SUBDIRS@ \
925 help/faq.txt: $(srcdir)/help/faq.py
926 $(AM_V_GEN)(cd help ; \
929 libtool: $(LIBTOOL_DEPS)
930 $(SHELL) ./config.status --recheck
934 # Install icons and other desktop files for (for use with GNOME, KDE, or
935 # any other freedesktop.org-compliant desktops).
937 # We use $(datadir). If the desktop doesn't look for them there,
938 # the desktop is broken; the latest XDG Base Directory Specification
941 # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
945 # $XDG_DATA_DIRS defines the preference-ordered set of base directories
946 # to search for data files in addition to the $XDG_DATA_HOME base
947 # directory. The directories in $XDG_DATA_DIRS should be seperated with a
950 # If $XDG_DATA_DIRS is either not set or empty, a value equal to
951 # /usr/local/share/:/usr/share/ should be used.
955 # if this is configured to install under /usr, that should Just Work,
956 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
957 # compliant with the latest version of the spec;
959 # if this installs under the default /usr/share, that should Just Work,
960 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
961 # compliant with the latest version of the spec;
963 # if this is configured to install somewhere else, whoever configured
964 # it should also have made sure that XDG_DATA_DIRS was set correctly
965 # and, if that doesn't work, the desktop isn't compliant with the
966 # latest version of the spec.
968 # We install these as part of the standard installation process, just
969 # as, for example, Inkscape does with its icons. See bug 10737.
971 # Do not use the -T flag to the install command, as it's not portable.
972 # Some versions of install don't support a -T flag at all, and the
973 # FreeBSD install command has a -T flag that takes an argument and
974 # that has completely different semantics.
976 # We neither need nor want any of this on macOS, nor do we want it if
977 # we're not building Wireshark (that being the only desktop app).
980 if BUILDING_WIRESHARK
982 mkdir -p $(DESTDIR)$(datadir)/mime/packages
983 install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
984 mkdir -p $(DESTDIR)$(datadir)/appdata
985 install -m 644 $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
986 mkdir -p $(DESTDIR)$(datadir)/applications
987 if test x$(DESKTOP_FILE_INSTALL) != x ; then \
988 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)$(datadir)/applications $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop ; \
990 install -m 644 $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications; \
992 for size in 16 24 32 48 64 128 256; \
994 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
995 install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
996 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
997 install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
999 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
1000 install -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1005 if BUILDING_WIRESHARK
1007 rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
1008 rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
1009 rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
1010 rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
1011 for size in 16 24 32 48 64 128 256; \
1013 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1014 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1016 rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1020 install-data-hook: update-databases-and-caches-install
1021 uninstall-hook: update-databases-and-caches-uninstall
1024 # XXX - which of this stuff can, and should, we do ourselves?
1026 # If we're "installing" under $(DESTDIR) as part of the process of
1027 # building a package, we probably don't need to, and shouldn't, do
1030 # If we're installing for use, we may need to do some of this; which
1031 # of them do we need to tell where to search, especially if we're
1032 # installing somewhere other than under /usr or /usr/local?
1034 # What if we're installing in the user's home directory?
1036 # What if we're installing under /opt?
1038 # We only need to run ldconfig on systems where it's necessary in order
1039 # to update a shared library cache to know about our shared libraries.
1041 # We only need to run update-desktop-database and update-mime-database
1042 # on freedesktop.org desktops.
1044 # We only need to run gtk-update-icon-cache if we're installing a GTK+
1045 # version of Wireshark.
1047 # We neither need nor want any of this on macOS, nor do we want it if
1048 # we're not building Wireshark (that being the only desktop app).
1050 update-databases-and-caches-common:
1051 if BUILDING_WIRESHARK
1053 @echo "You may need to run \"ldconfig\" as root"
1054 @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
1055 @echo "You may need to run \"update-mime-database $(datadir)/mime\""
1056 @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
1060 update-databases-and-caches-install: update-databases-and-caches-common
1062 update-databases-and-caches-uninstall: update-databases-and-caches-common
1064 # Used by svr4-package and osx-package
1065 # We load top_stagedir with an absolute path so that libtool doesn't freak.
1066 top_stagedir=$(abs_top_builddir)/packaging/staging
1067 stagedir=$(top_stagedir)/$(PACKAGE).inst
1072 solaris-package: svr4-package
1074 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1075 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1076 rm -rf $(stagedir) ; \
1077 $(MAKE) DESTDIR=$(stagedir) install; \
1078 $(srcdir)/packaging/svr4/mkpkg \
1080 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1084 echo "Error: SVR4 packaging tools not found." ; \
1085 echo "Package build abandoned." ; \
1089 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1092 @cd $(rpm_topdir) && \
1093 mkdir -p BUILD RPMS SOURCES SRPMS && \
1095 ln -sf ../../../$(distdir).tar.xz && \
1097 $(RPMBUILD) --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1098 @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1099 echo "Package successfully built in `pwd`/RPMS." ; \
1100 rm -f SOURCES/$(distdir).tar.xz ../../$(distdir).tar.xz
1103 @echo "'rpmbuild' executable not available." ; \
1107 # XXX - This assumes we're building from the source directory.
1108 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1109 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1110 rm -rf $(stagedir) ; \
1111 $(MAKE) DESTDIR=$(stagedir) install; \
1112 cd $(srcdir)/packaging/macosx ; \
1113 ./osx-app.sh @OSX_APP_FLAGS@ \
1115 --binary-path ../staging/$(PACKAGE).inst$(bindir) \
1116 --plugin-path ../staging/$(PACKAGE).inst$(plugindir) \
1117 --extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
1118 --library-path ../staging/$(PACKAGE).inst$(libdir) ; \
1120 echo "Error: macOS packaging tools not found." ; \
1121 echo "Package build abandoned." ; \
1124 packaging/macosx/COPYING.txt: COPYING
1125 (cd packaging/macosx ; \
1126 $(MAKE) COPYING.txt ;)
1128 osx-package: osx-app packaging/macosx/COPYING.txt
1129 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1130 cd $(srcdir)/packaging/macosx ; \
1131 chmod +x ./osx-dmg.sh ; \
1132 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1135 osx-install: osx-app
1136 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1137 echo "Copying Wireshark.app to /Applications" ; \
1138 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ; \
1142 cd epan && $(MAKE) $@
1145 rm -rf $(top_stagedir)
1148 $(MAKE) -C wiretap dumpabi-libwiretap
1149 $(MAKE) -C epan dumpabi-libwireshark
1150 $(MAKE) -C wsutil dumpabi-libwsutil
1153 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
1154 -sourcedir=$(srcdir) \
1156 $(wireshark_gtk_SOURCES)
1157 # $(EXTRA_wireshark_gtk_SOURCES)
1159 checkapi: checkapi_local
1160 cd wiretap && $(MAKE) checkapi
1161 cd codecs && $(MAKE) checkapi
1162 cd capchild && $(MAKE) checkapi
1163 cd caputils && $(MAKE) checkapi
1164 cd ui && $(MAKE) checkapi
1165 cd ui/gtk && $(MAKE) checkapi
1166 cd ui/cli && $(MAKE) checkapi
1167 cd epan && $(MAKE) checkapi
1168 cd epan/crypt && $(MAKE) checkapi
1169 cd epan/dfilter && $(MAKE) checkapi
1170 cd epan/ftypes && $(MAKE) checkapi
1171 cd epan/wmem && $(MAKE) checkapi
1172 cd epan/wslua && $(MAKE) checkapi
1173 cd epan/dissectors && $(MAKE) checkapi
1174 cd plugins && $(MAKE) checkapi
1175 cd randpkt_core && $(MAKE) checkapi
1176 cd writecap && $(MAKE) checkapi
1177 cd wsutil && $(MAKE) checkapi
1180 # --external-sources requires 0.4.0 or later.
1182 cd $(top_srcdir) && \
1183 shellcheck --external-sources \
1184 tools/fuzz-test.sh \
1185 tools/randpkt-test.sh \
1187 tools/test-captures.sh \
1188 tools/valgrind-wireshark.sh
1191 @echo "Shellcheck not available." ; \
1195 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1198 cd epan && $(MAKE) $@
1199 cd capchild && $(MAKE) $@
1200 cd caputils && $(MAKE) $@
1201 cd randpkt_core && $(MAKE) $@
1203 (umask 022 ; $(DOXYGEN) doxygen.cfg)
1209 zip -rq wsar_html.zip wsar_html
1212 # Update AUTHORS file with entries from git shortlog
1214 cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1217 printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
1218 > $(top_distdir)/version.conf