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