debian: use SPDX identifiers.
[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         @dumpcap_bin@           \
45         @reordercap_bin@        \
46         @rawshark_bin@          \
47         @sharkd_bin@
48
49 noinst_PROGRAMS = \
50         @dftest_bin@            \
51         @fuzzshark_bin@
52
53 EXTRA_PROGRAMS = wireshark-gtk wireshark tshark tfshark capinfos captype \
54         editcap mergecap dftest randpkt text2pcap dumpcap reordercap \
55         rawshark sharkd fuzzshark
56
57 #
58 # Wireshark configuration files are put in $(pkgdatadir).
59 #
60 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
61         smi_modules ipmap.html pdml2html.xsl enterprises.tsv wka
62
63 pkgconfigdir = $(libdir)/pkgconfig
64 pkgconfig_DATA = wireshark.pc
65
66 #
67 # Install global profiles in the "profiles" subdirectory
68 #
69 profilesdir = $(pkgdatadir)
70 nobase_dist_profiles_DATA = \
71         profiles/Bluetooth/colorfilters \
72         profiles/Bluetooth/preferences \
73         profiles/Classic/colorfilters
74
75 #
76 # Install the Diameter DTD and XML files in the "diameter" subdirectory
77 # of that directory.
78 #
79 diameterdir = $(pkgdatadir)/diameter
80 include diameter/Custom.make
81 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
82         diameter/chargecontrol.xml \
83         diameter/Cisco.xml \
84         diameter/CiscoSystems.xml \
85         diameter/Custom.xml \
86         diameter/dictionary.dtd \
87         diameter/dictionary.xml \
88         diameter/eap.xml \
89         diameter/Ericsson.xml \
90         diameter/etsie2e4.xml \
91         diameter/Inovar.xml \
92         diameter/Juniper.xml \
93         diameter/mobileipv4.xml \
94         diameter/mobileipv6.xml \
95         diameter/nasreq.xml \
96         diameter/sip.xml \
97         diameter/Starent.xml \
98         diameter/sunping.xml \
99         diameter/TGPP.xml \
100         diameter/TGPP2.xml \
101         diameter/Vodafone.xml \
102         diameter/AlcatelLucent.xml \
103         diameter/Nokia.xml \
104         diameter/NokiaSolutionsAndNetworks.xml \
105         diameter/HP.xml \
106         diameter/Huawei.xml \
107         diameter/Oracle.xml
108
109 #
110 # Install the DTDs directory files in the "dtds" subdirectory
111 # of that directory
112 #
113 dtdsdir = $(pkgdatadir)/dtds
114 dist_dtds_DATA = \
115         dtds/dc.dtd \
116         dtds/itunes.dtd \
117         dtds/mscml.dtd \
118         dtds/pocsettings.dtd \
119         dtds/presence.dtd \
120         dtds/reginfo.dtd \
121         dtds/rlmi.dtd \
122         dtds/rss.dtd \
123         dtds/smil.dtd \
124         dtds/xcap-caps.dtd \
125         dtds/xcap-error.dtd \
126         dtds/watcherinfo.dtd
127
128 #
129 # Install the RADIUS directory files in the "radius" subdirectory
130 # of that directory.
131 #
132 radiusdir = $(pkgdatadir)/radius
133 include radius/Custom.make
134 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
135         radius/README.radius_dictionary \
136         radius/custom.includes \
137         radius/dictionary \
138         radius/dictionary.3com \
139         radius/dictionary.3gpp \
140         radius/dictionary.3gpp2 \
141         radius/dictionary.acc \
142         radius/dictionary.acme \
143         radius/dictionary.actelis \
144         radius/dictionary.aerohive \
145         radius/dictionary.airespace \
146         radius/dictionary.alcatel \
147         radius/dictionary.alcatel-lucent.aaa \
148         radius/dictionary.alcatel.esam \
149         radius/dictionary.alcatel.sr \
150         radius/dictionary.alteon \
151         radius/dictionary.altiga \
152         radius/dictionary.alvarion \
153         radius/dictionary.alvarion.wimax.v2_2 \
154         radius/dictionary.apc \
155         radius/dictionary.aptis \
156         radius/dictionary.arbor \
157         radius/dictionary.aruba \
158         radius/dictionary.ascend \
159         radius/dictionary.asn \
160         radius/dictionary.audiocodes \
161         radius/dictionary.avaya \
162         radius/dictionary.azaire \
163         radius/dictionary.bay \
164         radius/dictionary.bintec \
165         radius/dictionary.bluecoat \
166         radius/dictionary.bristol \
167         radius/dictionary.broadsoft \
168         radius/dictionary.brocade \
169         radius/dictionary.bskyb \
170         radius/dictionary.bt \
171         radius/dictionary.cablelabs \
172         radius/dictionary.cabletron \
173         radius/dictionary.camiant \
174         radius/dictionary.chillispot \
175         radius/dictionary.cisco \
176         radius/dictionary.cisco.asa \
177         radius/dictionary.cisco.bbsm \
178         radius/dictionary.cisco.vpn3000 \
179         radius/dictionary.cisco.vpn5000 \
180         radius/dictionary.citrix \
181         radius/dictionary.clavister \
182         radius/dictionary.cnergee \
183         radius/dictionary.colubris \
184         radius/dictionary.columbia_university \
185         radius/dictionary.compat \
186         radius/dictionary.compatible \
187         radius/dictionary.cosine \
188         radius/dictionary.dante \
189         radius/dictionary.dellemc \
190         radius/dictionary.dhcp \
191         radius/dictionary.digium \
192         radius/dictionary.dlink \
193         radius/dictionary.dragonwave \
194         radius/dictionary.efficientip \
195         radius/dictionary.eltex \
196         radius/dictionary.epygi \
197         radius/dictionary.equallogic \
198         radius/dictionary.ericsson \
199         radius/dictionary.ericsson.ab \
200         radius/dictionary.ericsson.packet.core.networks \
201         radius/dictionary.extreme \
202         radius/dictionary.f5 \
203         radius/dictionary.fdxtended \
204         radius/dictionary.fortinet \
205         radius/dictionary.foundry \
206         radius/dictionary.freedhcp \
207         radius/dictionary.freeradius \
208         radius/dictionary.freeradius.internal \
209         radius/dictionary.freeswitch \
210         radius/dictionary.gandalf \
211         radius/dictionary.garderos \
212         radius/dictionary.gemtek \
213         radius/dictionary.h3c \
214         radius/dictionary.hp \
215         radius/dictionary.huawei \
216         radius/dictionary.iana \
217         radius/dictionary.iea \
218         radius/dictionary.infoblox \
219         radius/dictionary.infonet \
220         radius/dictionary.ipunplugged \
221         radius/dictionary.issanni \
222         radius/dictionary.itk \
223         radius/dictionary.jradius \
224         radius/dictionary.juniper \
225         radius/dictionary.karlnet \
226         radius/dictionary.kineto \
227         radius/dictionary.lancom \
228         radius/dictionary.livingston \
229         radius/dictionary.localweb \
230         radius/dictionary.lucent \
231         radius/dictionary.manzara \
232         radius/dictionary.meinberg \
233         radius/dictionary.merit \
234         radius/dictionary.meru \
235         radius/dictionary.microsemi \
236         radius/dictionary.microsoft \
237         radius/dictionary.mikrotik \
238         radius/dictionary.motorola \
239         radius/dictionary.motorola.wimax \
240         radius/dictionary.navini \
241         radius/dictionary.netscreen \
242         radius/dictionary.networkphysics \
243         radius/dictionary.nexans \
244         radius/dictionary.nokia \
245         radius/dictionary.nokia.conflict \
246         radius/dictionary.nomadix \
247         radius/dictionary.nortel \
248         radius/dictionary.ntua \
249         radius/dictionary.openser \
250         radius/dictionary.packeteer \
251         radius/dictionary.paloalto \
252         radius/dictionary.patton \
253         radius/dictionary.perle \
254         radius/dictionary.propel \
255         radius/dictionary.prosoft \
256         radius/dictionary.proxim \
257         radius/dictionary.purewave \
258         radius/dictionary.quiconnect \
259         radius/dictionary.quintum \
260         radius/dictionary.redcreek \
261         radius/dictionary.rfc2865 \
262         radius/dictionary.rfc2866 \
263         radius/dictionary.rfc2867 \
264         radius/dictionary.rfc2868 \
265         radius/dictionary.rfc2869 \
266         radius/dictionary.rfc3162 \
267         radius/dictionary.rfc3576 \
268         radius/dictionary.rfc3580 \
269         radius/dictionary.rfc4072 \
270         radius/dictionary.rfc4372 \
271         radius/dictionary.rfc4603 \
272         radius/dictionary.rfc4675 \
273         radius/dictionary.rfc4679 \
274         radius/dictionary.rfc4818 \
275         radius/dictionary.rfc4849 \
276         radius/dictionary.rfc5090 \
277         radius/dictionary.rfc5176 \
278         radius/dictionary.rfc5447 \
279         radius/dictionary.rfc5580 \
280         radius/dictionary.rfc5607 \
281         radius/dictionary.rfc5904 \
282         radius/dictionary.rfc6519 \
283         radius/dictionary.rfc6572 \
284         radius/dictionary.rfc6677 \
285         radius/dictionary.rfc6911 \
286         radius/dictionary.rfc6929 \
287         radius/dictionary.rfc6930 \
288         radius/dictionary.rfc7055 \
289         radius/dictionary.rfc7155 \
290         radius/dictionary.rfc7268 \
291         radius/dictionary.rfc7499 \
292         radius/dictionary.rfc7930 \
293         radius/dictionary.riverbed \
294         radius/dictionary.riverstone \
295         radius/dictionary.roaringpenguin \
296         radius/dictionary.ruckus \
297         radius/dictionary.ruggedcom \
298         radius/dictionary.sangoma \
299         radius/dictionary.sg \
300         radius/dictionary.shasta \
301         radius/dictionary.shiva \
302         radius/dictionary.siemens \
303         radius/dictionary.slipstream \
304         radius/dictionary.sofaware \
305         radius/dictionary.sonicwall \
306         radius/dictionary.springtide \
307         radius/dictionary.starent \
308         radius/dictionary.starent.vsa1 \
309         radius/dictionary.surfnet \
310         radius/dictionary.symbol \
311         radius/dictionary.t_systems_nova \
312         radius/dictionary.telebit \
313         radius/dictionary.telkom \
314         radius/dictionary.terena \
315         radius/dictionary.trapeze \
316         radius/dictionary.travelping \
317         radius/dictionary.tropos \
318         radius/dictionary.ukerna \
319         radius/dictionary.unisphere \
320         radius/dictionary.unix \
321         radius/dictionary.usr \
322         radius/dictionary.utstarcom \
323         radius/dictionary.valemount \
324         radius/dictionary.versanet \
325         radius/dictionary.vqp \
326         radius/dictionary.walabi \
327         radius/dictionary.waverider \
328         radius/dictionary.wichorus \
329         radius/dictionary.wimax \
330         radius/dictionary.wimax.alvarion \
331         radius/dictionary.wimax.wichorus \
332         radius/dictionary.wispr \
333         radius/dictionary.xedia \
334         radius/dictionary.xylan \
335         radius/dictionary.yubico \
336         radius/dictionary.zeus \
337         radius/dictionary.zte \
338         radius/dictionary.zyxel
339
340 #
341 # Install the tpncp directory files in the "tpncp" subdirectory
342 # of that directory
343 #
344 tpncpdir = $(pkgdatadir)/tpncp
345 dist_tpncp_DATA = \
346         tpncp/tpncp.dat
347
348 #
349 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
350 # of that directory
351 #
352 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
353 dist_wimaxasncp_DATA = \
354         wimaxasncp/dictionary.xml \
355         wimaxasncp/dictionary.dtd
356
357 # "BUILT_SOURCES" are built before any "make all" or "make check" targets.
358 BUILT_HEADER_FILES = \
359         version.h
360
361 BUILT_C_FILES =
362
363 BUILT_SOURCES = $(BUILT_C_FILES) $(BUILT_HEADER_FILES)
364
365 # Header files generated from source files.
366 GENERATED_HEADER_FILES = \
367         text2pcap-scanner_lex.h \
368         $(BUILT_HEADER_FILES)
369
370 # C source files generated from source files.
371 GENERATED_C_FILES =
372
373 # All the generated files.
374 GENERATED_FILES = $(GENERATED_C_FILES) $(GENERATED_HEADER_FILES)
375
376 # sources common for wireshark, tshark, and rawshark
377 SHARK_COMMON_SRC = \
378         cfile.c                 \
379         file_packet_provider.c  \
380         frame_tvbuff.c          \
381         sync_pipe_write.c       \
382         extcap.c                \
383         extcap_parser.c         \
384         extcap_spawn.c
385
386 # wireshark specifics
387 WIRESHARK_COMMON_SRC = \
388         $(SHARK_COMMON_SRC)     \
389         capture_info.c          \
390         capture_opts.c          \
391         file.c                  \
392         fileset.c               \
393         version_info.c
394
395 EPAN_EXTRA_LIBS = \
396         @C_ARES_LIBS@                   \
397         @KRB5_LIBS@                     \
398         @LIBGCRYPT_LIBS@                \
399         @LIBGNUTLS_LIBS@                \
400         @LIBSMI_LIBS@
401
402 # Libraries and plugin flags with which to link wireshark.
403 #
404 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
405 # (see configure.ac for pkg-config modules used).
406 #
407 wireshark_common_ldadd = \
408         capchild/libcapchild.a          \
409         caputils/libcaputils.a          \
410         ui/libui.a                      \
411         ui/libui_generated.a            \
412         codecs/libwscodecs.la           \
413         wiretap/libwiretap.la           \
414         epan/libwireshark.la            \
415         wsutil/libwsutil.la             \
416         @PCAP_LIBS@                     \
417         $(EPAN_EXTRA_LIBS)              \
418         @LIBNL_LIBS@
419
420 if HAVE_Qt
421 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
422
423 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
424 # Define compatibility macros for Qt 4.8
425 if HAVE_QT_VERSION_4
426 wireshark_CPPFLAGS += -DQ_NULLPTR=NULL
427 endif
428
429 wireshark_LDFLAGS = $(AM_LDFLAGS) $(Qt_LDFLAGS)
430
431 wireshark_LDADD = \
432         ui/qt/libqtui.a                 \
433         $(wireshark_common_ldadd)       \
434         $(GLIB_LIBS)                    \
435         $(Qt_LIBS)
436
437 if HAVE_SPEEXDSP
438 wireshark_LDADD += $(SPEEXDSP_LIBS)
439 endif
440 endif   # HAVE_Qt
441
442 if HAVE_GTK
443 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
444
445 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
446
447 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS)
448
449 wireshark_gtk_LDADD = \
450         ui/gtk/libgtkui.a               \
451         $(wireshark_common_ldadd)       \
452         $(GTK_LIBS)                     \
453         @PORTAUDIO_LIBS@
454 endif
455
456 fuzzshark_SOURCES = \
457         tools/oss-fuzzshark/fuzzshark.c \
458         tools/oss-fuzzshark/StandaloneFuzzTargetMain.c \
459         version_info.c
460
461 fuzzshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
462
463 fuzzshark_LDFLAGS = $(AM_LDFLAGS)
464
465 fuzzshark_LDADD = \
466         wiretap/libwiretap.la           \
467         epan/libwireshark.la            \
468         wsutil/libwsutil.la             \
469         @GLIB_LIBS@                     \
470         ${EPAN_EXTRA_LIBS}
471
472 tshark_SOURCES = \
473         $(SHARK_COMMON_SRC)     \
474         capture_opts.c          \
475         tshark.c                \
476         version_info.c
477
478 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
479
480 tshark_LDFLAGS = $(AM_LDFLAGS)
481
482 # Libraries and plugin flags with which to link tshark.
483 tshark_LDADD = \
484         capchild/libcapchild.a          \
485         caputils/libcaputils.a          \
486         ui/cli/libcliui.a               \
487         ui/libui.a                      \
488         wiretap/libwiretap.la           \
489         epan/libwireshark.la            \
490         wsutil/libwsutil.la             \
491         @GLIB_LIBS@                     \
492         @PCAP_LIBS@                     \
493         ${EPAN_EXTRA_LIBS}
494
495 tfshark_SOURCES = \
496         $(SHARK_COMMON_SRC)     \
497         tfshark.c               \
498         version_info.c
499
500 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
501
502 tfshark_LDFLAGS = $(AM_LDFLAGS)
503
504 # Libraries and plugin flags with which to link tfshark.
505 tfshark_LDADD = \
506         ui/cli/libcliui.a               \
507         ui/libui.a                      \
508         wiretap/libwiretap.la           \
509         epan/libwireshark.la            \
510         wsutil/libwsutil.la             \
511         @GLIB_LIBS@                     \
512         @PCAP_LIBS@                     \
513         ${EPAN_EXTRA_LIBS}
514
515 rawshark_SOURCES = \
516         $(SHARK_COMMON_SRC)     \
517         rawshark.c              \
518         version_info.c
519
520 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
521
522 rawshark_LDFLAGS = $(AM_LDFLAGS)
523
524 # Libraries and plugin flags with which to link rawshark.
525 rawshark_LDADD = \
526         caputils/libcaputils.a          \
527         ui/libui.a                      \
528         wiretap/libwiretap.la           \
529         epan/libwireshark.la            \
530         wsutil/libwsutil.la             \
531         @GLIB_LIBS@                     \
532         @PCAP_LIBS@                     \
533         ${EPAN_EXTRA_LIBS}
534
535 sharkd_SOURCES = \
536         $(SHARK_COMMON_SRC)     \
537         sharkd.c                \
538         sharkd.h                \
539         sharkd_daemon.c         \
540         sharkd_session.c        \
541         version_info.c
542
543 sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
544
545 if HAVE_SPEEXDSP
546 sharkd_CPPFLAGS += $(SPEEXDSP_CFLAGS)
547 endif
548
549 sharkd_LDFLAGS = $(AM_LDFLAGS)
550
551 # Libraries and plugin flags with which to link sharkd.
552 sharkd_LDADD = \
553         ui/cli/libcliui.a               \
554         ui/libui.a                      \
555         codecs/libwscodecs.la           \
556         wiretap/libwiretap.la           \
557         epan/libwireshark.la            \
558         wsutil/libwsutil.la             \
559         @GLIB_LIBS@                     \
560         @PCAP_LIBS@                     \
561         ${EPAN_EXTRA_LIBS}
562
563 if HAVE_SPEEXDSP
564 sharkd_LDADD += $(SPEEXDSP_LIBS)
565 endif
566
567 text2pcap_SOURCES = \
568         text2pcap.c             \
569         text2pcap-scanner.l     \
570         version_info.c
571
572 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
573
574 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
575 # which is generated (and therefore not always clean).
576 # We could generate text2pcap.o as a library with -Werror but for now it
577 # doesn't seem worth the effort.
578 text2pcap_CFLAGS = $(GENERATED_CFLAGS)
579
580 # Libraries with which to link text2pcap.
581 text2pcap_LDADD = \
582         writecap/libwritecap.a          \
583         wsutil/libwsutil.la             \
584         @GLIB_LIBS@
585
586 mergecap_SOURCES = \
587         mergecap.c      \
588         version_info.c
589
590 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
591
592 # Libraries with which to link mergecap.
593 mergecap_LDADD = \
594         ui/libui.a                      \
595         wiretap/libwiretap.la           \
596         wsutil/libwsutil.la             \
597         @GLIB_LIBS@
598
599 capinfos_SOURCES = \
600         capinfos.c      \
601         version_info.c
602
603 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
604
605 # Libraries with which to link capinfos.
606 capinfos_LDADD = \
607         ui/libui.a                      \
608         wiretap/libwiretap.la           \
609         wsutil/libwsutil.la             \
610         @GLIB_LIBS@                     \
611         @LIBGCRYPT_LIBS@
612
613 captype_SOURCES = \
614         captype.c       \
615         version_info.c
616
617 captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
618
619 # Libraries with which to link captype.
620 captype_LDADD = \
621         ui/libui.a                      \
622         wiretap/libwiretap.la           \
623         wsutil/libwsutil.la             \
624         @GLIB_LIBS@
625
626 editcap_SOURCES = \
627         editcap.c       \
628         version_info.c
629
630 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
631
632 # Libraries with which to link editcap.
633 editcap_LDADD = \
634         ui/libui.a                      \
635         wiretap/libwiretap.la           \
636         wsutil/libwsutil.la             \
637         @GLIB_LIBS@                     \
638         @LIBGCRYPT_LIBS@
639
640 reordercap_SOURCES = \
641         reordercap.c    \
642         version_info.c
643
644 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
645
646 # Libraries with which to link reordercap.
647 reordercap_LDADD = \
648         ui/libui.a                      \
649         wiretap/libwiretap.la           \
650         wsutil/libwsutil.la             \
651         @GLIB_LIBS@
652
653 randpkt_SOURCES = \
654         randpkt.c       \
655         version_info.c
656
657 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
658
659 # Libraries with which to link randpkt.
660 randpkt_LDADD = \
661         randpkt_core/librandpkt_core.a  \
662         ui/libui.a                      \
663         wiretap/libwiretap.la           \
664         wsutil/libwsutil.la             \
665         @GLIB_LIBS@                     \
666         @PCAP_LIBS@                     \
667         @C_ARES_LIBS@
668
669 dftest_SOURCES = \
670         dftest.c
671
672 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
673
674 # Libraries and plugin flags with which to link dftest.
675 dftest_LDADD = \
676         ui/libui.a                      \
677         wiretap/libwiretap.la           \
678         wsutil/libwsutil.la             \
679         epan/libwireshark.la            \
680         @GLIB_LIBS@                     \
681         @PCAP_LIBS@                     \
682         ${EPAN_EXTRA_LIBS}
683
684 dumpcap_SOURCES = \
685         capture_opts.c                  \
686         capture_stop_conditions.c       \
687         conditions.c                    \
688         dumpcap.c                       \
689         ringbuffer.c                    \
690         sync_pipe_write.c               \
691         version_info.c
692
693 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
694
695 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
696
697 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
698
699 # Libraries with which to link dumpcap.
700 dumpcap_LDADD = \
701         caputils/libcaputils.a          \
702         ui/libui.a                      \
703         writecap/libwritecap.a          \
704         wsutil/libwsutil.la             \
705         @GLIB_LIBS@                     \
706         @PCAP_LIBS@                     \
707         @LIBCAP_LIBS@                   \
708         @LIBNL_LIBS@
709
710 pkginclude_HEADERS = \
711         cfile.h                 \
712         file.h                  \
713         globals.h               \
714         log.h                   \
715         ws_attributes.h         \
716         ws_compiler_tests.h     \
717         ws_diag_control.h       \
718         ws_symbol_export.h
719
720 # this target needed for distribution only
721 noinst_HEADERS = \
722         tools/oss-fuzzshark/FuzzerInterface.h \
723         capture_info.h          \
724         capture_opts.h          \
725         capture_stop_conditions.h       \
726         conditions.h            \
727         extcap.h                \
728         extcap_parser.h         \
729         extcap_spawn.h          \
730         fileset.h               \
731         frame_tvbuff.h          \
732         ringbuffer.h            \
733         sync_pipe.h             \
734         version_info.h
735
736 #
737 # Build the version string
738 #
739 # FORCE is the portable version of .PHONY
740 FORCE:
741
742 version.h: FORCE
743         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
744
745 #
746 # Build shell scripts by doing variable substitution.
747 # Taken from autoconf 2.13.
748 #
749 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
750
751 SUFFIXES = .sh
752 .sh:
753         rm -f $@ $@.tmp
754         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
755
756 services:
757         $(PYTHON) $(srcdir)/tools/make-services.py
758
759 CLEANFILES = \
760         doxygen-core.tag        \
761         vgcore.*
762
763 DISTCLEANFILES = \
764         version.h
765
766 MAINTAINERCLEANFILES = \
767         $(GENERATED_FILES)
768
769 EXTRA_DIST = \
770         .editorconfig           \
771         .mailmap                \
772         INSTALL.configure       \
773         Makefile.am.inc         \
774         README.aix              \
775         README.bsd              \
776         README.DECT             \
777         README.hpux             \
778         README.linux            \
779         README.macos            \
780         README.md               \
781         README.windows          \
782         abi-descriptor.template \
783         autogen.sh              \
784         cfilters                \
785         colorfilters            \
786         debian                  \
787         dfilters                \
788         doxygen_global.cfg      \
789         doxygen.cfg.in          \
790         enterprises.tsv         \
791         fix                     \
792         idl                     \
793         image                   \
794         ipmap.html              \
795         m4                      \
796         macosx-support-lib-patches      \
797         make-version.pl         \
798         manuf                   \
799         manuf.tmpl              \
800         pdml2html.xsl           \
801         smi_modules             \
802         text2pcap-scanner.l     \
803         text2pcap.h             \
804         services                \
805         wireshark.desktop       \
806         wireshark-gtk.desktop   \
807         wireshark-mime-package.xml      \
808         wireshark.appdata.xml   \
809         wireshark.pc.in         \
810         wka                     \
811         CMakeLists.txt          \
812         CMakeListsCustom.txt.example    \
813         cmakeconfig.h.in        \
814         CMakeOptions.txt        \
815         ConfigureChecks.cmake   \
816         cmake
817
818 install-exec-hook:
819 if HAVE_DUMPCAP_GROUP
820         chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
821 endif
822 if SETCAP_INSTALL
823         $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
824         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
825 else
826 if SETUID_INSTALL
827         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
828         chmod +s $(DESTDIR)$(bindir)/dumpcap
829 endif
830 endif
831
832
833 if HAVE_PLUGINS
834 if !ENABLE_STATIC
835 plugins_subdir = plugins
836 endif
837 endif
838
839 extcap_subdir = extcap
840
841 DIST_SUBDIRS = \
842         capchild        \
843         caputils        \
844         codecs          \
845         doc             \
846         docbook         \
847         epan            \
848         ui              \
849         ui/cli          \
850         ui/gtk          \
851         ui/qt           \
852         help            \
853         packaging       \
854         plugins         \
855         randpkt_core    \
856         tools           \
857         wiretap         \
858         writecap        \
859         wsutil          \
860         extcap
861
862 SUBDIRS = \
863         tools                   \
864         wsutil                  \
865         writecap                \
866         wiretap                 \
867         epan                    \
868         capchild                \
869         caputils                \
870         $(plugins_subdir)       \
871         help                    \
872         ui                      \
873         codecs                  \
874         @wireshark_SUBDIRS@     \
875         ui/cli                  \
876         randpkt_core            \
877         $(extcap_subdir)        \
878         .                       \
879         doc                     \
880         docbook
881
882 help/faq.txt: $(srcdir)/help/faq.py
883         $(AM_V_GEN)(cd help ; \
884         $(MAKE) faq.txt ;)
885
886 libtool: $(LIBTOOL_DEPS)
887         $(SHELL) ./config.status --recheck
888
889
890 #
891 # Install icons and other desktop files for (for use with GNOME, KDE, or
892 # any other freedesktop.org-compliant desktops).
893 #
894 # We use $(datadir).  If the desktop doesn't look for them there,
895 # the desktop is broken; the latest XDG Base Directory Specification
896 # can be consulted at
897 #
898 #    http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
899 #
900 # We neither need nor want any of this if we're not building Wireshark
901 # (that being the only desktop app).
902 #
903 install-data-local:
904 if BUILDING_WIRESHARK
905         $(MKDIR_P) $(DESTDIR)$(datadir)/mime/packages
906         $(INSTALL) -m 644 $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
907         $(MKDIR_P) $(DESTDIR)$(datadir)/appdata
908         $(INSTALL) -m 644 $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
909         $(MKDIR_P) $(DESTDIR)$(datadir)/applications
910         $(INSTALL) -m 644 $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications
911         for size in 16 24 32 48 64 128 256; \
912         do \
913                 $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
914                 $(INSTALL) -m 644 $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
915                 $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
916                 $(INSTALL) -m 644 $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
917         done
918         $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
919         $(INSTALL) -m 644 $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
920 endif
921
922 uninstall-local:
923 if BUILDING_WIRESHARK
924         rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
925         rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
926         rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
927         rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
928         for size in 16 24 32 48 64 128 256; \
929         do \
930                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
931                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
932         done
933         rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
934 endif
935
936 install-data-hook: update-databases-and-caches-install
937 uninstall-hook: update-databases-and-caches-uninstall
938
939 #
940 # ldconfig may be needed to update a shared library cache.
941 #
942 # update-desktop-database and update-mime-database may be needed on
943 # freedesktop.org desktops.
944 #
945 # gtk-update-icon-cache may be needed only if we're installing a GTK+
946 # version of Wireshark.
947 #
948 # Only ldconfig may be needed if we're not building Wireshark
949 # (that being the only desktop app).
950 #
951 update-databases-and-caches-common:
952         @echo "-------------------------------------------------------------------------------"
953         @echo "You may need to run \"ldconfig\" as root"
954 if BUILDING_WIRESHARK
955         @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
956         @echo "You may need to run \"update-mime-database $(datadir)/mime\""
957         @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
958 endif
959         @echo "-------------------------------------------------------------------------------"
960
961 update-databases-and-caches-install: update-databases-and-caches-common
962
963 update-databases-and-caches-uninstall: update-databases-and-caches-common
964
965 rpm-package: dist
966         $(MAKE) -C packaging/rpm
967
968 test-programs:
969         cd epan && $(MAKE) $@
970
971 checkapi_local:
972         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
973         -sourcedir=$(srcdir) \
974         $(TSHARK_TAP_SRC) \
975         $(wireshark_gtk_SOURCES)
976 #       $(EXTRA_wireshark_gtk_SOURCES)
977
978 checkapi: checkapi_local
979         cd wiretap && $(MAKE) checkapi
980         cd codecs && $(MAKE) checkapi
981         cd capchild && $(MAKE) checkapi
982         cd caputils && $(MAKE) checkapi
983         cd ui && $(MAKE) checkapi
984         cd ui/gtk && $(MAKE) checkapi
985         cd ui/cli && $(MAKE) checkapi
986         cd epan && $(MAKE) checkapi
987         cd epan/crypt && $(MAKE) checkapi
988         cd epan/dfilter && $(MAKE) checkapi
989         cd epan/ftypes && $(MAKE) checkapi
990         cd epan/wmem && $(MAKE) checkapi
991         cd epan/wslua && $(MAKE) checkapi
992         cd epan/dissectors && $(MAKE) checkapi
993         cd plugins && $(MAKE) checkapi
994         cd randpkt_core && $(MAKE) checkapi
995         cd writecap && $(MAKE) checkapi
996         cd wsutil && $(MAKE) checkapi
997
998 # --external-sources requires 0.4.0 or later.
999 shellcheck:
1000         cd $(top_srcdir) && \
1001         $(SHELLCHECK) --external-sources \
1002           tools/fuzz-test.sh \
1003           tools/randpkt-test.sh \
1004           tools/runa2x.sh \
1005           tools/test-captures.sh \
1006           tools/valgrind-wireshark.sh
1007
1008 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1009 if HAVE_DOXYGEN
1010         rm -rf wsar_html
1011         cd epan && $(MAKE) $@
1012         cd capchild && $(MAKE) $@
1013         cd caputils && $(MAKE) $@
1014         cd randpkt_core && $(MAKE) $@
1015         cd ui && $(MAKE) $@
1016         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1017 endif
1018
1019 wsar-zip: wsar_html
1020 if HAVE_DOXYGEN
1021         rm -f wsar_html.zip
1022         zip -rq wsar_html.zip wsar_html
1023 endif
1024
1025 # Update AUTHORS file with entries from git shortlog
1026 gen-authors:
1027         cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1028
1029 dist-hook:
1030         printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
1031                 > $(top_distdir)/version.conf