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