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.colubris \
176 radius/dictionary.columbia_university \
177 radius/dictionary.compatible \
178 radius/dictionary.compat \
179 radius/dictionary.cosine \
180 radius/dictionary.dante \
181 radius/dictionary.dhcp \
182 radius/dictionary.dlink \
183 radius/dictionary.digium \
184 radius/dictionary.dragonwave \
185 radius/dictionary.efficientip \
186 radius/dictionary.eltex \
187 radius/dictionary.epygi \
188 radius/dictionary.equallogic \
189 radius/dictionary.ericsson \
190 radius/dictionary.ericsson.ab \
191 radius/dictionary.ericsson.packet.core.networks \
192 radius/dictionary.erx \
193 radius/dictionary.extreme \
194 radius/dictionary.f5 \
195 radius/dictionary.fdxtended \
196 radius/dictionary.fortinet \
197 radius/dictionary.foundry \
198 radius/dictionary.freedhcp \
199 radius/dictionary.freeradius \
200 radius/dictionary.freeradius.internal \
201 radius/dictionary.freeswitch \
202 radius/dictionary.gandalf \
203 radius/dictionary.garderos \
204 radius/dictionary.gemtek \
205 radius/dictionary.h3c \
206 radius/dictionary.hp \
207 radius/dictionary.huawei \
208 radius/dictionary.iana \
209 radius/dictionary.iea \
210 radius/dictionary.infoblox \
211 radius/dictionary.infonet \
212 radius/dictionary.ipunplugged \
213 radius/dictionary.issanni \
214 radius/dictionary.itk \
215 radius/dictionary.jradius \
216 radius/dictionary.juniper \
217 radius/dictionary.kineto \
218 radius/dictionary.karlnet \
219 radius/dictionary.lancom \
220 radius/dictionary.livingston \
221 radius/dictionary.localweb \
222 radius/dictionary.lucent \
223 radius/dictionary.manzara \
224 radius/dictionary.meinberg \
225 radius/dictionary.merit \
226 radius/dictionary.meru \
227 radius/dictionary.microsoft \
228 radius/dictionary.mikrotik \
229 radius/dictionary.motorola \
230 radius/dictionary.motorola.wimax \
231 radius/dictionary.navini \
232 radius/dictionary.netscreen \
233 radius/dictionary.networkphysics \
234 radius/dictionary.nexans \
235 radius/dictionary.nokia \
236 radius/dictionary.nokia.conflict \
237 radius/dictionary.nomadix \
238 radius/dictionary.nortel \
239 radius/dictionary.ntua \
240 radius/dictionary.openser \
241 radius/dictionary.packeteer \
242 radius/dictionary.paloalto \
243 radius/dictionary.patton \
244 radius/dictionary.perle \
245 radius/dictionary.propel \
246 radius/dictionary.prosoft \
247 radius/dictionary.proxim \
248 radius/dictionary.purewave \
249 radius/dictionary.quiconnect \
250 radius/dictionary.quintum \
251 radius/dictionary.redcreek \
252 radius/dictionary.rfc2865 \
253 radius/dictionary.rfc2866 \
254 radius/dictionary.rfc2867 \
255 radius/dictionary.rfc2868 \
256 radius/dictionary.rfc2869 \
257 radius/dictionary.rfc3162 \
258 radius/dictionary.rfc3576 \
259 radius/dictionary.rfc3580 \
260 radius/dictionary.rfc4072 \
261 radius/dictionary.rfc4372 \
262 radius/dictionary.rfc4603 \
263 radius/dictionary.rfc4675 \
264 radius/dictionary.rfc4679 \
265 radius/dictionary.rfc4818 \
266 radius/dictionary.rfc4849 \
267 radius/dictionary.rfc5090 \
268 radius/dictionary.rfc5176 \
269 radius/dictionary.rfc5447 \
270 radius/dictionary.rfc5580 \
271 radius/dictionary.rfc5607 \
272 radius/dictionary.rfc5904 \
273 radius/dictionary.rfc6519 \
274 radius/dictionary.rfc6572 \
275 radius/dictionary.rfc6677 \
276 radius/dictionary.rfc6911 \
277 radius/dictionary.rfc6929 \
278 radius/dictionary.rfc6930 \
279 radius/dictionary.rfc7055 \
280 radius/dictionary.rfc7155 \
281 radius/dictionary.rfc7268 \
282 radius/dictionary.rfc7499 \
283 radius/dictionary.riverbed \
284 radius/dictionary.riverstone \
285 radius/dictionary.roaringpenguin \
286 radius/dictionary.ruckus \
287 radius/dictionary.ruggedcom \
288 radius/dictionary.sangoma \
289 radius/dictionary.sg \
290 radius/dictionary.shasta \
291 radius/dictionary.shiva \
292 radius/dictionary.siemens \
293 radius/dictionary.slipstream \
294 radius/dictionary.sofaware \
295 radius/dictionary.sonicwall \
296 radius/dictionary.springtide \
297 radius/dictionary.starent \
298 radius/dictionary.starent.vsa1 \
299 radius/dictionary.surfnet \
300 radius/dictionary.symbol \
301 radius/dictionary.t_systems_nova \
302 radius/dictionary.telebit \
303 radius/dictionary.telkom \
304 radius/dictionary.terena \
305 radius/dictionary.trapeze \
306 radius/dictionary.travelping \
307 radius/dictionary.tropos \
308 radius/dictionary.ukerna \
309 radius/dictionary.unix \
310 radius/dictionary.usr \
311 radius/dictionary.utstarcom \
312 radius/dictionary.valemount \
313 radius/dictionary.versanet \
314 radius/dictionary.vqp \
315 radius/dictionary.walabi \
316 radius/dictionary.waverider \
317 radius/dictionary.wichorus \
318 radius/dictionary.wimax \
319 radius/dictionary.wimax.alvarion \
320 radius/dictionary.wimax.wichorus \
321 radius/dictionary.wispr \
322 radius/dictionary.xedia \
323 radius/dictionary.xylan \
324 radius/dictionary.yubico \
325 radius/dictionary.zeus \
326 radius/dictionary.zte \
327 radius/dictionary.zyxel
330 # Install the tpncp directory files in the "tpncp" subdirectory
333 tpncpdir = $(pkgdatadir)/tpncp
338 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
341 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
342 dist_wimaxasncp_DATA = \
343 wimaxasncp/dictionary.xml \
344 wimaxasncp/dictionary.dtd
347 -include plugins/Custom.make
348 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
349 -dlopen plugins/docsis/docsis.la \
350 -dlopen plugins/ethercat/ethercat.la \
351 -dlopen plugins/gryphon/gryphon.la \
352 -dlopen plugins/irda/irda.la \
353 -dlopen plugins/m2m/m2m.la \
354 -dlopen plugins/mate/mate.la \
355 -dlopen plugins/opcua/opcua.la \
356 -dlopen plugins/profinet/profinet.la \
357 -dlopen plugins/stats_tree/stats_tree.la \
358 -dlopen plugins/unistim/unistim.la \
359 -dlopen plugins/wimax/wimax.la \
360 -dlopen plugins/wimaxmacphy/wimaxmacphy.la
368 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
369 BUILT_HEADER_FILES = \
374 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
376 # Header files generated from source files.
377 GENERATED_HEADER_FILES = \
378 text2pcap-scanner_lex.h \
379 $(BUILT_HEADER_FILES)
381 # C source files generated from source files.
384 # All the generated files.
385 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
387 EXTCAP_COMMON_SRC = \
392 EXTCAP_COMMON_INCLUDES = \
397 # sources common for wireshark, tshark, and rawshark
403 # corresponding headers
404 SHARK_COMMON_INCLUDES = \
412 # wireshark specifics
413 WIRESHARK_COMMON_SRC = \
414 $(SHARK_COMMON_SRC) \
423 # corresponding headers
424 WIRESHARK_COMMON_INCLUDES = \
434 SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
438 EXTRALINKFLAGS = -Wl,-static -all-static
440 EXTRALINKFLAGS = -export-dynamic
451 # Libraries and plugin flags with which to link wireshark.
453 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
454 # (see configure.ac for pkg-config modules used).
456 wireshark_common_ldadd = \
457 capchild/libcapchild.a \
458 caputils/libcaputils.a \
461 codecs/libwscodecs.la \
462 wiretap/libwiretap.la \
463 epan/libwireshark.la \
464 wsutil/libwsutil.la \
467 @APPLICATIONSERVICES_FRAMEWORKS@ \
468 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
469 @COREFOUNDATION_FRAMEWORKS@ \
474 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
476 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
478 wireshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS) $(Qt_LDFLAGS)
482 $(wireshark_common_ldadd) \
487 wireshark_LDADD += $(SPEEXDSP_LIBS)
492 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
494 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
496 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
498 wireshark_gtk_LDADD = \
500 $(wireshark_common_ldadd) \
506 $(SHARK_COMMON_SRC) \
512 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
514 tshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
516 # Libraries and plugin flags with which to link tshark.
518 capchild/libcapchild.a \
519 caputils/libcaputils.a \
522 wiretap/libwiretap.la \
523 epan/libwireshark.la \
524 wsutil/libwsutil.la \
529 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
530 @COREFOUNDATION_FRAMEWORKS@
533 $(SHARK_COMMON_SRC) \
537 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
539 tfshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
541 # Libraries and plugin flags with which to link tfshark.
545 wiretap/libwiretap.la \
546 epan/libwireshark.la \
547 wsutil/libwsutil.la \
552 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
553 @COREFOUNDATION_FRAMEWORKS@
556 $(SHARK_COMMON_SRC) \
560 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
562 rawshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
564 # Libraries and plugin flags with which to link rawshark.
566 caputils/libcaputils.a \
568 wiretap/libwiretap.la \
569 epan/libwireshark.la \
570 wsutil/libwsutil.la \
575 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
576 @COREFOUNDATION_FRAMEWORKS@
578 text2pcap_SOURCES = \
580 text2pcap-scanner.l \
583 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
585 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
586 # which is generated (and therefore not always clean).
587 # We could generate text2pcap.o as a library with -Werror but for now it
588 # doesn't seem worth the effort.
589 text2pcap_CFLAGS = $(GENERATED_CFLAGS)
591 # Libraries with which to link text2pcap.
593 writecap/libwritecap.a \
594 wsutil/libwsutil.la \
601 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
603 # Libraries with which to link mergecap.
605 wiretap/libwiretap.la \
606 wsutil/libwsutil.la \
613 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
615 # Libraries with which to link capinfos.
617 wiretap/libwiretap.la \
618 wsutil/libwsutil.la \
626 captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
628 # Libraries with which to link captype.
630 wiretap/libwiretap.la \
631 wsutil/libwsutil.la \
638 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
640 # Libraries with which to link editcap.
642 wiretap/libwiretap.la \
643 wsutil/libwsutil.la \
646 reordercap_SOURCES = \
650 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
652 # Libraries with which to link reordercap.
654 wiretap/libwiretap.la \
655 wsutil/libwsutil.la \
662 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
664 # Libraries with which to link randpkt.
666 randpkt_core/librandpkt_core.a \
667 wiretap/libwiretap.la \
668 wsutil/libwsutil.la \
676 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
678 # Libraries and plugin flags with which to link dftest.
681 wiretap/libwiretap.la \
682 wsutil/libwsutil.la \
683 epan/libwireshark.la \
689 echld_test_SOURCES = \
692 capture_stop_conditions.c \
698 echld_test_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
701 epan/libwireshark.la \
703 writecap/libwritecap.a \
704 wsutil/libwsutil.la \
709 echld_test_DEPENDENCIES = \
715 capture_stop_conditions.c \
723 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
725 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
727 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
729 # Libraries with which to link dumpcap.
731 caputils/libcaputils.a \
732 writecap/libwritecap.a \
733 wsutil/libwsutil.la \
736 @SYSTEMCONFIGURATION_FRAMEWORKS@ \
737 @COREFOUNDATION_FRAMEWORKS@ \
741 # this target needed for distribution only
743 $(SHARK_COMMON_INCLUDES) \
744 $(EXTCAP_COMMON_INCLUDES) \
745 $(WIRESHARK_COMMON_INCLUDES) \
746 capture_stop_conditions.h \
753 # Build the version string
755 # FORCE is the portable version of .PHONY
759 $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
762 # Build shell scripts by doing variable substitution.
763 # Taken from autoconf 2.13.
765 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
770 $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
773 $(PYTHON) $(srcdir)/tools/make-services.py
781 # We have to remove version.h with "make distclean", as, otherwise,
782 # "make distcheck" fails. We still need to make the tarballs work
783 # even if you do "make distclean" and try to rebuild; that's a work in
786 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
787 # list of files removed by "make distclean"? (It's deliberately
788 # included in that list.)
794 MAINTAINERCLEANFILES = \
820 abi-descriptor.template \
834 macosx-support-lib-patches \
840 text2pcap-scanner.l \
844 wireshark-gtk.desktop \
845 wireshark-mime-package.xml \
846 wireshark.appdata.xml \
850 CMakeListsCustom.txt.example \
854 ConfigureChecks.cmake \
859 if HAVE_DUMPCAP_GROUP
860 chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
863 $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
864 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
867 chmod o-rws $(DESTDIR)$(bindir)/dumpcap
868 chmod +s $(DESTDIR)$(bindir)/dumpcap
908 @wireshark_SUBDIRS@ \
915 help/faq.txt: $(srcdir)/help/faq.py
916 $(AM_V_GEN)(cd help ; \
919 libtool: $(LIBTOOL_DEPS)
920 $(SHELL) ./config.status --recheck
924 # Install icons and other desktop files for (for use with GNOME, KDE, or
925 # any other freedesktop.org-compliant desktops).
927 # We use $(datadir). If the desktop doesn't look for them there,
928 # the desktop is broken; the latest XDG Base Directory Specification
931 # http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
935 # $XDG_DATA_DIRS defines the preference-ordered set of base directories
936 # to search for data files in addition to the $XDG_DATA_HOME base
937 # directory. The directories in $XDG_DATA_DIRS should be seperated with a
940 # If $XDG_DATA_DIRS is either not set or empty, a value equal to
941 # /usr/local/share/:/usr/share/ should be used.
945 # if this is configured to install under /usr, that should Just Work,
946 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
947 # compliant with the latest version of the spec;
949 # if this installs under the default /usr/share, that should Just Work,
950 # unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
951 # compliant with the latest version of the spec;
953 # if this is configured to install somewhere else, whoever configured
954 # it should also have made sure that XDG_DATA_DIRS was set correctly
955 # and, if that doesn't work, the desktop isn't compliant with the
956 # latest version of the spec.
958 # We install these as part of the standard installation process, just
959 # as, for example, Inkscape does with its icons. See bug 10737.
961 # Do not use the -T flag to the install command, as it's not portable.
962 # Some versions of install don't support a -T flag at all, and the
963 # FreeBSD install command has a -T flag that takes an argument and
964 # that has completely different semantics.
966 # We neither need nor want any of this on OS X, nor do we want it if
967 # we're not building Wireshark (that being the only desktop app).
970 if BUILDING_WIRESHARK
972 mkdir -p $(DESTDIR)$(datadir)/mime/packages
973 install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
974 mkdir -p $(DESTDIR)$(datadir)/appdata
975 install -m 644 $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
976 mkdir -p $(DESTDIR)$(datadir)/applications
977 if test x$(DESKTOP_FILE_INSTALL) != x ; then \
978 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)$(datadir)/applications $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop ; \
980 install -m 644 $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications; \
982 for size in 16 24 32 48 64 128 256; \
984 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
985 install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
986 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
987 install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
989 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
990 install -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
995 if BUILDING_WIRESHARK
997 rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
998 rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
999 rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
1000 rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
1001 for size in 16 24 32 48 64 128 256; \
1003 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1004 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1006 rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1010 install-data-hook: update-databases-and-caches-install
1011 uninstall-hook: update-databases-and-caches-uninstall
1014 # XXX - which of this stuff can, and should, we do ourselves?
1016 # If we're "installing" under $(DESTDIR) as part of the process of
1017 # building a package, we probably don't need to, and shouldn't, do
1020 # If we're installing for use, we may need to do some of this; which
1021 # of them do we need to tell where to search, especially if we're
1022 # installing somewhere other than under /usr or /usr/local?
1024 # What if we're installing in the user's home directory?
1026 # What if we're installing under /opt?
1028 # We only need to run ldconfig on systems where it's necessary in order
1029 # to update a shared library cache to know about our shared libraries.
1031 # We only need to run update-desktop-database and update-mime-database
1032 # on freedesktop.org desktops.
1034 # We only need to run gtk-update-icon-cache if we're installing a GTK+
1035 # version of Wireshark.
1037 # We neither need nor want any of this on OS X, nor do we want it if
1038 # we're not building Wireshark (that being the only desktop app).
1040 update-databases-and-caches-common:
1041 if BUILDING_WIRESHARK
1043 @echo "You may need to run \"ldconfig\" as root"
1044 @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
1045 @echo "You may need to run \"update-mime-database $(datadir)/mime\""
1046 @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
1050 update-databases-and-caches-install: update-databases-and-caches-common
1052 update-databases-and-caches-uninstall: update-databases-and-caches-common
1054 # Used by svr4-package and osx-package
1055 # We load top_stagedir with an absolute path so that libtool doesn't freak.
1056 top_stagedir=$(abs_top_builddir)/packaging/staging
1057 stagedir=$(top_stagedir)/$(PACKAGE).inst
1062 solaris-package: svr4-package
1064 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1065 @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1066 rm -rf $(stagedir) ; \
1067 $(MAKE) DESTDIR=$(stagedir) install; \
1068 $(srcdir)/packaging/svr4/mkpkg \
1070 $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1074 echo "Error: SVR4 packaging tools not found." ; \
1075 echo "Package build abandoned." ; \
1079 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1082 @cd $(rpm_topdir) && \
1083 mkdir -p BUILD RPMS SOURCES SRPMS && \
1085 ln -sf ../../../$(distdir).tar.xz && \
1087 $(RPMBUILD) --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1088 @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1089 echo "Package successfully built in `pwd`/RPMS." ; \
1090 rm -f SOURCES/$(distdir).tar.xz ../../$(distdir).tar.xz
1093 @echo "RPM executable not available." ; \
1097 # XXX - This assumes we're building from the source directory.
1098 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1099 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1100 rm -rf $(stagedir) ; \
1101 $(MAKE) DESTDIR=$(stagedir) install; \
1102 cd $(srcdir)/packaging/macosx ; \
1103 ./osx-app.sh @OSX_APP_FLAGS@ \
1105 --binary-path ../staging/$(PACKAGE).inst$(bindir) \
1106 --plugin-path ../staging/$(PACKAGE).inst$(plugindir) \
1107 --extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
1108 --library-path ../staging/$(PACKAGE).inst$(libdir) ; \
1110 echo "Error: OS X packaging tools not found." ; \
1111 echo "Package build abandoned." ; \
1114 packaging/macosx/COPYING.txt: COPYING
1115 (cd packaging/macosx ; \
1116 $(MAKE) COPYING.txt ;)
1118 osx-package: osx-app packaging/macosx/COPYING.txt
1119 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1120 cd $(srcdir)/packaging/macosx ; \
1121 chmod +x ./osx-dmg.sh ; \
1122 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1125 osx-install: osx-app
1126 @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1127 echo "Copying Wireshark.app to /Applications" ; \
1128 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ; \
1132 cd epan && $(MAKE) $@
1135 rm -rf $(top_stagedir)
1138 $(MAKE) -C wiretap dumpabi-libwiretap
1139 $(MAKE) -C epan dumpabi-libwireshark
1140 $(MAKE) -C wsutil dumpabi-libwsutil
1143 $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
1144 -sourcedir=$(srcdir) \
1146 $(wireshark_gtk_SOURCES)
1147 # $(EXTRA_wireshark_gtk_SOURCES)
1149 checkapi: checkapi_local
1150 cd wiretap && $(MAKE) checkapi
1151 cd codecs && $(MAKE) checkapi
1152 cd capchild && $(MAKE) checkapi
1153 cd caputils && $(MAKE) checkapi
1154 cd ui && $(MAKE) checkapi
1155 cd ui/gtk && $(MAKE) checkapi
1156 cd ui/cli && $(MAKE) checkapi
1157 cd epan && $(MAKE) checkapi
1158 cd epan/crypt && $(MAKE) checkapi
1159 cd epan/dfilter && $(MAKE) checkapi
1160 cd epan/ftypes && $(MAKE) checkapi
1161 cd epan/wmem && $(MAKE) checkapi
1162 cd epan/wslua && $(MAKE) checkapi
1163 cd epan/dissectors && $(MAKE) checkapi
1164 cd plugins && $(MAKE) checkapi
1165 cd randpkt_core && $(MAKE) checkapi
1166 cd writecap && $(MAKE) checkapi
1167 cd wsutil && $(MAKE) checkapi
1170 # --external-sources requires 0.4.0 or later.
1172 cd $(top_srcdir) && \
1173 shellcheck --external-sources \
1174 tools/fuzz-test.sh \
1175 tools/randpkt-test.sh \
1177 tools/test-captures.sh \
1178 tools/valgrind-wireshark.sh
1181 @echo "Shellcheck not available." ; \
1185 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1188 cd epan && $(MAKE) $@
1189 cd capchild && $(MAKE) $@
1190 cd caputils && $(MAKE) $@
1191 cd randpkt_core && $(MAKE) $@
1193 (umask 022 ; $(DOXYGEN) doxygen.cfg)
1199 zip -rq wsar_html.zip wsar_html
1202 # Update AUTHORS file with entries from git shortlog
1204 cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1207 printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe)" \
1208 > $(top_distdir)/version.conf