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