Revert "When doing the distcheck cmake check only verify that cmake runs, don't verif...
[metze/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Wireshark
3 #
4 # Wireshark - Network traffic analyzer
5 # By Gerald Combs <gerald@wireshark.org>
6 # Copyright 1998 Gerald Combs
7 #
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.
12 #
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.
17 #
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.
21
22 AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
23 ACLOCAL_AMFLAGS = `./aclocal-flags`
24
25 if HAVE_WARNINGS_AS_ERRORS
26 AM_CLEAN_CFLAGS = -Werror
27 endif
28
29 bin_PROGRAMS = \
30         @wireshark_bin@         \
31         @tshark_bin@            \
32         @tfshark_bin@           \
33         @text2pcap_bin@         \
34         @mergecap_bin@          \
35         @capinfos_bin@          \
36         @captype_bin@           \
37         @editcap_bin@           \
38         @randpkt_bin@           \
39         @dftest_bin@            \
40         @dumpcap_bin@           \
41         @reordercap_bin@        \
42         @rawshark_bin@          \
43         @echld_test_bin@
44
45 EXTRA_PROGRAMS = wireshark wireshark-qt tshark tfshark capinfos captype editcap \
46         mergecap dftest randpkt text2pcap dumpcap reordercap rawshark \
47         wireshark_cxx echld_test
48
49 #
50 # Wireshark configuration files are put in $(pkgdatadir).
51 #
52 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
53         smi_modules ipmap.html pdml2html.xsl
54
55 #
56 # Install global profiles in the "profiles" subdirectory
57 #
58 profilesdir = $(pkgdatadir)
59 nobase_dist_profiles_DATA = \
60         profiles/Bluetooth/colorfilters \
61         profiles/Classic/colorfilters
62
63 #
64 # Install the Diameter DTD and XML files in the "diameter" subdirectory
65 # of that directory.
66 #
67 diameterdir = $(pkgdatadir)/diameter
68 include diameter/Custom.make
69 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
70         diameter/chargecontrol.xml \
71         diameter/ChinaTelecom.xml \
72         diameter/Cisco.xml \
73         diameter/Custom.xml \
74         diameter/dictionary.dtd \
75         diameter/dictionary.xml \
76         diameter/eap.xml \
77         diameter/Ericsson.xml \
78         diameter/etsie2e4.xml \
79         diameter/gqpolicy.xml \
80         diameter/imscxdx.xml \
81         diameter/mobileipv4.xml \
82         diameter/mobileipv6.xml \
83         diameter/nasreq.xml \
84         diameter/sip.xml \
85         diameter/Starent.xml \
86         diameter/sunping.xml \
87         diameter/TGPPGmb.xml \
88         diameter/TGPPRx.xml \
89         diameter/TGPPS9.xml \
90         diameter/TGPPSh.xml \
91         diameter/Vodafone.xml \
92         diameter/AlcatelLucent.xml \
93         diameter/Nokia.xml \
94         diameter/NokiaSiemensNetworks.xml \
95         diameter/SKT.xml \
96         diameter/HP.xml \
97         diameter/VerizonWireless.xml
98
99 #
100 # Install the DTDs directory files in the "dtds" subdirectory
101 # of that directory
102 #
103 dtdsdir = $(pkgdatadir)/dtds
104 dist_dtds_DATA = \
105         dtds/dc.dtd \
106         dtds/itunes.dtd \
107         dtds/mscml.dtd \
108         dtds/pocsettings.dtd \
109         dtds/presence.dtd \
110         dtds/reginfo.dtd \
111         dtds/rlmi.dtd \
112         dtds/rss.dtd \
113         dtds/smil.dtd \
114         dtds/xcap-caps.dtd \
115         dtds/xcap-error.dtd \
116         dtds/watcherinfo.dtd
117
118 #
119 # Install the RADIUS directory files in the "radius" subdirectory
120 # of that directory.
121 #
122 radiusdir = $(pkgdatadir)/radius
123 include radius/Custom.make
124 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
125         radius/README.radius_dictionary  \
126         radius/custom.includes  \
127         radius/dictionary  \
128         radius/dictionary.3com  \
129         radius/dictionary.3gpp  \
130         radius/dictionary.3gpp2  \
131         radius/dictionary.acc  \
132         radius/dictionary.acme \
133         radius/dictionary.airespace \
134         radius/dictionary.alcatel  \
135         radius/dictionary.alcatel.esam \
136         radius/dictionary.alcatel.sr \
137         radius/dictionary.alcatel-lucent.aaa \
138         radius/dictionary.alcatel-lucent.xylan \
139         radius/dictionary.alteon  \
140         radius/dictionary.altiga  \
141         radius/dictionary.alvarion \
142         radius/dictionary.apc \
143         radius/dictionary.aptis  \
144         radius/dictionary.aruba  \
145         radius/dictionary.ascend  \
146         radius/dictionary.asn \
147         radius/dictionary.audiocodes \
148         radius/dictionary.avaya \
149         radius/dictionary.azaire \
150         radius/dictionary.bay  \
151         radius/dictionary.bintec  \
152         radius/dictionary.bristol  \
153         radius/dictionary.cablelabs  \
154         radius/dictionary.cabletron  \
155         radius/dictionary.chillispot \
156         radius/dictionary.cisco  \
157         radius/dictionary.cisco.bbsm  \
158         radius/dictionary.cisco.vpn3000  \
159         radius/dictionary.cisco.vpn5000  \
160         radius/dictionary.clavister \
161         radius/dictionary.colubris  \
162         radius/dictionary.columbia_university  \
163         radius/dictionary.compat  \
164         radius/dictionary.cosine  \
165         radius/dictionary.dhcp \
166         radius/dictionary.digium \
167         radius/dictionary.eltex \
168         radius/dictionary.epygi \
169         radius/dictionary.ericsson  \
170         radius/dictionary.erx  \
171         radius/dictionary.extreme  \
172         radius/dictionary.fortinet \
173         radius/dictionary.foundry  \
174         radius/dictionary.freeradius  \
175         radius/dictionary.freeradius.internal  \
176         radius/dictionary.freeswitch \
177         radius/dictionary.gandalf  \
178         radius/dictionary.garderos  \
179         radius/dictionary.gemtek  \
180         radius/dictionary.h3c \
181         radius/dictionary.hp \
182         radius/dictionary.huawei \
183         radius/dictionary.iea \
184         radius/dictionary.infonet \
185         radius/dictionary.ipunplugged \
186         radius/dictionary.issanni \
187         radius/dictionary.itk  \
188         radius/dictionary.jradius \
189         radius/dictionary.juniper  \
190         radius/dictionary.karlnet  \
191         radius/dictionary.lancom \
192         radius/dictionary.livingston  \
193         radius/dictionary.localweb  \
194         radius/dictionary.lucent \
195         radius/dictionary.manzara \
196         radius/dictionary.merit  \
197         radius/dictionary.microsoft  \
198         radius/dictionary.mikrotik  \
199         radius/dictionary.motorola \
200         radius/dictionary.motorola.wimax \
201         radius/dictionary.navini  \
202         radius/dictionary.netscreen  \
203         radius/dictionary.networkphysics \
204         radius/dictionary.nexans \
205         radius/dictionary.nokia  \
206         radius/dictionary.nokia.conflict \
207         radius/dictionary.nomadix  \
208         radius/dictionary.nortel \
209         radius/dictionary.ntua \
210         radius/dictionary.openser \
211         radius/dictionary.packeteer \
212         radius/dictionary.patton \
213         radius/dictionary.propel  \
214         radius/dictionary.prosoft \
215         radius/dictionary.quiconnect \
216         radius/dictionary.quintum  \
217         radius/dictionary.redback  \
218         radius/dictionary.redcreek  \
219         radius/dictionary.rfc2865 \
220         radius/dictionary.rfc2866 \
221         radius/dictionary.rfc2867 \
222         radius/dictionary.rfc2868 \
223         radius/dictionary.rfc2869 \
224         radius/dictionary.rfc3162 \
225         radius/dictionary.rfc3576 \
226         radius/dictionary.rfc3580 \
227         radius/dictionary.rfc4072 \
228         radius/dictionary.rfc4372 \
229         radius/dictionary.rfc4603 \
230         radius/dictionary.rfc4675 \
231         radius/dictionary.rfc4679 \
232         radius/dictionary.rfc4818 \
233         radius/dictionary.rfc4849 \
234         radius/dictionary.rfc5090 \
235         radius/dictionary.rfc5176 \
236         radius/dictionary.rfc5447 \
237         radius/dictionary.rfc5580 \
238         radius/dictionary.rfc5607 \
239         radius/dictionary.rfc5904 \
240         radius/dictionary.rfc6519 \
241         radius/dictionary.rfc6572 \
242         radius/dictionary.riverstone \
243         radius/dictionary.roaringpenguin \
244         radius/dictionary.shasta  \
245         radius/dictionary.shiva  \
246         radius/dictionary.slipstream \
247         radius/dictionary.sofaware \
248         radius/dictionary.sonicwall  \
249         radius/dictionary.springtide  \
250         radius/dictionary.starent  \
251         radius/dictionary.t_systems_nova  \
252         radius/dictionary.telebit  \
253         radius/dictionary.telkom \
254         radius/dictionary.trapeze  \
255         radius/dictionary.tropos \
256         radius/dictionary.ukerna  \
257         radius/dictionary.unix  \
258         radius/dictionary.usr  \
259         radius/dictionary.utstarcom \
260         radius/dictionary.valemount  \
261         radius/dictionary.versanet  \
262         radius/dictionary.vqp \
263         radius/dictionary.walabi \
264         radius/dictionary.waverider \
265         radius/dictionary.wichorus \
266         radius/dictionary.wimax  \
267         radius/dictionary.wimax.wichorus \
268         radius/dictionary.wispr  \
269         radius/dictionary.xedia \
270         radius/dictionary.zyxel
271
272 #
273 # Install the tpncp directory files in the "tpncp" subdirectory
274 # of that directory
275 #
276 tpncpdir = $(pkgdatadir)/tpncp
277 dist_tpncp_DATA = \
278         tpncp/tpncp.dat
279
280 #
281 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
282 # of that directory
283 #
284 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
285 dist_wimaxasncp_DATA = \
286         wimaxasncp/dictionary.xml \
287         wimaxasncp/dictionary.dtd
288
289 if HAVE_PLUGINS
290 -include plugins/Custom.make
291 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
292         -dlopen plugins/docsis/docsis.la \
293         -dlopen plugins/ethercat/ethercat.la \
294         -dlopen plugins/gryphon/gryphon.la \
295         -dlopen plugins/irda/irda.la \
296         -dlopen plugins/m2m/m2m.la \
297         -dlopen plugins/mate/mate.la \
298         -dlopen plugins/opcua/opcua.la \
299         -dlopen plugins/profinet/profinet.la \
300         -dlopen plugins/stats_tree/stats_tree.la \
301         -dlopen plugins/unistim/unistim.la \
302         -dlopen plugins/wimax/wimax.la \
303         -dlopen plugins/wimaxmacphy/wimaxmacphy.la
304
305 else            # HAVE_PLUGINS
306
307 plugin_ldadd =
308
309 endif           # HAVE_PLUGINS
310
311 include Makefile.common
312
313 if ENABLE_STATIC
314 if HAVE_GTK
315 wireshark_LDFLAGS = -Wl,-static -all-static
316 endif
317 if HAVE_Qt
318 wireshark_qt_LDFLAGS = -Wl,-static -all-static
319 endif
320 else
321 if HAVE_GTK
322 wireshark_LDFLAGS = -export-dynamic
323 endif
324 if HAVE_Qt
325 wireshark_qt_LDFLAGS = -export-dynamic
326 endif
327 endif
328
329 # Libraries and plugin flags with which to link wireshark.
330 #
331 # Note that Wireshark, when built with a version of GTK+ that runs
332 # atop X11, doesn't have to be linked with @SOCKET_LIBS@ or @NSL_LIBS@,
333 # as those should also be included in @GTK_LIBS@ (as those are also
334 # needed for X applications, and GTK+ applications are X applications
335 # if the version of GTK+ they're built with runs atop X11).
336 #
337 # However, it *does* have to be linked with @GLIB_LIBS@; not all of
338 # the necessary GLib libraries are included in @GTK_LIBS@.  To quote
339 # Gentoo bug 423743 at
340 #
341 #       https://bugs.gentoo.org/show_bug.cgi?id=423743
342 #
343 # "The Makefile.am claims including GLIB_LIBS when linking wireshark is
344 # unnecessary, because wireshark links to GTK_LIBS which is a superset.
345 # It is not actually a superset: gmodule is included in GLIB_LIBS but
346 # not in GTK_LIBS (unless accidentally on older glibs/gtks)."
347 #
348 # although it's also possible that -lgmodule is in GTK_LIBS but not
349 # GLIB_LIBS (that's the case on my machine right now, for example).
350 #
351 wireshark_ldadd = \
352         capchild/libcapchild.a          \
353         caputils/libcaputils.a          \
354         ui/libui.a                      \
355         ui/libui_dirty.a                \
356         codecs/libcodec.a               \
357         wiretap/libwiretap.la           \
358         epan/libwireshark.la            \
359         wsutil/libwsutil.la             \
360         @SSL_LIBS@                      \
361         $(plugin_ldadd)                 \
362         @PCAP_LIBS@                     \
363         @C_ARES_LIBS@                   \
364         @ADNS_LIBS@                     \
365         @KRB5_LIBS@                     \
366         @APPLICATIONSERVICES_FRAMEWORKS@        \
367         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
368         @COREFOUNDATION_FRAMEWORKS@     \
369         @LIBGCRYPT_LIBS@                \
370         @LIBGNUTLS_LIBS@                \
371         @LIBSMI_LDFLAGS@                \
372         @PORTAUDIO_LIBS@                \
373         @GLIB_LIBS@                     \
374         -lm
375
376 if HAVE_Qt
377 wireshark_qt_SOURCES = $(WIRESHARK_COMMON_SRC)
378 wireshark_qt_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
379 wireshark_qt_CFLAGS = $(AM_CLEAN_CFLAGS)
380 wireshark_qt_LDADD = \
381         ui/qt/libqtui.a \
382         $(wireshark_ldadd) \
383         @Qt_LIBS@
384
385 #
386 # XXX - this makes wireshark_qt_LDFLAGS not work; we should figure out
387 # another way to get wireshark-qt linked as a C++ program, perhaps by
388 # having a top-level wireshark-qt.cpp file that contains main() and
389 # hthat calls the UI code from ui/qt.
390 #
391 wireshark_qt_LINK = $(CXXLINK)
392 endif
393
394 if HAVE_GTK
395 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC)
396 wireshark_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
397 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS)
398 wireshark_LDADD = \
399         ui/gtk/libgtkui.a \
400         $(wireshark_ldadd) \
401         @GTK_LIBS@
402 endif
403
404 # Ideally we could trigger automatic c++ linking here with
405 #   nodist_EXTRA_wireshark_SOURCES = dummy.cpp
406 # Unfortunately that check is done by automake and not configure.
407 # We do the following to try to avoid using c++ to link Wireshark at
408 # all times.
409 nodist_EXTRA_wireshark_cxx_SOURCES = dummy.cpp
410 wireshark_cxx_SOURCES =
411
412 if ENABLE_STATIC
413 tshark_LDFLAGS = -Wl,-static -all-static
414 else
415 tshark_LDFLAGS = -export-dynamic
416 endif
417
418 # Libraries and plugin flags with which to link tshark.
419 tshark_LDADD = \
420         capchild/libcapchild.a          \
421         caputils/libcaputils.a          \
422         ui/cli/libcliui.a               \
423         ui/libui.a                      \
424         wiretap/libwiretap.la           \
425         epan/libwireshark.la            \
426         wsutil/libwsutil.la             \
427         @SSL_LIBS@                      \
428         $(plugin_ldadd)                 \
429         @GLIB_LIBS@                     \
430         @PCAP_LIBS@                     \
431         @SOCKET_LIBS@                   \
432         @NSL_LIBS@                      \
433         @C_ARES_LIBS@                   \
434         @ADNS_LIBS@                     \
435         @KRB5_LIBS@                     \
436         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
437         @COREFOUNDATION_FRAMEWORKS@     \
438         @LIBGCRYPT_LIBS@                \
439         @LIBGNUTLS_LIBS@                \
440         @LIBSMI_LDFLAGS@                \
441         -lm
442 tshark_CFLAGS = $(AM_CLEAN_CFLAGS)
443
444 if ENABLE_STATIC
445 tfshark_LDFLAGS = -Wl,-static -all-static
446 else
447 tfshark_LDFLAGS = -export-dynamic
448 endif
449
450 # Libraries and plugin flags with which to link tfshark.
451 tfshark_LDADD = \
452         ui/cli/libcliui.a               \
453         ui/libui.a                      \
454         wiretap/libwiretap.la           \
455         epan/libwireshark.la            \
456         wsutil/libwsutil.la             \
457         @SSL_LIBS@                      \
458         $(plugin_ldadd)                 \
459         @GLIB_LIBS@                     \
460         @PCAP_LIBS@                     \
461         @SOCKET_LIBS@                   \
462         @NSL_LIBS@                      \
463         @KRB5_LIBS@                     \
464         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
465         @COREFOUNDATION_FRAMEWORKS@     \
466         @LIBGNUTLS_LIBS@                \
467         @LIBSMI_LDFLAGS@                \
468         -lm
469 tfshark_CFLAGS = $(AM_CLEAN_CFLAGS)
470
471 if ENABLE_STATIC
472 rawshark_LDFLAGS = -Wl,-static -all-static
473 else
474 rawshark_LDFLAGS = -export-dynamic
475 endif
476
477 # Libraries and plugin flags with which to link rawshark.
478 rawshark_LDADD = \
479         caputils/libcaputils.a          \
480         ui/libui.a                      \
481         wiretap/libwiretap.la           \
482         epan/libwireshark.la            \
483         wsutil/libwsutil.la             \
484         @SSL_LIBS@                      \
485         $(plugin_ldadd)                 \
486         @GLIB_LIBS@                     \
487         @PCAP_LIBS@                     \
488         @SOCKET_LIBS@                   \
489         @NSL_LIBS@                      \
490         @C_ARES_LIBS@                   \
491         @ADNS_LIBS@                     \
492         @KRB5_LIBS@                     \
493         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
494         @COREFOUNDATION_FRAMEWORKS@     \
495         @LIBGCRYPT_LIBS@                \
496         @LIBGNUTLS_LIBS@                \
497         @LIBSMI_LDFLAGS@                \
498         -lm
499 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS)
500
501 # Libraries with which to link text2pcap.
502 text2pcap_LDADD = \
503         wsutil/libwsutil.la             \
504         @GLIB_LIBS@                     \
505         -lm
506 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
507 # which is generated (and therefore not always clean).
508 # We could generate text2pcap.o as a library with -Werror but for now it
509 # doesn't seem worth the effort.
510 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
511
512 # Libraries with which to link mergecap.
513 mergecap_LDADD = \
514         wiretap/libwiretap.la           \
515         wsutil/libwsutil.la             \
516         @GLIB_LIBS@
517 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS)
518
519 # Libraries with which to link capinfos.
520 capinfos_LDADD = \
521         wiretap/libwiretap.la           \
522         wsutil/libwsutil.la             \
523         @GLIB_LIBS@                     \
524         @LIBGCRYPT_LIBS@
525 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS)
526
527 # Libraries with which to link captype.
528 captype_LDADD = \
529         wiretap/libwiretap.la           \
530         wsutil/libwsutil.la             \
531         @GLIB_LIBS@
532 captype_CFLAGS = $(AM_CLEAN_CFLAGS)
533
534 # Libraries with which to link editcap.
535 editcap_LDADD = \
536         wiretap/libwiretap.la           \
537         wsutil/libwsutil.la             \
538         @GLIB_LIBS@
539 editcap_CFLAGS = $(AM_CLEAN_CFLAGS)
540
541 # Libraries with which to link reordercap.
542 reordercap_LDADD = \
543         wiretap/libwiretap.la           \
544         wsutil/libwsutil.la             \
545         @GLIB_LIBS@
546 reordercap_CFLAGS = $(AM_CLEAN_CFLAGS)
547
548 # Libraries with which to link randpkt.
549 randpkt_LDADD = \
550         wiretap/libwiretap.la           \
551         wsutil/libwsutil.la             \
552         @GLIB_LIBS@                     \
553         @PCAP_LIBS@                     \
554         @SOCKET_LIBS@                   \
555         @NSL_LIBS@                      \
556         @C_ARES_LIBS@                   \
557         @ADNS_LIBS@                     \
558         -lm
559 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
560
561 # Libraries and plugin flags with which to link dftest.
562 dftest_LDADD = \
563         ui/libui.a                      \
564         wiretap/libwiretap.la           \
565         wsutil/libwsutil.la             \
566         epan/libwireshark.la            \
567         @SSL_LIBS@                      \
568         $(plugin_ldadd)                 \
569         @GLIB_LIBS@                     \
570         @PCAP_LIBS@                     \
571         @SOCKET_LIBS@                   \
572         @NSL_LIBS@                      \
573         @C_ARES_LIBS@                   \
574         @ADNS_LIBS@                     \
575         @KRB5_LIBS@                     \
576         @LIBGCRYPT_LIBS@                \
577         @LIBGNUTLS_LIBS@                \
578         @LIBSMI_LDFLAGS@                \
579         -lm
580 dftest_CFLAGS = $(AM_CLEAN_CFLAGS)
581
582 echld_test_LDADD = \
583         epan/libwireshark.la            \
584         echld/libechld.la               \
585         wsutil/libwsutil.la             \
586         @GLIB_LIBS@                     \
587         @PCAP_LIBS@                     \
588         @SOCKET_LIBS@                   \
589         @NSL_LIBS@                      \
590         @C_ARES_LIBS@                   \
591         @ADNS_LIBS@                     \
592         -lm
593
594 echld_test_DEPENDENCIES = \
595         echld/libechld.la \
596         epan/libwireshark.la
597
598 echld_test_CFLAGS = $(AM_CLEAN_CFLAGS)
599
600
601 # Libraries with which to link dumpcap.
602 dumpcap_LDADD = \
603         caputils/libcaputils.a          \
604         wsutil/libwsutil.la             \
605         @GLIB_LIBS@                     \
606         @PCAP_LIBS@                     \
607         @SOCKET_LIBS@                   \
608         @NSL_LIBS@                      \
609         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
610         @COREFOUNDATION_FRAMEWORKS@     \
611         @LIBCAP_LIBS@
612 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
613 dumpcap_LDFLAGS = $(PIE_LDFLAGS)
614
615 # Common headers
616 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
617         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) \
618         @LUA_INCLUDES@ -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
619
620 #
621 # Build the version string
622 #
623 # FORCE is the portable version of .PHONY
624 FORCE:
625
626 AM_V_PERL = $(am__v_PERL_@AM_V@)
627 am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
628 am__v_PERL_0 = @echo "  PERL    " $@;
629 am__v_PERL_1 =
630
631 version.h: FORCE
632         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
633
634 #
635 # Build shell scripts by doing variable substitution.
636 # Taken from autoconf 2.13.
637 #
638 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
639
640 SUFFIXES = .sh
641 .sh:
642         rm -f $@ $@.tmp
643         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
644
645 services:
646         $(PYTHON) $(srcdir)/tools/make-services.py
647
648 CLEANFILES =            \
649         *~              \
650         doxygen-core.tag        \
651         vgcore.*
652
653 #
654 # We have to remove version.h with "make distclean", as, otherwise,
655 # "make distcheck" fails.  We still need to make the tarballs work
656 # even if you do "make distclean" and try to rebuild; that's a work in
657 # progress.
658 #
659 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
660 # list of files removed by "make distclean"?  (It's deliberately
661 # included in that list.)
662 #
663 DISTCLEANFILES = \
664         ps.c                    \
665         version.h
666
667 MAINTAINERCLEANFILES =          \
668         $(GENERATED_FILES)      \
669         Makefile.in             \
670         aclocal.m4              \
671         compile                 \
672         config.h.in             \
673         configure               \
674         depcomp                 \
675         install-sh              \
676         ltmain.sh               \
677         missing                 \
678         ylwrap
679
680 EXTRA_DIST = \
681         INSTALL.configure       \
682         Makefile.am.inc         \
683         Makefile.common         \
684         Makefile.nmake          \
685         Makefile.nmake.inc      \
686         README.aix              \
687         README.bsd              \
688         README.DECT             \
689         README.hpux             \
690         README.linux            \
691         README.macos            \
692         README.tru64            \
693         README.vmware           \
694         README.windows          \
695         abi-descriptor.template \
696         aclocal-fallback/libsmi.m4 \
697         aclocal-fallback/libgcrypt.m4 \
698         aclocal-fallback/glib-2.0.m4 \
699         aclocal-fallback/gtk-2.0.m4 \
700         aclocal-fallback/gtk-3.0.m4 \
701         aclocal-fallback/ax_check_compile_flag.m4       \
702         aclocal-fallback/ax_gcc_x86_cpuid.m4    \
703         aclocal-fallback/ax_ext.m4      \
704         aclocal-fallback/ax_gcc_x86_avx_xgetbv.m4       \
705         aclocal-flags           \
706         adns_dll.dep            \
707         adns_dll.rc             \
708         autogen.sh              \
709         capinfos.c              \
710         captype.c               \
711         cfilters                \
712         colorfilters            \
713         config.h.win32          \
714         config.nmake            \
715         debian/README.Debian    \
716         debian/README.Debian.security   \
717         debian/changelog        \
718         debian/compat           \
719         debian/control          \
720         debian/copyright        \
721         debian/dirs             \
722         debian/ethereal-common.NEWS     \
723         debian/headers-check.c  \
724         debian/libwireshark-data.install        \
725         debian/libwireshark-dev.install \
726         debian/libwireshark0.install    \
727         debian/libwireshark0.symbols    \
728         debian/libwiretap-dev.install   \
729         debian/libwiretap0.docs \
730         debian/libwiretap0.install      \
731         debian/libwiretap0.symbols      \
732         debian/libwsutil-dev.install    \
733         debian/libwsutil0.install       \
734         debian/libwsutil0.symbols       \
735         debian/license-text-about-dialog        \
736         debian/patches/01_Disable-building-documentation-in-PDF-and-release-no.patch    \
737         debian/patches/04_asn2wrs_ply.patch     \
738         debian/patches/05_note-README-when-running-as-root.patch        \
739         debian/patches/06_release-version.patch \
740         debian/patches/08_wireshark-desktop-menu.patch  \
741         debian/patches/09_idl2wrs.patch \
742         debian/patches/16_licence_about_location.patch  \
743         debian/patches/series   \
744         debian/po/POTFILES.in   \
745         debian/po/cs.po \
746         debian/po/da.po \
747         debian/po/de.po \
748         debian/po/es.po \
749         debian/po/eu.po \
750         debian/po/fi.po \
751         debian/po/fr.po \
752         debian/po/hu.po \
753         debian/po/id.po \
754         debian/po/it.po \
755         debian/po/ja.po \
756         debian/po/ko.po \
757         debian/po/nl.po \
758         debian/po/pt.po \
759         debian/po/pt_BR.po      \
760         debian/po/ru.po \
761         debian/po/sk.po \
762         debian/po/sv.po \
763         debian/po/templates.pot \
764         debian/po/vi.po \
765         debian/postinst         \
766         debian/rules            \
767         debian/source/format    \
768         debian/templates        \
769         debian/tshark.docs      \
770         debian/tshark.install   \
771         debian/tshark.manpages  \
772         debian/wireshark-common.config  \
773         debian/wireshark-common.install \
774         debian/wireshark-common.manpages \
775         debian/wireshark-common.postinst        \
776         debian/wireshark-common.postrm  \
777         debian/wireshark-dev.docs \
778         debian/wireshark-dev.install    \
779         debian/wireshark-dev.manpages \
780         debian/wireshark-dev.prerm \
781         debian/wireshark-doc.docs       \
782         debian/wireshark-qt.docs        \
783         debian/wireshark-qt.install     \
784         debian/wireshark.docs   \
785         debian/wireshark.install        \
786         debian/wireshark.manpages \
787         debian/wireshark.menu   \
788         dfilters                \
789         doxygen_global.cfg      \
790         doxygen.cfg.in          \
791         dumpcap.c               \
792         editcap.c               \
793         epan/print.ps           \
794         fix/FIX.xml             \
795         fix/FIX40.xml           \
796         fix/FIX41.xml           \
797         fix/FIX42.xml           \
798         fix/FIX43.xml           \
799         fix/FIX44.xml           \
800         fix/FIX50.xml           \
801         fix/FIX50SP1.xml        \
802         fix/FIX50SP2.xml        \
803         fix/README              \
804         fix/Values.xsl          \
805         fix/hfDecl.xsl          \
806         fix/hfField.xsl         \
807         fix/hfList.xsl          \
808         idl/coseventcomm.idl    \
809         idl/cosnaming.idl       \
810         idl/tango.idl   \
811         idl/parlay/am.idl       \
812         idl/parlay/cccs.idl     \
813         idl/parlay/cm.idl       \
814         idl/parlay/common_cc_data.idl   \
815         idl/parlay/cs.idl       \
816         idl/parlay/dsc.idl      \
817         idl/parlay/fw_data.idl  \
818         idl/parlay/fw_if.idl    \
819         idl/parlay/fw_if_access.idl     \
820         idl/parlay/fw_if_app.idl        \
821         idl/parlay/fw_if_entop.idl      \
822         idl/parlay/fw_if_service.idl    \
823         idl/parlay/gcc_data.idl \
824         idl/parlay/gcc_interfaces.idl   \
825         idl/parlay/gms.idl      \
826         idl/parlay/mm.idl       \
827         idl/parlay/mmccs.idl    \
828         idl/parlay/mmm.idl      \
829         idl/parlay/mpcc_data.idl        \
830         idl/parlay/mpcc_interfaces.idl  \
831         idl/parlay/osa.idl      \
832         idl/parlay/pam_data.idl \
833         idl/parlay/pam_interfaces.idl   \
834         idl/parlay/Parlay.idl   \
835         idl/parlay/policy_data.idl      \
836         idl/parlay/policy_interfaces.idl        \
837         idl/parlay/README.parlay        \
838         idl/parlay/termcap.idl  \
839         idl/parlay/ui_data.idl  \
840         idl/parlay/ui_interfaces.idl    \
841         image/capinfos.rc.in    \
842         image/captype.rc.in     \
843         image/capture_comment.svg       \
844         image/capture_comment_add.png   \
845         image/capture_comment_disabled.png      \
846         image/capture_comment_update.png        \
847         image/capture_start_24.png              \
848         image/capture_start_active_24.png       \
849         image/capture_stop_24.png               \
850         image/clist_ascend.xpm                  \
851         image/clist_descend.xpm                 \
852         image/copy-8.png                        \
853         image/dfilter_apply_disabled.png        \
854         image/dfilter_apply_hover.png           \
855         image/dfilter_apply_normal.png          \
856         image/dfilter_apply_pressed.png         \
857         image/dfilter_bookmark_disabled.png     \
858         image/dfilter_bookmark_hover.png        \
859         image/dfilter_bookmark_normal.png       \
860         image/dfilter_bookmark_pressed.png      \
861         image/dfilter_dropdown.png              \
862         image/dfilter_erase_active.png          \
863         image/dfilter_erase_normal.png          \
864         image/dfilter_erase_selected.png        \
865         image/dfilter_refresh_active.png        \
866         image/dfilter_refresh_normal.png        \
867         image/display_filter.qrc                \
868         image/dumpcap.rc.in     \
869         image/editcap.rc.in     \
870         image/expert_chat.png   \
871         image/expert_error.png  \
872         image/expert_indicators.svg     \
873         image/expert_none.png   \
874         image/expert_note.png   \
875         image/expert_ok.png     \
876         image/expert_warn.png   \
877         image/file_dlg_win32.rc \
878         image/hi16-app-wireshark.png    \
879         image/hi32-app-wireshark.png    \
880         image/hi48-app-wireshark.png    \
881         image/layout_1.png              \
882         image/layout_2.png              \
883         image/layout_3.png              \
884         image/layout_4.png              \
885         image/layout_5.png              \
886         image/layout_6.png              \
887         image/libwireshark.rc.in        \
888         image/libwsutil.rc.in           \
889         image/lo16-app-wireshark.png    \
890         image/lo32-app-wireshark.png    \
891         image/lo48-app-wireshark.png    \
892         image/Makefile.nmake                    \
893         image/mergecap.rc.in                    \
894         image/minus-8.png                       \
895         image/nsis-checked.bmp                  \
896         image/nsis-unchecked.bmp                \
897         image/openhand-16.png                   \
898         image/plus-8.png                        \
899         image/rawshark.rc.in                    \
900         image/README.image                      \
901         image/reordercap.rc.in                  \
902         image/rubberband-16.png                 \
903         image/status.qrc                        \
904         image/stock_dialog_error_48.xpm         \
905         image/stock_dialog_info_48.xpm          \
906         image/stock_dialog_question_48.xpm      \
907         image/stock_dialog_stop_48.xpm          \
908         image/stock_dialog_warning_48.xpm       \
909         image/text2pcap.rc.in                   \
910         image/tfshark.rc.in                     \
911         image/toolbar.qrc                       \
912         image/toolbar/analyze_24.xpm            \
913         image/toolbar/audio_player_24.xpm       \
914         image/toolbar/autoscroll_24.xpm         \
915         image/toolbar/capture_airpcap_16.xpm    \
916         image/toolbar/capture_capture_16.xpm    \
917         image/toolbar/capture_details_16.xpm    \
918         image/toolbar/capture_details_24.xpm    \
919         image/toolbar/capture_ethernet_16.xpm   \
920         image/toolbar/capture_filter_24.xpm     \
921         image/toolbar/capture_interfaces_16.png \
922         image/toolbar/capture_interfaces_24.png \
923         image/toolbar/capture_options_16.png    \
924         image/toolbar/capture_options_24.png    \
925         image/toolbar/capture_prepare_16.xpm    \
926         image/toolbar/capture_restart_16.png    \
927         image/toolbar/capture_restart_24.png    \
928         image/toolbar/capture_start_16.png      \
929         image/toolbar/capture_start_24.png      \
930         image/toolbar/capture_stop_16.png       \
931         image/toolbar/capture_stop_24.png       \
932         image/toolbar/checkbox_16.xpm           \
933         image/toolbar/colorize_24.xpm           \
934         image/toolbar/conversations_16.xpm      \
935         image/toolbar/decode_24.xpm             \
936         image/toolbar/decode_as_16.xpm          \
937         image/toolbar/display_filter_24.xpm     \
938         image/toolbar/endpoints_16.xpm          \
939         image/toolbar/expert_info_16.xpm        \
940         image/toolbar/file_set_list_16.xpm      \
941         image/toolbar/file_set_next_16.xpm      \
942         image/toolbar/file_set_previous_16.xpm  \
943         image/toolbar/flow_graph_16.xpm \
944         image/toolbar/gnome_emblem_web_16.png   \
945         image/toolbar/gnome_emblem_web_24.png   \
946         image/toolbar/graphs_16.xpm     \
947         image/toolbar/icon_color_0.xpm  \
948         image/toolbar/icon_color_1.xpm  \
949         image/toolbar/icon_color_2.xpm  \
950         image/toolbar/icon_color_3.xpm  \
951         image/toolbar/icon_color_4.xpm  \
952         image/toolbar/icon_color_5.xpm  \
953         image/toolbar/icon_color_6.xpm  \
954         image/toolbar/icon_color_7.xpm  \
955         image/toolbar/icon_color_8.xpm  \
956         image/toolbar/icon_color_9.xpm  \
957         image/toolbar/internet_24.xpm   \
958         image/toolbar/modem_16.png      \
959         image/toolbar/modem_16.xpm      \
960         image/toolbar/network_bluetooth_16.png  \
961         image/toolbar/network_usb.svg           \
962         image/toolbar/network_usb_16.png        \
963         image/toolbar/network_virtual_16.xpm    \
964         image/toolbar/network_wired_16.png      \
965         image/toolbar/network_wireless_16.png   \
966         image/toolbar/pipe_16.png       \
967         image/toolbar/remote_arrow_16.png       \
968         image/toolbar/remote_globe_16.png       \
969         image/toolbar/remote_sat_16.png \
970         image/toolbar/resize_columns_24.xpm     \
971         image/toolbar/telephone_16.xpm  \
972         image/toolbar/telephony_16.xpm  \
973         image/toolbar/time_24.xpm       \
974         image/toolbar/toolbar_wireshark_file_16.png     \
975         image/toolbar/toolbar_wireshark_file_24.png     \
976         image/toolbar/voip_flow_24.xpm  \
977         image/toolbar/web_support_24.xpm        \
978         image/toolbar/wep_closed_24.xpm \
979         image/tshark.rc.in      \
980         image/voip_select.xpm   \
981         image/wireshark.exe.manifest.in \
982         image/wireshark.ico     \
983         image/wireshark.rc.in   \
984         image/wiresharkdoc.ico  \
985         image/wiresharkinst.ico \
986         image/WiresharkDoc-16.png       \
987         image/WiresharkDoc-24.png       \
988         image/WiresharkDoc-32.png       \
989         image/WiresharkDoc-48.png       \
990         image/WiresharkDoc-64.png       \
991         image/WiresharkDoc-128.png      \
992         image/WiresharkDoc-256.png      \
993         image/wiretap.rc.in     \
994         image/wsicon.svg        \
995         image/wsicon16.png      \
996         image/wsicon24.png      \
997         image/wsicon32.png      \
998         image/wsicon48.png      \
999         image/wsicon64.png      \
1000         image/wsicon128.png     \
1001         image/wsicon256.png     \
1002         image/wsicon512.png     \
1003         image/wsicon1024.png    \
1004         image/wsicon-ask.png    \
1005         image/wsicon-ask.svg    \
1006         image/wsiconcap.svg     \
1007         image/wsiconcap256.png  \
1008         image/wsiconcap512.png  \
1009         image/wsiconcap1024.png \
1010         image/wsiconinst.svg    \
1011         image/wsiconinst256.png \
1012         image/wslogo-dev.svg    \
1013         image/wslogo.eps        \
1014         image/wslogo.svg        \
1015         image/wssplash_dev.png  \
1016         image/wssplash.png      \
1017         ipmap.html              \
1018         macosx-setup.sh         \
1019         macosx-support-lib-patches/glib-gconvert.c.patch \
1020         macosx-support-lib-patches/glib-pkgconfig.patch \
1021         macosx-support-lib-patches/gnutls-pkgconfig.patch \
1022         macosx-support-lib-patches/portaudio-pa_mac_core.h.patch \
1023         macosx-support-lib-patches/portaudio-pa_mac_core.c.patch \
1024         macosx-support-lib-patches/qt-fix-pc-file \
1025         macosx-support-lib-patches/qt-fix-pc-files \
1026         make-version.pl         \
1027         manuf                   \
1028         manuf.tmpl              \
1029         mergecap.c              \
1030         pdml2html.xsl           \
1031         reordercap.c            \
1032         smi_modules             \
1033         text2pcap-scanner.l     \
1034         text2pcap.h             \
1035         services                \
1036         wireshark.desktop       \
1037         wireshark-mime-package.xml \
1038         wireshark.pc.in         \
1039         wka.tmpl                \
1040         CMakeLists.txt          \
1041         cmakeconfig.h.in        \
1042         wsutil/CMakeLists.txt   \
1043         CMakeOptions.txt        \
1044         wiretap/CMakeLists.txt  \
1045         README.cmake            \
1046         ConfigureChecks.cmake   \
1047         cmake/TestFileOffsetBits.c      \
1048         cmake/TestLargeFiles.c.cmakein  \
1049         cmake/TestWindowsFSeek.c        \
1050         cmake/modules/CMakeInstallDirs.cmake    \
1051         cmake/modules/COPYING-CMAKE-SCRIPTS     \
1052         cmake/modules/CheckCCompilerFlag.cmake  \
1053         cmake/modules/CheckCLinkerFlag.cmake    \
1054         cmake/modules/FindADNS.cmake            \
1055         cmake/modules/FindAIRPCAP.cmake         \
1056         cmake/modules/FindASCIIDOC.cmake        \
1057         cmake/modules/FindCAP.cmake             \
1058         cmake/modules/FindCARES.cmake           \
1059         cmake/modules/FindFOP.cmake             \
1060         cmake/modules/FindGCRYPT.cmake          \
1061         cmake/modules/FindGEOIP.cmake           \
1062         cmake/modules/FindChocolatey.cmake      \
1063         cmake/modules/FindDOXYGEN.cmake         \
1064         cmake/modules/FindFreetype.cmake        \
1065         cmake/modules/FindGLIB2.cmake           \
1066         cmake/modules/FindGMODULE2.cmake        \
1067         cmake/modules/FindGNUTLS.cmake          \
1068         cmake/modules/FindGTHREAD2.cmake        \
1069         cmake/modules/FindGTK2.cmake            \
1070         cmake/modules/FindGTK3.cmake            \
1071         cmake/modules/FindHtmlViewer.cmake      \
1072         cmake/modules/FindKERBEROS.cmake        \
1073         cmake/modules/FindNL.cmake              \
1074         cmake/modules/FindLEX.cmake             \
1075         cmake/modules/FindLUA.cmake             \
1076         cmake/modules/FindLYNX.cmake            \
1077         cmake/modules/FindM.cmake               \
1078         cmake/modules/FindOS_X_FRAMEWORKS.cmake \
1079         cmake/modules/FindPCAP.cmake            \
1080         cmake/modules/FindPOD.cmake             \
1081         cmake/modules/FindPORTAUDIO.cmake       \
1082         cmake/modules/FindSBC.cmake             \
1083         cmake/modules/FindSED.cmake             \
1084         cmake/modules/FindSETCAP.cmake          \
1085         cmake/modules/FindSH.cmake              \
1086         cmake/modules/FindSMI.cmake             \
1087         cmake/modules/FindWSWinLibs.cmake       \
1088         cmake/modules/FindXMLLINT.cmake         \
1089         cmake/modules/FindXSLTPROC.cmake        \
1090         cmake/modules/FindYACC.cmake            \
1091         cmake/modules/FindYAPP.cmake            \
1092         cmake/modules/FindZLIB.cmake            \
1093         cmake/modules/LICENSE.txt               \
1094         cmake/modules/UseABICheck.cmake         \
1095         cmake/modules/UseAsn2Wrs.cmake          \
1096         cmake/modules/UseCheckAPI.cmake         \
1097         cmake/modules/UseLemon.cmake            \
1098         cmake/modules/UseMakeDissectorReg.cmake \
1099         cmake/modules/UseMakeTapReg.cmake       \
1100         cmake/modules/UseWinLibs.cmake          \
1101         cmake/modules/gmxTestLargeFiles.cmake   \
1102         cmake/modules/readme.txt                \
1103         ui/win32/Makefile.nmake                 \
1104         ui/win32/console_win32.c                \
1105         ui/win32/console_win32.h                \
1106         ui/win32/file_dlg_win32.c               \
1107         ui/win32/file_dlg_win32.h               \
1108         ui/win32/print_win32.c                  \
1109         ui/win32/print_win32.h                  \
1110         ui/win32/settings.ini                   \
1111         CPackConfig.txt
1112
1113 install-exec-hook:
1114 if HAVE_DUMPCAP_GROUP
1115         chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
1116 endif
1117 if SETCAP_INSTALL
1118         $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
1119         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
1120 else
1121 if SETUID_INSTALL
1122         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
1123         chmod +s $(DESTDIR)$(bindir)/dumpcap
1124 endif
1125 endif
1126
1127
1128 DIST_SUBDIRS = \
1129         asn1            \
1130         capchild        \
1131         caputils        \
1132         codecs          \
1133         doc             \
1134         epan            \
1135         echld           \
1136         ui              \
1137         ui/cli          \
1138         ui/gtk          \
1139         ui/qt           \
1140         help            \
1141         packaging       \
1142         plugins         \
1143         tools           \
1144         wiretap         \
1145         wsutil          \
1146         docbook
1147
1148 SUBDIRS = \
1149         tools                   \
1150         wsutil                  \
1151         wiretap                 \
1152         epan                    \
1153         capchild                \
1154         caputils                \
1155         @echld_dir@             \
1156         @plugins_dir@           \
1157         packaging               \
1158         help                    \
1159         ui                      \
1160         @wireshark_SUBDIRS@     \
1161         ui/cli                  \
1162         .                       \
1163         doc
1164
1165 help/faq.txt: $(srcdir)/help/faq.py
1166         $(AM_V_GEN)(cd help ; \
1167         $(MAKE) faq.txt ;)
1168
1169 libtool: $(LIBTOOL_DEPS)
1170         $(SHELL) ./config.status --recheck
1171
1172
1173 # Used by patch-bzip2
1174 # Trim off any extra version information and find the previous micro release.
1175 BASE_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
1176 PREV_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; if ($$3 > 0) $$3-- ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
1177 PREV_DIR="wireshark-$(PREV_VERSION)"
1178 PREV_FILE="$(PREV_DIR).tar.bz2"
1179 PREV_URL="http://www.wireshark.org/download/src/all-versions/$(PREV_FILE)"
1180
1181 patch-bzip2: distdir
1182         if test x$(BASE_VERSION) != x$(PREV_VERSION) ; then \
1183                 curl -z $(PREV_FILE) -o $(PREV_FILE) $(PREV_URL) && \
1184                 tar -xjf $(PREV_FILE) && \
1185                 diff -urN $(PREV_DIR) $(distdir) | bzip2 > patch-wireshark-$(PREV_VERSION)-to-$(VERSION).bz2 && \
1186                 echo "Created patch-bzip2" ; \
1187                 rm -rf "$(PREV_FILE)" "$(PREV_DIR)" ; \
1188         else \
1189                 echo "This appears to be the first micro version ($(PREV_VERSION)). Skipping." ; \
1190         fi
1191         $(am__remove_distdir)
1192
1193 # Install some desktop files (for use with GNOME, KDE, or any other freedesktop.org-compliant desktops)
1194 # No, these do not go into $(datarootdir): the desktop won't look for them there.
1195 # Yes, that violate's autofoo's principle of relocatability.
1196 # What we (probably) should do is check `pkg-config --variable=prefix gtk+-2.0` to know where
1197 # to install this stuff...
1198 #
1199 # Do not use the -T flag to the install command, as it's not portable.
1200 # Some versions of install don't support a -T flag at all, and the
1201 # FreeBSD install command has a -T flag that takes an argument and
1202 # that has completely different semantics.
1203 install_desktop_files:
1204         mkdir -p $(DESTDIR)/usr/share/{mime/packages,applications}
1205         install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)/usr/share/mime/packages/wireshark.xml
1206         if test x$(DESKTOP_FILE_INSTALL) != x ; then \
1207                 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)/usr/share/applications $(srcdir)/wireshark.desktop; \
1208         else \
1209                 install -m 644 $(srcdir)/wireshark.desktop $(DESTDIR)/usr/share/applications/wireshark.desktop; \
1210         fi
1211         for size in 16 24 32 48 64 128 256; \
1212         do \
1213                 mkdir -p $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/{apps,mimetypes} ; \
1214                 install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1215                 install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1216         done
1217         mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
1218         install -m 644 image/wsicon.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/wireshark.svg
1219         @echo "Don't forget to run \"update-desktop-database\" and \"update-mime-database /usr/share/mime\""
1220
1221 # Used by svr4-package and osx-package
1222 # We load top_stagedir with an absolute path so that libtool doesn't freak.
1223 top_stagedir=$(abs_top_builddir)/packaging/staging
1224 stagedir=$(top_stagedir)/$(PACKAGE).inst
1225
1226 host_cpu=@host_cpu@
1227 host_os=@host_os@
1228
1229 solaris-package: svr4-package
1230
1231 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1232         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1233                 rm -rf $(stagedir) ; \
1234                 $(MAKE) DESTDIR=$(stagedir) install; \
1235                 $(srcdir)/packaging/svr4/mkpkg \
1236                         $(PACKAGE) \
1237                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1238                         $(prefix) \
1239                         $(top_stagedir) ; \
1240         else \
1241                 echo "Error: SVR4 packaging tools not found." ; \
1242                 echo "Package build abandoned." ; \
1243         fi
1244
1245
1246 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1247 rpm-package: dist
1248         @if test x$(HAVE_RPM) = xyes ; then \
1249                 cd $(rpm_topdir) ; \
1250                 mkdir -p BUILD RPMS SOURCES SRPMS; \
1251                 cd SOURCES ; \
1252                 ln -sf ../../../$(distdir).tar.bz2 ; \
1253                 cd .. ; \
1254                 rpmbuild --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1255                         @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1256                         echo "Package successfully built in `pwd`/RPMS." && \
1257                         rm -f SOURCES/$(distdir).tar.bz2 $(distdir).tar.bz2 ; \
1258         else \
1259                 echo "Error: RPM executable and/or source directory not found." ; \
1260                 false; \
1261         fi
1262
1263 # XXX - This assumes we're building from the source directory.
1264 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1265         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1266                 rm -rf $(stagedir) ; \
1267                 $(MAKE) DESTDIR=$(stagedir) install; \
1268                 cd $(srcdir)/packaging/macosx ;  \
1269                 ./osx-app.sh @OSX_APP_FLAGS@ -bp ../staging/$(PACKAGE).inst$(bindir) ; \
1270         else \
1271                 echo "Error: OS X packaging tools not found." ; \
1272                 echo "Package build abandoned." ; \
1273         fi
1274
1275 packaging/macosx/COPYING.txt: COPYING
1276         (cd packaging/macosx ; \
1277         $(MAKE) COPYING.txt ;)
1278
1279 osx-package: osx-app packaging/macosx/COPYING.txt
1280         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1281                 cd $(srcdir)/packaging/macosx ;  \
1282                 chmod +x ./osx-dmg.sh ; \
1283                 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1284         fi
1285
1286 osx-install: osx-app
1287         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1288                 echo "Copying Wireshark.app to /Applications" ; \
1289                 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ;  \
1290         fi
1291
1292 clean-local:
1293         rm -rf $(top_stagedir)
1294
1295 dumpabi:
1296         $(MAKE) -C wiretap dumpabi-libwiretap
1297         $(MAKE) -C epan dumpabi-libwireshark
1298         $(MAKE) -C wsutil dumpabi-libwsutil
1299
1300 checkapi_local:
1301         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
1302         -sourcedir=$(srcdir) \
1303         $(TSHARK_TAP_SRC) \
1304         $(wireshark_SOURCES)
1305 #       $(EXTRA_wireshark_SOURCES)
1306
1307 checkapi: checkapi_local
1308         cd wiretap && $(MAKE) checkapi
1309         cd codecs && $(MAKE) checkapi
1310         cd capchild && $(MAKE) checkapi
1311         cd caputils && $(MAKE) checkapi
1312         cd ui && $(MAKE) checkapi
1313         cd ui/gtk && $(MAKE) checkapi
1314 ##      cd epan && $(MAKE) checkapi
1315 ##      cd epan/crypt && $(MAKE) checkapi
1316         cd epan/dfilter && $(MAKE) checkapi
1317 ##      cd epan/ftypes && $(MAKE) checkapi
1318 ##      cd epan/wslua && $(MAKE) checkapi
1319         cd epan/dissectors && $(MAKE) checkapi
1320         cd plugins && $(MAKE) checkapi
1321         cd wsutil && $(MAKE) checkapi
1322
1323 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1324 if HAVE_DOXYGEN
1325         rm -rf wsar_html
1326         cd epan && $(MAKE) $@
1327         cd capchild && $(MAKE) $@
1328         cd caputils && $(MAKE) $@
1329         cd ui && $(MAKE) $@
1330         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1331 endif
1332
1333 wsar-zip: wsar_html
1334 if HAVE_DOXYGEN
1335         rm -f wsar_html.zip
1336         zip -rq wsar_html.zip wsar_html
1337 endif
1338
1339 # Verify that our source distribution has enough files to do a cmake build.
1340 # Note that this means anyone doing a distcheck has to have cmake installed.
1341 distcheck-hook:
1342         cd $(distdir) && \
1343         chmod 755 . && \
1344         mkdir _cmake_build && \
1345         cd _cmake_build && \
1346         cmake .. && \
1347         $(MAKE) && \
1348         cd .. && \
1349         rm -rf _cmake_build