[Diameter] Add a couple of command codes from IANA.
[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 include ./Makefile.am.inc
23
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
28
29 # Common headers
30 COMMONCPPFLAGS =
31
32 AM_CPPFLAGS = $(INCLUDEDIRS) $(WS_CPPFLAGS) $(COMMONCPPFLAGS)
33
34 bin_PROGRAMS = \
35         @wireshark_bin@         \
36         @tshark_bin@            \
37         @tfshark_bin@           \
38         @text2pcap_bin@         \
39         @mergecap_bin@          \
40         @capinfos_bin@          \
41         @captype_bin@           \
42         @editcap_bin@           \
43         @randpkt_bin@           \
44         @dftest_bin@            \
45         @dumpcap_bin@           \
46         @reordercap_bin@        \
47         @rawshark_bin@          \
48         @sharkd_bin@
49
50 EXTRA_PROGRAMS = wireshark-gtk wireshark tshark tfshark capinfos captype \
51         editcap mergecap dftest randpkt text2pcap dumpcap reordercap \
52         rawshark sharkd
53
54 #
55 # Wireshark configuration files are put in $(pkgdatadir).
56 #
57 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
58         smi_modules ipmap.html pdml2html.xsl enterprises.tsv
59
60 pkgconfigdir = $(libdir)/pkgconfig
61 pkgconfig_DATA = wireshark.pc
62
63 #
64 # Install global profiles in the "profiles" subdirectory
65 #
66 profilesdir = $(pkgdatadir)
67 nobase_dist_profiles_DATA = \
68         profiles/Bluetooth/colorfilters \
69         profiles/Classic/colorfilters
70
71 #
72 # Install the Diameter DTD and XML files in the "diameter" subdirectory
73 # of that directory.
74 #
75 diameterdir = $(pkgdatadir)/diameter
76 include diameter/Custom.make
77 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
78         diameter/chargecontrol.xml \
79         diameter/Cisco.xml \
80         diameter/CiscoSystems.xml \
81         diameter/Custom.xml \
82         diameter/dictionary.dtd \
83         diameter/dictionary.xml \
84         diameter/eap.xml \
85         diameter/Ericsson.xml \
86         diameter/etsie2e4.xml \
87         diameter/Inovar.xml \
88         diameter/Juniper.xml \
89         diameter/mobileipv4.xml \
90         diameter/mobileipv6.xml \
91         diameter/nasreq.xml \
92         diameter/sip.xml \
93         diameter/Starent.xml \
94         diameter/sunping.xml \
95         diameter/TGPP.xml \
96         diameter/TGPP2.xml \
97         diameter/Vodafone.xml \
98         diameter/AlcatelLucent.xml \
99         diameter/Nokia.xml \
100         diameter/NokiaSolutionsAndNetworks.xml \
101         diameter/HP.xml \
102         diameter/Oracle.xml
103
104 #
105 # Install the DTDs directory files in the "dtds" subdirectory
106 # of that directory
107 #
108 dtdsdir = $(pkgdatadir)/dtds
109 dist_dtds_DATA = \
110         dtds/dc.dtd \
111         dtds/itunes.dtd \
112         dtds/mscml.dtd \
113         dtds/pocsettings.dtd \
114         dtds/presence.dtd \
115         dtds/reginfo.dtd \
116         dtds/rlmi.dtd \
117         dtds/rss.dtd \
118         dtds/smil.dtd \
119         dtds/xcap-caps.dtd \
120         dtds/xcap-error.dtd \
121         dtds/watcherinfo.dtd
122
123 #
124 # Install the RADIUS directory files in the "radius" subdirectory
125 # of that directory.
126 #
127 radiusdir = $(pkgdatadir)/radius
128 include radius/Custom.make
129 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
130         radius/README.radius_dictionary \
131         radius/custom.includes \
132         radius/dictionary \
133         radius/dictionary.3com \
134         radius/dictionary.3gpp \
135         radius/dictionary.3gpp2 \
136         radius/dictionary.acc \
137         radius/dictionary.acme \
138         radius/dictionary.actelis \
139         radius/dictionary.aerohive \
140         radius/dictionary.airespace \
141         radius/dictionary.alcatel \
142         radius/dictionary.alcatel-lucent.aaa \
143         radius/dictionary.alcatel.esam \
144         radius/dictionary.alcatel.sr \
145         radius/dictionary.alteon \
146         radius/dictionary.altiga \
147         radius/dictionary.alvarion \
148         radius/dictionary.alvarion.wimax.v2_2 \
149         radius/dictionary.apc \
150         radius/dictionary.aptis \
151         radius/dictionary.arbor \
152         radius/dictionary.aruba \
153         radius/dictionary.ascend \
154         radius/dictionary.asn \
155         radius/dictionary.audiocodes \
156         radius/dictionary.avaya \
157         radius/dictionary.azaire \
158         radius/dictionary.bay \
159         radius/dictionary.bintec \
160         radius/dictionary.bluecoat \
161         radius/dictionary.bristol \
162         radius/dictionary.broadsoft \
163         radius/dictionary.brocade \
164         radius/dictionary.bskyb \
165         radius/dictionary.bt \
166         radius/dictionary.cablelabs \
167         radius/dictionary.cabletron \
168         radius/dictionary.camiant \
169         radius/dictionary.chillispot \
170         radius/dictionary.cisco \
171         radius/dictionary.cisco.asa \
172         radius/dictionary.cisco.bbsm \
173         radius/dictionary.cisco.vpn3000 \
174         radius/dictionary.cisco.vpn5000 \
175         radius/dictionary.citrix \
176         radius/dictionary.clavister \
177         radius/dictionary.cnergee \
178         radius/dictionary.colubris \
179         radius/dictionary.columbia_university \
180         radius/dictionary.compat \
181         radius/dictionary.compatible \
182         radius/dictionary.cosine \
183         radius/dictionary.dante \
184         radius/dictionary.dellemc \
185         radius/dictionary.dhcp \
186         radius/dictionary.digium \
187         radius/dictionary.dlink \
188         radius/dictionary.dragonwave \
189         radius/dictionary.efficientip \
190         radius/dictionary.eltex \
191         radius/dictionary.epygi \
192         radius/dictionary.equallogic \
193         radius/dictionary.ericsson \
194         radius/dictionary.ericsson.ab \
195         radius/dictionary.ericsson.packet.core.networks \
196         radius/dictionary.extreme \
197         radius/dictionary.f5 \
198         radius/dictionary.fdxtended \
199         radius/dictionary.fortinet \
200         radius/dictionary.foundry \
201         radius/dictionary.freedhcp \
202         radius/dictionary.freeradius \
203         radius/dictionary.freeradius.internal \
204         radius/dictionary.freeswitch \
205         radius/dictionary.gandalf \
206         radius/dictionary.garderos \
207         radius/dictionary.gemtek \
208         radius/dictionary.h3c \
209         radius/dictionary.hp \
210         radius/dictionary.huawei \
211         radius/dictionary.iana \
212         radius/dictionary.iea \
213         radius/dictionary.infoblox \
214         radius/dictionary.infonet \
215         radius/dictionary.ipunplugged \
216         radius/dictionary.issanni \
217         radius/dictionary.itk \
218         radius/dictionary.jradius \
219         radius/dictionary.juniper \
220         radius/dictionary.karlnet \
221         radius/dictionary.kineto \
222         radius/dictionary.lancom \
223         radius/dictionary.livingston \
224         radius/dictionary.localweb \
225         radius/dictionary.lucent \
226         radius/dictionary.manzara \
227         radius/dictionary.meinberg \
228         radius/dictionary.merit \
229         radius/dictionary.meru \
230         radius/dictionary.microsemi \
231         radius/dictionary.microsoft \
232         radius/dictionary.mikrotik \
233         radius/dictionary.motorola \
234         radius/dictionary.motorola.wimax \
235         radius/dictionary.navini \
236         radius/dictionary.netscreen \
237         radius/dictionary.networkphysics \
238         radius/dictionary.nexans \
239         radius/dictionary.nokia \
240         radius/dictionary.nokia.conflict \
241         radius/dictionary.nomadix \
242         radius/dictionary.nortel \
243         radius/dictionary.ntua \
244         radius/dictionary.openser \
245         radius/dictionary.packeteer \
246         radius/dictionary.paloalto \
247         radius/dictionary.patton \
248         radius/dictionary.perle \
249         radius/dictionary.propel \
250         radius/dictionary.prosoft \
251         radius/dictionary.proxim \
252         radius/dictionary.purewave \
253         radius/dictionary.quiconnect \
254         radius/dictionary.quintum \
255         radius/dictionary.redcreek \
256         radius/dictionary.rfc2865 \
257         radius/dictionary.rfc2866 \
258         radius/dictionary.rfc2867 \
259         radius/dictionary.rfc2868 \
260         radius/dictionary.rfc2869 \
261         radius/dictionary.rfc3162 \
262         radius/dictionary.rfc3576 \
263         radius/dictionary.rfc3580 \
264         radius/dictionary.rfc4072 \
265         radius/dictionary.rfc4372 \
266         radius/dictionary.rfc4603 \
267         radius/dictionary.rfc4675 \
268         radius/dictionary.rfc4679 \
269         radius/dictionary.rfc4818 \
270         radius/dictionary.rfc4849 \
271         radius/dictionary.rfc5090 \
272         radius/dictionary.rfc5176 \
273         radius/dictionary.rfc5447 \
274         radius/dictionary.rfc5580 \
275         radius/dictionary.rfc5607 \
276         radius/dictionary.rfc5904 \
277         radius/dictionary.rfc6519 \
278         radius/dictionary.rfc6572 \
279         radius/dictionary.rfc6677 \
280         radius/dictionary.rfc6911 \
281         radius/dictionary.rfc6929 \
282         radius/dictionary.rfc6930 \
283         radius/dictionary.rfc7055 \
284         radius/dictionary.rfc7155 \
285         radius/dictionary.rfc7268 \
286         radius/dictionary.rfc7499 \
287         radius/dictionary.rfc7930 \
288         radius/dictionary.riverbed \
289         radius/dictionary.riverstone \
290         radius/dictionary.roaringpenguin \
291         radius/dictionary.ruckus \
292         radius/dictionary.ruggedcom \
293         radius/dictionary.sangoma \
294         radius/dictionary.sg \
295         radius/dictionary.shasta \
296         radius/dictionary.shiva \
297         radius/dictionary.siemens \
298         radius/dictionary.slipstream \
299         radius/dictionary.sofaware \
300         radius/dictionary.sonicwall \
301         radius/dictionary.springtide \
302         radius/dictionary.starent \
303         radius/dictionary.starent.vsa1 \
304         radius/dictionary.surfnet \
305         radius/dictionary.symbol \
306         radius/dictionary.t_systems_nova \
307         radius/dictionary.telebit \
308         radius/dictionary.telkom \
309         radius/dictionary.terena \
310         radius/dictionary.trapeze \
311         radius/dictionary.travelping \
312         radius/dictionary.tropos \
313         radius/dictionary.ukerna \
314         radius/dictionary.unisphere \
315         radius/dictionary.unix \
316         radius/dictionary.usr \
317         radius/dictionary.utstarcom \
318         radius/dictionary.valemount \
319         radius/dictionary.versanet \
320         radius/dictionary.vqp \
321         radius/dictionary.walabi \
322         radius/dictionary.waverider \
323         radius/dictionary.wichorus \
324         radius/dictionary.wimax \
325         radius/dictionary.wimax.alvarion \
326         radius/dictionary.wimax.wichorus \
327         radius/dictionary.wispr \
328         radius/dictionary.xedia \
329         radius/dictionary.xylan \
330         radius/dictionary.yubico \
331         radius/dictionary.zeus \
332         radius/dictionary.zte \
333         radius/dictionary.zyxel
334
335 #
336 # Install the tpncp directory files in the "tpncp" subdirectory
337 # of that directory
338 #
339 tpncpdir = $(pkgdatadir)/tpncp
340 dist_tpncp_DATA = \
341         tpncp/tpncp.dat
342
343 #
344 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
345 # of that directory
346 #
347 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
348 dist_wimaxasncp_DATA = \
349         wimaxasncp/dictionary.xml \
350         wimaxasncp/dictionary.dtd
351
352 if HAVE_PLUGINS
353 -include plugins/Custom.make
354 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
355         -dlopen plugins/docsis/docsis.la \
356         -dlopen plugins/ethercat/ethercat.la \
357         -dlopen plugins/gryphon/gryphon.la \
358         -dlopen plugins/irda/irda.la \
359         -dlopen plugins/m2m/m2m.la \
360         -dlopen plugins/mate/mate.la \
361         -dlopen plugins/opcua/opcua.la \
362         -dlopen plugins/profinet/profinet.la \
363         -dlopen plugins/stats_tree/stats_tree.la \
364         -dlopen plugins/unistim/unistim.la \
365         -dlopen plugins/wimax/wimax.la \
366         -dlopen plugins/wimaxmacphy/wimaxmacphy.la
367
368 else            # HAVE_PLUGINS
369
370 plugin_ldadd =
371
372 endif           # HAVE_PLUGINS
373
374 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
375 BUILT_HEADER_FILES = \
376         version.h
377
378 BUILT_C_FILES =
379
380 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
381
382 # Header files generated from source files.
383 GENERATED_HEADER_FILES = \
384         text2pcap-scanner_lex.h \
385         $(BUILT_HEADER_FILES)
386
387 # C source files generated from source files.
388 GENERATED_C_FILES =
389
390 # All the generated files.
391 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
392
393 EXTCAP_COMMON_SRC = \
394         extcap.c                \
395         extcap_parser.c \
396         extcap_spawn.c
397
398 EXTCAP_COMMON_INCLUDES = \
399         extcap.h                \
400         extcap_parser.h \
401         extcap_spawn.h
402
403 # sources common for wireshark, tshark, and rawshark
404 SHARK_COMMON_SRC = \
405         cfile.c                 \
406         frame_tvbuff.c          \
407         sync_pipe_write.c
408
409 # corresponding headers
410 SHARK_COMMON_INCLUDES = \
411         cfile.h                 \
412         file.h                  \
413         fileset.h               \
414         frame_tvbuff.h          \
415         register.h              \
416         ws_symbol_export.h
417
418 # wireshark specifics
419 WIRESHARK_COMMON_SRC = \
420         $(SHARK_COMMON_SRC)     \
421         capture_info.c          \
422         capture_opts.c          \
423         file.c                  \
424         fileset.c               \
425         summary.c               \
426         ws_version_info.c
427
428 # corresponding headers
429 WIRESHARK_COMMON_INCLUDES = \
430         capture_info.h          \
431         capture_opts.h          \
432         globals.h               \
433         log.h                   \
434         summary.h               \
435         sync_pipe.h
436
437 if HAVE_EXTCAP
438 SHARK_COMMON_SRC += $(EXTCAP_COMMON_SRC)
439 endif
440
441 if ENABLE_STATIC
442 EXTRALINKFLAGS = -Wl,-static -all-static
443 else
444 EXTRALINKFLAGS = -export-dynamic
445 endif
446
447 EPAN_EXTRA_LIBS = \
448         @SSL_LIBS@                      \
449         @C_ARES_LIBS@                   \
450         @KRB5_LIBS@                     \
451         @LIBGCRYPT_LIBS@                \
452         @LIBGNUTLS_LIBS@                \
453         @LIBSMI_LDFLAGS@
454
455 # Libraries and plugin flags with which to link wireshark.
456 #
457 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
458 # (see configure.ac for pkg-config modules used).
459 #
460 wireshark_common_ldadd = \
461         capchild/libcapchild.a          \
462         caputils/libcaputils.a          \
463         ui/libui.a                      \
464         ui/libui_dirty.a                \
465         codecs/libwscodecs.la           \
466         wiretap/libwiretap.la           \
467         epan/libwireshark.la            \
468         wsutil/libwsutil.la             \
469         $(plugin_ldadd)                 \
470         @PCAP_LIBS@                     \
471         @APPLICATIONSERVICES_FRAMEWORKS@        \
472         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
473         @COREFOUNDATION_FRAMEWORKS@     \
474         $(EPAN_EXTRA_LIBS)                      \
475         @LIBNL_LIBS@
476
477 if HAVE_Qt
478 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
479
480 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
481
482 wireshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS) $(Qt_LDFLAGS)
483
484 wireshark_LDADD = \
485         ui/qt/libqtui.a                 \
486         $(wireshark_common_ldadd)       \
487         $(GLIB_LIBS)                    \
488         $(Qt_LIBS)
489
490 if HAVE_SPEEXDSP
491 wireshark_LDADD += $(SPEEXDSP_LIBS)
492 endif
493 endif   # HAVE_Qt
494
495 if HAVE_GTK
496 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
497
498 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
499
500 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
501
502 wireshark_gtk_LDADD = \
503         ui/gtk/libgtkui.a               \
504         $(wireshark_common_ldadd)       \
505         $(GTK_LIBS)                     \
506         @PORTAUDIO_LIBS@
507 endif
508
509 tshark_SOURCES = \
510         $(SHARK_COMMON_SRC)     \
511         capture_opts.c          \
512         tshark.c                \
513         ws_version_info.c
514
515 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
516
517 tshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
518
519 # Libraries and plugin flags with which to link tshark.
520 tshark_LDADD = \
521         capchild/libcapchild.a          \
522         caputils/libcaputils.a          \
523         ui/cli/libcliui.a               \
524         ui/libui.a                      \
525         wiretap/libwiretap.la           \
526         epan/libwireshark.la            \
527         wsutil/libwsutil.la             \
528         $(plugin_ldadd)                 \
529         @GLIB_LIBS@                     \
530         @PCAP_LIBS@                     \
531         ${EPAN_EXTRA_LIBS}      \
532         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
533         @COREFOUNDATION_FRAMEWORKS@
534
535 tfshark_SOURCES = \
536         $(SHARK_COMMON_SRC)     \
537         tfshark.c               \
538         ws_version_info.c
539
540 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
541
542 tfshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
543
544 # Libraries and plugin flags with which to link tfshark.
545 tfshark_LDADD = \
546         ui/cli/libcliui.a               \
547         ui/libui.a                      \
548         wiretap/libwiretap.la           \
549         epan/libwireshark.la            \
550         wsutil/libwsutil.la             \
551         $(plugin_ldadd)                 \
552         @GLIB_LIBS@                     \
553         @PCAP_LIBS@                     \
554         ${EPAN_EXTRA_LIBS}      \
555         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
556         @COREFOUNDATION_FRAMEWORKS@
557
558 rawshark_SOURCES = \
559         $(SHARK_COMMON_SRC)     \
560         rawshark.c              \
561         ws_version_info.c
562
563 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
564
565 rawshark_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
566
567 # Libraries and plugin flags with which to link rawshark.
568 rawshark_LDADD = \
569         caputils/libcaputils.a          \
570         ui/libui.a                      \
571         wiretap/libwiretap.la           \
572         epan/libwireshark.la            \
573         wsutil/libwsutil.la             \
574         $(plugin_ldadd)                 \
575         @GLIB_LIBS@                     \
576         @PCAP_LIBS@                     \
577         ${EPAN_EXTRA_LIBS}      \
578         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
579         @COREFOUNDATION_FRAMEWORKS@
580
581 sharkd_SOURCES = \
582         $(SHARK_COMMON_SRC)     \
583         sharkd.c                \
584         sharkd.h                \
585         sharkd_daemon.c         \
586         sharkd_session.c        \
587         ws_version_info.c
588
589 sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
590
591 if HAVE_SPEEXDSP
592 sharkd_CPPFLAGS += $(SPEEXDSP_CFLAGS)
593 endif
594
595 sharkd_LDFLAGS = $(AM_LDFLAGS) $(EXTRALINKFLAGS)
596
597 # Libraries and plugin flags with which to link sharkd.
598 sharkd_LDADD = \
599         ui/cli/libcliui.a               \
600         ui/libui.a                      \
601         codecs/libwscodecs.la           \
602         wiretap/libwiretap.la           \
603         epan/libwireshark.la            \
604         wsutil/libwsutil.la             \
605         $(plugin_ldadd)                 \
606         @GLIB_LIBS@                     \
607         @PCAP_LIBS@                     \
608         ${EPAN_EXTRA_LIBS}      \
609         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
610         @COREFOUNDATION_FRAMEWORKS@
611
612 if HAVE_SPEEXDSP
613 sharkd_LDADD += $(SPEEXDSP_LIBS)
614 endif
615
616 text2pcap_SOURCES = \
617         text2pcap.c             \
618         text2pcap-scanner.l     \
619         ws_version_info.c
620
621 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
622
623 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
624 # which is generated (and therefore not always clean).
625 # We could generate text2pcap.o as a library with -Werror but for now it
626 # doesn't seem worth the effort.
627 text2pcap_CFLAGS = $(GENERATED_CFLAGS)
628
629 # Libraries with which to link text2pcap.
630 text2pcap_LDADD = \
631         writecap/libwritecap.a          \
632         wsutil/libwsutil.la             \
633         @GLIB_LIBS@
634
635 mergecap_SOURCES = \
636         mergecap.c      \
637         ws_version_info.c
638
639 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
640
641 # Libraries with which to link mergecap.
642 mergecap_LDADD = \
643         ui/libui.a                      \
644         wiretap/libwiretap.la           \
645         wsutil/libwsutil.la             \
646         @GLIB_LIBS@
647
648 capinfos_SOURCES = \
649         capinfos.c      \
650         ws_version_info.c
651
652 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
653
654 # Libraries with which to link capinfos.
655 capinfos_LDADD = \
656         ui/libui.a                      \
657         wiretap/libwiretap.la           \
658         wsutil/libwsutil.la             \
659         @GLIB_LIBS@                     \
660         @LIBGCRYPT_LIBS@
661
662 captype_SOURCES = \
663         captype.c       \
664         ws_version_info.c
665
666 captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
667
668 # Libraries with which to link captype.
669 captype_LDADD = \
670         ui/libui.a                      \
671         wiretap/libwiretap.la           \
672         wsutil/libwsutil.la             \
673         @GLIB_LIBS@
674
675 editcap_SOURCES = \
676         editcap.c       \
677         ws_version_info.c
678
679 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
680
681 # Libraries with which to link editcap.
682 editcap_LDADD = \
683         ui/libui.a                      \
684         wiretap/libwiretap.la           \
685         wsutil/libwsutil.la             \
686         @GLIB_LIBS@                     \
687         @LIBGCRYPT_LIBS@
688
689 reordercap_SOURCES = \
690         reordercap.c    \
691         ws_version_info.c
692
693 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
694
695 # Libraries with which to link reordercap.
696 reordercap_LDADD = \
697         ui/libui.a                      \
698         wiretap/libwiretap.la           \
699         wsutil/libwsutil.la             \
700         @GLIB_LIBS@
701
702 randpkt_SOURCES = \
703         randpkt.c       \
704         ws_version_info.c
705
706 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
707
708 # Libraries with which to link randpkt.
709 randpkt_LDADD = \
710         randpkt_core/librandpkt_core.a  \
711         ui/libui.a                      \
712         wiretap/libwiretap.la           \
713         wsutil/libwsutil.la             \
714         @GLIB_LIBS@                     \
715         @PCAP_LIBS@                     \
716         @C_ARES_LIBS@
717
718 dftest_SOURCES = \
719         dftest.c
720
721 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
722
723 # Libraries and plugin flags with which to link dftest.
724 dftest_LDADD = \
725         ui/libui.a                      \
726         wiretap/libwiretap.la           \
727         wsutil/libwsutil.la             \
728         epan/libwireshark.la            \
729         $(plugin_ldadd)                 \
730         @GLIB_LIBS@                     \
731         @PCAP_LIBS@                     \
732         ${EPAN_EXTRA_LIBS}
733
734 dumpcap_SOURCES = \
735         capture_opts.c                  \
736         capture_stop_conditions.c       \
737         conditions.c                    \
738         dumpcap.c                       \
739         ringbuffer.c                    \
740         sync_pipe_write.c               \
741         ws_version_info.c
742
743 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
744
745 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
746
747 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
748
749 # Libraries with which to link dumpcap.
750 dumpcap_LDADD = \
751         caputils/libcaputils.a          \
752         ui/libui.a                      \
753         writecap/libwritecap.a          \
754         wsutil/libwsutil.la             \
755         @GLIB_LIBS@                     \
756         @PCAP_LIBS@                     \
757         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
758         @COREFOUNDATION_FRAMEWORKS@     \
759         @LIBCAP_LIBS@                   \
760         @LIBNL_LIBS@
761
762 # this target needed for distribution only
763 noinst_HEADERS = \
764         $(SHARK_COMMON_INCLUDES)        \
765         $(EXTCAP_COMMON_INCLUDES)       \
766         $(WIRESHARK_COMMON_INCLUDES)    \
767         capture_stop_conditions.h       \
768         conditions.h                    \
769         ringbuffer.h                    \
770         ws_diag_control.h               \
771         ws_version_info.h
772
773 #
774 # Build the version string
775 #
776 # FORCE is the portable version of .PHONY
777 FORCE:
778
779 version.h: FORCE
780         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
781
782 #
783 # Build shell scripts by doing variable substitution.
784 # Taken from autoconf 2.13.
785 #
786 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
787
788 SUFFIXES = .sh
789 .sh:
790         rm -f $@ $@.tmp
791         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
792
793 services:
794         $(PYTHON) $(srcdir)/tools/make-services.py
795
796 CLEANFILES = \
797         *~              \
798         doxygen-core.tag        \
799         vgcore.*
800
801 #
802 # We have to remove version.h with "make distclean", as, otherwise,
803 # "make distcheck" fails.  We still need to make the tarballs work
804 # even if you do "make distclean" and try to rebuild; that's a work in
805 # progress.
806 #
807 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
808 # list of files removed by "make distclean"?  (It's deliberately
809 # included in that list.)
810 #
811 DISTCLEANFILES = \
812         ps.c                    \
813         version.h
814
815 MAINTAINERCLEANFILES = \
816         $(GENERATED_FILES)      \
817         Makefile.in             \
818         aclocal.m4              \
819         compile                 \
820         config.h.in             \
821         configure               \
822         depcomp                 \
823         install-sh              \
824         ltmain.sh               \
825         missing                 \
826         ylwrap
827
828 EXTRA_DIST = \
829         .editorconfig           \
830         .mailmap                \
831         INSTALL.configure       \
832         Makefile.am.inc         \
833         README.aix              \
834         README.bsd              \
835         README.DECT             \
836         README.hpux             \
837         README.linux            \
838         README.macos            \
839         README.vmware           \
840         README.windows          \
841         abi-descriptor.template \
842         autogen.sh              \
843         cfilters                \
844         colorfilters            \
845         debian                  \
846         dfilters                \
847         doxygen_global.cfg      \
848         doxygen.cfg.in          \
849         enterprises.tsv         \
850         fix                     \
851         idl                     \
852         image                   \
853         ipmap.html              \
854         m4                      \
855         macosx-setup.sh         \
856         macosx-support-lib-patches      \
857         make-version.pl         \
858         manuf                   \
859         manuf.tmpl              \
860         pdml2html.xsl           \
861         smi_modules             \
862         text2pcap-scanner.l     \
863         text2pcap.h             \
864         services                \
865         wireshark.desktop       \
866         wireshark-gtk.desktop   \
867         wireshark-mime-package.xml      \
868         wireshark.appdata.xml   \
869         wireshark.pc.in         \
870         wka.tmpl                \
871         CMakeLists.txt          \
872         CMakeListsCustom.txt.example    \
873         cmakeconfig.h.in        \
874         CMakeOptions.txt        \
875         README.cmake            \
876         ConfigureChecks.cmake   \
877         cmake                   \
878         CPackConfig.txt
879
880 install-exec-hook:
881 if HAVE_DUMPCAP_GROUP
882         chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
883 endif
884 if SETCAP_INSTALL
885         $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
886         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
887 else
888 if SETUID_INSTALL
889         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
890         chmod +s $(DESTDIR)$(bindir)/dumpcap
891 endif
892 endif
893
894
895 DIST_SUBDIRS = \
896         capchild        \
897         caputils        \
898         codecs          \
899         doc             \
900         epan            \
901         ui              \
902         ui/cli          \
903         ui/gtk          \
904         ui/qt           \
905         help            \
906         packaging       \
907         plugins         \
908         randpkt_core    \
909         tools           \
910         wiretap         \
911         writecap        \
912         wsutil          \
913         extcap          \
914         docbook
915
916 SUBDIRS = \
917         tools                   \
918         wsutil                  \
919         writecap                \
920         wiretap                 \
921         epan                    \
922         capchild                \
923         caputils                \
924         @plugins_dir@           \
925         packaging               \
926         help                    \
927         ui                      \
928         codecs                  \
929         @wireshark_SUBDIRS@     \
930         ui/cli                  \
931         randpkt_core            \
932         @extcap_subdir@         \
933         .                       \
934         doc
935
936 help/faq.txt: $(srcdir)/help/faq.py
937         $(AM_V_GEN)(cd help ; \
938         $(MAKE) faq.txt ;)
939
940 libtool: $(LIBTOOL_DEPS)
941         $(SHELL) ./config.status --recheck
942
943
944 #
945 # Install icons and other desktop files for (for use with GNOME, KDE, or
946 # any other freedesktop.org-compliant desktops).
947 #
948 # We use $(datadir).  If the desktop doesn't look for them there,
949 # the desktop is broken; the latest XDG Base Directory Specification
950 # at
951 #
952 #    http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
953 #
954 # says
955 #
956 # $XDG_DATA_DIRS defines the preference-ordered set of base directories
957 # to search for data files in addition to the $XDG_DATA_HOME base
958 # directory. The directories in $XDG_DATA_DIRS should be seperated with a
959 # colon ':'.
960 #
961 # If $XDG_DATA_DIRS is either not set or empty, a value equal to
962 # /usr/local/share/:/usr/share/ should be used.
963 #
964 # so:
965 #
966 #    if this is configured to install under /usr, that should Just Work,
967 #    unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
968 #    compliant with the latest version of the spec;
969 #
970 #    if this installs under the default /usr/share, that should Just Work,
971 #    unless XDG_DATA_DIRS is set incorrectly or the desktop isn't
972 #    compliant with the latest version of the spec;
973 #
974 #    if this is configured to install somewhere else, whoever configured
975 #    it should also have made sure that XDG_DATA_DIRS was set correctly
976 #    and, if that doesn't work, the desktop isn't compliant with the
977 #    latest version of the spec.
978 #
979 # We install these as part of the standard installation process, just
980 # as, for example, Inkscape does with its icons.  See bug 10737.
981 #
982 # Do not use the -T flag to the install command, as it's not portable.
983 # Some versions of install don't support a -T flag at all, and the
984 # FreeBSD install command has a -T flag that takes an argument and
985 # that has completely different semantics.
986 #
987 # We neither need nor want any of this on macOS, nor do we want it if
988 # we're not building Wireshark (that being the only desktop app).
989 #
990 install-data-local:
991 if BUILDING_WIRESHARK
992 if NOT_MACOS
993         mkdir -p $(DESTDIR)$(datadir)/mime/packages
994         install -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
995         mkdir -p $(DESTDIR)$(datadir)/appdata
996         install -m 644 $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
997         mkdir -p $(DESTDIR)$(datadir)/applications
998         if test x$(DESKTOP_FILE_INSTALL) != x ; then \
999                 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)$(datadir)/applications $(srcdir)/wireshark.desktop  $(srcdir)/wireshark-gtk.desktop ; \
1000         else \
1001                 install -m 644 $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications; \
1002         fi
1003         for size in 16 24 32 48 64 128 256; \
1004         do \
1005                 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
1006                 install -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1007                 mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
1008                 install -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1009         done
1010         mkdir -p $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
1011         install -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1012 endif
1013 endif
1014
1015 uninstall-local:
1016 if BUILDING_WIRESHARK
1017 if NOT_MACOS
1018         rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
1019         rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
1020         rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
1021         rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
1022         for size in 16 24 32 48 64 128 256; \
1023         do \
1024                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1025                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1026         done
1027         rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
1028 endif
1029 endif
1030
1031 install-data-hook: update-databases-and-caches-install
1032 uninstall-hook: update-databases-and-caches-uninstall
1033
1034 #
1035 # XXX - which of this stuff can, and should, we do ourselves?
1036 #
1037 # If we're "installing" under $(DESTDIR) as part of the process of
1038 # building a package, we probably don't need to, and shouldn't, do
1039 # any of this.
1040 #
1041 # If we're installing for use, we may need to do some of this; which
1042 # of them do we need to tell where to search, especially if we're
1043 # installing somewhere other than under /usr or /usr/local?
1044 #
1045 # What if we're installing in the user's home directory?
1046 #
1047 # What if we're installing under /opt?
1048 #
1049 # We only need to run ldconfig on systems where it's necessary in order
1050 # to update a shared library cache to know about our shared libraries.
1051 #
1052 # We only need to run update-desktop-database and update-mime-database
1053 # on freedesktop.org desktops.
1054 #
1055 # We only need to run gtk-update-icon-cache if we're installing a GTK+
1056 # version of Wireshark.
1057 #
1058 # We neither need nor want any of this on macOS, nor do we want it if
1059 # we're not building Wireshark (that being the only desktop app).
1060 #
1061 update-databases-and-caches-common:
1062 if BUILDING_WIRESHARK
1063 if NOT_MACOS
1064         @echo "You may need to run \"ldconfig\" as root"
1065         @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
1066         @echo "You may need to run \"update-mime-database $(datadir)/mime\""
1067         @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
1068 endif
1069 endif
1070
1071 update-databases-and-caches-install: update-databases-and-caches-common
1072
1073 update-databases-and-caches-uninstall: update-databases-and-caches-common
1074
1075 # Used by svr4-package and osx-package
1076 # We load top_stagedir with an absolute path so that libtool doesn't freak.
1077 top_stagedir=$(abs_top_builddir)/packaging/staging
1078 stagedir=$(top_stagedir)/$(PACKAGE).inst
1079
1080 host_cpu=@host_cpu@
1081 host_os=@host_os@
1082
1083 solaris-package: svr4-package
1084
1085 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1086         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1087                 rm -rf $(stagedir) ; \
1088                 $(MAKE) DESTDIR=$(stagedir) install; \
1089                 $(srcdir)/packaging/svr4/mkpkg \
1090                         $(PACKAGE) \
1091                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1092                         $(prefix) \
1093                         $(top_stagedir) ; \
1094         else \
1095                 echo "Error: SVR4 packaging tools not found." ; \
1096                 echo "Package build abandoned." ; \
1097         fi
1098
1099
1100 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1101 if HAVE_RPM
1102 rpm-package: dist
1103         @cd $(rpm_topdir) && \
1104           mkdir -p BUILD RPMS SOURCES SRPMS && \
1105           cd SOURCES && \
1106           ln -sf ../../../$(distdir).tar.xz && \
1107           cd .. && \
1108           $(RPMBUILD) --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1109                 @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1110           echo "Package successfully built in `pwd`/RPMS." ; \
1111           rm -f SOURCES/$(distdir).tar.xz ../../$(distdir).tar.xz
1112 else
1113 rpm-package:
1114         @echo "'rpmbuild' executable not available." ; \
1115           false
1116 endif
1117
1118 # XXX - This assumes we're building from the source directory.
1119 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1120         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1121                 rm -rf $(stagedir) ; \
1122                 $(MAKE) DESTDIR=$(stagedir) install; \
1123                 cd $(srcdir)/packaging/macosx ; \
1124                 ./osx-app.sh @OSX_APP_FLAGS@ \
1125                         --create-bundle \
1126                         --binary-path ../staging/$(PACKAGE).inst$(bindir) \
1127                         --plugin-path ../staging/$(PACKAGE).inst$(plugindir) \
1128                         --extcap-path ../staging/$(PACKAGE).inst$(extcapdir) \
1129                         --library-path ../staging/$(PACKAGE).inst$(libdir) ; \
1130         else \
1131                 echo "Error: macOS packaging tools not found." ; \
1132                 echo "Package build abandoned." ; \
1133         fi
1134
1135 packaging/macosx/COPYING.txt: COPYING
1136         (cd packaging/macosx ; \
1137         $(MAKE) COPYING.txt ;)
1138
1139 osx-package: osx-app packaging/macosx/COPYING.txt
1140         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1141                 cd $(srcdir)/packaging/macosx ; \
1142                 chmod +x ./osx-dmg.sh ; \
1143                 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1144         fi
1145
1146 osx-install: osx-app
1147         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1148                 echo "Copying Wireshark.app to /Applications" ; \
1149                 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ; \
1150         fi
1151
1152 test-programs:
1153         cd epan && $(MAKE) $@
1154
1155 clean-local:
1156         rm -rf $(top_stagedir)
1157
1158 dumpabi:
1159         $(MAKE) -C wiretap dumpabi-libwiretap
1160         $(MAKE) -C epan dumpabi-libwireshark
1161         $(MAKE) -C wsutil dumpabi-libwsutil
1162
1163 checkapi_local:
1164         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
1165         -sourcedir=$(srcdir) \
1166         $(TSHARK_TAP_SRC) \
1167         $(wireshark_gtk_SOURCES)
1168 #       $(EXTRA_wireshark_gtk_SOURCES)
1169
1170 checkapi: checkapi_local
1171         cd wiretap && $(MAKE) checkapi
1172         cd codecs && $(MAKE) checkapi
1173         cd capchild && $(MAKE) checkapi
1174         cd caputils && $(MAKE) checkapi
1175         cd ui && $(MAKE) checkapi
1176         cd ui/gtk && $(MAKE) checkapi
1177         cd ui/cli && $(MAKE) checkapi
1178         cd epan && $(MAKE) checkapi
1179         cd epan/crypt && $(MAKE) checkapi
1180         cd epan/dfilter && $(MAKE) checkapi
1181         cd epan/ftypes && $(MAKE) checkapi
1182         cd epan/wmem && $(MAKE) checkapi
1183         cd epan/wslua && $(MAKE) checkapi
1184         cd epan/dissectors && $(MAKE) checkapi
1185         cd plugins && $(MAKE) checkapi
1186         cd randpkt_core && $(MAKE) checkapi
1187         cd writecap && $(MAKE) checkapi
1188         cd wsutil && $(MAKE) checkapi
1189
1190 if HAVE_SHELLCHECK
1191 # --external-sources requires 0.4.0 or later.
1192 shellcheck:
1193         cd $(top_srcdir) && \
1194         shellcheck --external-sources \
1195           tools/fuzz-test.sh \
1196           tools/randpkt-test.sh \
1197           tools/runa2x.sh \
1198           tools/test-captures.sh \
1199           tools/valgrind-wireshark.sh
1200 else
1201 shellcheck:
1202         @echo "Shellcheck not available." ; \
1203           false
1204 endif
1205
1206 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1207 if HAVE_DOXYGEN
1208         rm -rf wsar_html
1209         cd epan && $(MAKE) $@
1210         cd capchild && $(MAKE) $@
1211         cd caputils && $(MAKE) $@
1212         cd randpkt_core && $(MAKE) $@
1213         cd ui && $(MAKE) $@
1214         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1215 endif
1216
1217 wsar-zip: wsar_html
1218 if HAVE_DOXYGEN
1219         rm -f wsar_html.zip
1220         zip -rq wsar_html.zip wsar_html
1221 endif
1222
1223 # Update AUTHORS file with entries from git shortlog
1224 gen-authors:
1225         cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1226
1227 dist-hook:
1228         printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
1229                 > $(top_distdir)/version.conf