manuf: Overwrite entry for OUI 08:00:30
[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-gtk 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 #
405 # GTK_CFLAGS/GTK_LIBS is a strict superset of GLIB_CFLAGS/GLIB_LIBS
406 # (see configure.ac for pkg-config modules used).
407 #
408 wireshark_common_ldadd = \
409         capchild/libcapchild.a          \
410         caputils/libcaputils.a          \
411         ui/libui.a                      \
412         ui/libui_generated.a            \
413         codecs/libwscodecs.la           \
414         wiretap/libwiretap.la           \
415         epan/libwireshark.la            \
416         wsutil/libwsutil.la             \
417         @PCAP_LIBS@                     \
418         $(EPAN_EXTRA_LIBS)              \
419         @LIBNL_LIBS@
420
421 if HAVE_Qt
422 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC) wireshark-qt.cpp
423
424 wireshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) $(Qt_CFLAGS)
425 # Define compatibility macros for Qt 4.8
426 if HAVE_QT_VERSION_4
427 wireshark_CPPFLAGS += -DQ_NULLPTR=NULL
428 endif
429
430 wireshark_LDFLAGS = $(AM_LDFLAGS) $(Qt_LDFLAGS)
431
432 wireshark_LDADD = \
433         ui/qt/libqtui.a                 \
434         $(wireshark_common_ldadd)       \
435         $(GLIB_LIBS)                    \
436         $(Qt_LIBS)
437
438 if HAVE_SPEEXDSP
439 wireshark_LDADD += $(SPEEXDSP_LIBS)
440 endif
441 endif   # HAVE_Qt
442
443 if HAVE_GTK
444 wireshark_gtk_SOURCES = $(WIRESHARK_COMMON_SRC)
445
446 wireshark_gtk_CPPFLAGS = $(AM_CPPFLAGS) $(GTK_CFLAGS)
447
448 wireshark_gtk_LDFLAGS = $(AM_LDFLAGS)
449
450 wireshark_gtk_LDADD = \
451         ui/gtk/libgtkui.a               \
452         $(wireshark_common_ldadd)       \
453         $(GTK_LIBS)                     \
454         @PORTAUDIO_LIBS@
455 endif
456
457 fuzzshark_SOURCES = \
458         tools/oss-fuzzshark/fuzzshark.c \
459         tools/oss-fuzzshark/StandaloneFuzzTargetMain.c \
460         version_info.c
461
462 fuzzshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
463
464 fuzzshark_LDFLAGS = $(AM_LDFLAGS)
465
466 fuzzshark_LDADD = \
467         wiretap/libwiretap.la           \
468         epan/libwireshark.la            \
469         wsutil/libwsutil.la             \
470         @GLIB_LIBS@                     \
471         ${EPAN_EXTRA_LIBS}
472
473 tshark_SOURCES = \
474         $(SHARK_COMMON_SRC)     \
475         capture_opts.c          \
476         tshark.c                \
477         version_info.c
478
479 tshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
480
481 tshark_LDFLAGS = $(AM_LDFLAGS)
482
483 # Libraries and plugin flags with which to link tshark.
484 tshark_LDADD = \
485         capchild/libcapchild.a          \
486         caputils/libcaputils.a          \
487         ui/cli/libcliui.a               \
488         ui/libui.a                      \
489         wiretap/libwiretap.la           \
490         epan/libwireshark.la            \
491         wsutil/libwsutil.la             \
492         @GLIB_LIBS@                     \
493         @PCAP_LIBS@                     \
494         ${EPAN_EXTRA_LIBS}
495
496 tfshark_SOURCES = \
497         $(SHARK_COMMON_SRC)     \
498         tfshark.c               \
499         version_info.c
500
501 tfshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
502
503 tfshark_LDFLAGS = $(AM_LDFLAGS)
504
505 # Libraries and plugin flags with which to link tfshark.
506 tfshark_LDADD = \
507         ui/cli/libcliui.a               \
508         ui/libui.a                      \
509         wiretap/libwiretap.la           \
510         epan/libwireshark.la            \
511         wsutil/libwsutil.la             \
512         @GLIB_LIBS@                     \
513         @PCAP_LIBS@                     \
514         ${EPAN_EXTRA_LIBS}
515
516 rawshark_SOURCES = \
517         $(SHARK_COMMON_SRC)     \
518         rawshark.c              \
519         version_info.c
520
521 rawshark_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
522
523 rawshark_LDFLAGS = $(AM_LDFLAGS)
524
525 # Libraries and plugin flags with which to link rawshark.
526 rawshark_LDADD = \
527         caputils/libcaputils.a          \
528         ui/libui.a                      \
529         wiretap/libwiretap.la           \
530         epan/libwireshark.la            \
531         wsutil/libwsutil.la             \
532         @GLIB_LIBS@                     \
533         @PCAP_LIBS@                     \
534         ${EPAN_EXTRA_LIBS}
535
536 mmdbresolve_SOURCES = mmdbresolve.c
537 mmdbresolve_CPPFLAGS = $(AM_CPPFLAGS)
538 mmdbresolve_LDFLAGS = $(AM_LDFLAGS)
539 mmdbresolve_LDADD = @MAXMINDDB_LIBS@
540
541 sharkd_SOURCES = \
542         $(SHARK_COMMON_SRC)     \
543         sharkd.c                \
544         sharkd.h                \
545         sharkd_daemon.c         \
546         sharkd_session.c        \
547         version_info.c
548
549 sharkd_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
550
551 if HAVE_SPEEXDSP
552 sharkd_CPPFLAGS += $(SPEEXDSP_CFLAGS)
553 endif
554
555 sharkd_LDFLAGS = $(AM_LDFLAGS)
556
557 # Libraries and plugin flags with which to link sharkd.
558 sharkd_LDADD = \
559         ui/cli/libcliui.a               \
560         ui/libui.a                      \
561         codecs/libwscodecs.la           \
562         wiretap/libwiretap.la           \
563         epan/libwireshark.la            \
564         wsutil/libwsutil.la             \
565         @GLIB_LIBS@                     \
566         @PCAP_LIBS@                     \
567         ${EPAN_EXTRA_LIBS}
568
569 if HAVE_SPEEXDSP
570 sharkd_LDADD += $(SPEEXDSP_LIBS)
571 endif
572
573 text2pcap_SOURCES = \
574         text2pcap.c             \
575         text2pcap-scanner.l     \
576         version_info.c
577
578 text2pcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
579
580 text2pcap_CFLAGS = $(AM_CFLAGS)
581
582 # Libraries with which to link text2pcap.
583 text2pcap_LDADD = \
584         writecap/libwritecap.a          \
585         wsutil/libwsutil.la             \
586         @GLIB_LIBS@
587
588 mergecap_SOURCES = \
589         mergecap.c      \
590         version_info.c
591
592 mergecap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
593
594 # Libraries with which to link mergecap.
595 mergecap_LDADD = \
596         ui/libui.a                      \
597         wiretap/libwiretap.la           \
598         wsutil/libwsutil.la             \
599         @GLIB_LIBS@
600
601 capinfos_SOURCES = \
602         capinfos.c      \
603         version_info.c
604
605 capinfos_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
606
607 # Libraries with which to link capinfos.
608 capinfos_LDADD = \
609         ui/libui.a                      \
610         wiretap/libwiretap.la           \
611         wsutil/libwsutil.la             \
612         @GLIB_LIBS@                     \
613         @LIBGCRYPT_LIBS@
614
615 captype_SOURCES = \
616         captype.c       \
617         version_info.c
618
619 captype_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
620
621 # Libraries with which to link captype.
622 captype_LDADD = \
623         ui/libui.a                      \
624         wiretap/libwiretap.la           \
625         wsutil/libwsutil.la             \
626         @GLIB_LIBS@
627
628 editcap_SOURCES = \
629         editcap.c       \
630         version_info.c
631
632 editcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
633
634 # Libraries with which to link editcap.
635 editcap_LDADD = \
636         ui/libui.a                      \
637         wiretap/libwiretap.la           \
638         wsutil/libwsutil.la             \
639         @GLIB_LIBS@                     \
640         @LIBGCRYPT_LIBS@
641
642 reordercap_SOURCES = \
643         reordercap.c    \
644         version_info.c
645
646 reordercap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
647
648 # Libraries with which to link reordercap.
649 reordercap_LDADD = \
650         ui/libui.a                      \
651         wiretap/libwiretap.la           \
652         wsutil/libwsutil.la             \
653         @GLIB_LIBS@
654
655 randpkt_SOURCES = \
656         randpkt.c       \
657         version_info.c
658
659 randpkt_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
660
661 # Libraries with which to link randpkt.
662 randpkt_LDADD = \
663         randpkt_core/librandpkt_core.a  \
664         ui/libui.a                      \
665         wiretap/libwiretap.la           \
666         wsutil/libwsutil.la             \
667         @GLIB_LIBS@                     \
668         @PCAP_LIBS@                     \
669         @C_ARES_LIBS@
670
671 dftest_SOURCES = \
672         dftest.c
673
674 dftest_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
675
676 # Libraries and plugin flags with which to link dftest.
677 dftest_LDADD = \
678         ui/libui.a                      \
679         wiretap/libwiretap.la           \
680         wsutil/libwsutil.la             \
681         epan/libwireshark.la            \
682         @GLIB_LIBS@                     \
683         @PCAP_LIBS@                     \
684         ${EPAN_EXTRA_LIBS}
685
686 dumpcap_SOURCES = \
687         capture_opts.c                  \
688         capture_stop_conditions.c       \
689         conditions.c                    \
690         dumpcap.c                       \
691         ringbuffer.c                    \
692         sync_pipe_write.c               \
693         version_info.c
694
695 dumpcap_CPPFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS)
696
697 dumpcap_CFLAGS = $(AM_CFLAGS) $(PIE_CFLAGS)
698
699 dumpcap_LDFLAGS = $(AM_LDFLAGS) $(PIE_LDFLAGS)
700
701 # Libraries with which to link dumpcap.
702 dumpcap_LDADD = \
703         caputils/libcaputils.a          \
704         ui/libui.a                      \
705         writecap/libwritecap.a          \
706         wsutil/libwsutil.la             \
707         @GLIB_LIBS@                     \
708         @PCAP_LIBS@                     \
709         @LIBCAP_LIBS@                   \
710         @LIBNL_LIBS@
711
712 pkginclude_HEADERS = \
713         cfile.h                 \
714         file.h                  \
715         globals.h               \
716         log.h                   \
717         ws_attributes.h         \
718         ws_compiler_tests.h     \
719         ws_diag_control.h       \
720         ws_symbol_export.h
721
722 # this target needed for distribution only
723 noinst_HEADERS = \
724         tools/oss-fuzzshark/FuzzerInterface.h \
725         capture_info.h          \
726         capture_opts.h          \
727         capture_stop_conditions.h       \
728         conditions.h            \
729         extcap.h                \
730         extcap_parser.h         \
731         fileset.h               \
732         frame_tvbuff.h          \
733         ringbuffer.h            \
734         sync_pipe.h             \
735         version_info.h
736
737 #
738 # Build the version string
739 #
740 # FORCE is the portable version of .PHONY
741 FORCE:
742
743 version.h: FORCE
744         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
745
746 #
747 # Build shell scripts by doing variable substitution.
748 # Taken from autoconf 2.13.
749 #
750 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
751
752 SUFFIXES = .sh
753 .sh:
754         rm -f $@ $@.tmp
755         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
756
757 services:
758         $(PYTHON) $(srcdir)/tools/make-services.py
759
760 CLEANFILES = \
761         doxygen-core.tag        \
762         vgcore.*
763
764 DISTCLEANFILES = \
765         version.h
766
767 MAINTAINERCLEANFILES = \
768         $(GENERATED_FILES)
769
770 EXTRA_DIST = \
771         .editorconfig           \
772         .mailmap                \
773         INSTALL.configure       \
774         Makefile.am.inc         \
775         README.aix              \
776         README.bsd              \
777         README.DECT             \
778         README.hpux             \
779         README.linux            \
780         README.macos            \
781         README.md               \
782         README.windows          \
783         abi-descriptor.template \
784         autogen.sh              \
785         cfilters                \
786         colorfilters            \
787         debian                  \
788         dfilters                \
789         doxygen_global.cfg      \
790         doxygen.cfg.in          \
791         enterprises.tsv         \
792         fix                     \
793         idl                     \
794         image                   \
795         m4                      \
796         macosx-support-lib-patches      \
797         make-version.pl         \
798         manuf                   \
799         manuf.tmpl              \
800         pdml2html.xsl           \
801         smi_modules             \
802         text2pcap-scanner.l     \
803         text2pcap.h             \
804         services                \
805         wireshark.desktop       \
806         wireshark-gtk.desktop   \
807         wireshark-mime-package.xml      \
808         wireshark.appdata.xml   \
809         wireshark.pc.in         \
810         wka                     \
811         CMakeLists.txt          \
812         CMakeListsCustom.txt.example    \
813         cmakeconfig.h.in        \
814         CMakeOptions.txt        \
815         ConfigureChecks.cmake   \
816         cmake
817
818 install-exec-hook:
819 if HAVE_DUMPCAP_GROUP
820         chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
821 endif
822 if SETCAP_INSTALL
823         $(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
824         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
825 else
826 if SETUID_INSTALL
827         chmod o-rws $(DESTDIR)$(bindir)/dumpcap
828         chmod +s $(DESTDIR)$(bindir)/dumpcap
829 endif
830 endif
831
832
833 if HAVE_PLUGINS
834 if !ENABLE_STATIC
835 plugins_subdir = plugins
836 endif
837 endif
838
839 extcap_subdir = extcap
840
841 DIST_SUBDIRS = \
842         capchild        \
843         caputils        \
844         codecs          \
845         doc             \
846         docbook         \
847         epan            \
848         ui              \
849         ui/cli          \
850         ui/gtk          \
851         ui/qt           \
852         help            \
853         packaging       \
854         plugins         \
855         randpkt_core    \
856         tools           \
857         wiretap         \
858         writecap        \
859         wsutil          \
860         extcap
861
862 SUBDIRS = \
863         tools                   \
864         wsutil                  \
865         writecap                \
866         wiretap                 \
867         epan                    \
868         capchild                \
869         caputils                \
870         $(plugins_subdir)       \
871         help                    \
872         ui                      \
873         codecs                  \
874         @wireshark_SUBDIRS@     \
875         ui/cli                  \
876         randpkt_core            \
877         $(extcap_subdir)        \
878         .                       \
879         doc                     \
880         docbook
881
882 help/faq.txt: $(srcdir)/help/faq.py
883         $(AM_V_GEN)(cd help ; \
884         $(MAKE) faq.txt ;)
885
886 libtool: $(LIBTOOL_DEPS)
887         $(SHELL) ./config.status --recheck
888
889
890 #
891 # Install icons and other desktop files for (for use with GNOME, KDE, or
892 # any other freedesktop.org-compliant desktops).
893 #
894 # We use $(datadir).  If the desktop doesn't look for them there,
895 # the desktop is broken; the latest XDG Base Directory Specification
896 # can be consulted at
897 #
898 #    http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
899 #
900 # We neither need nor want any of this if we're not building Wireshark
901 # (that being the only desktop app).
902 #
903 install-data-local:
904 if BUILDING_WIRESHARK
905         $(MKDIR_P) $(DESTDIR)$(datadir)/mime/packages
906         $(INSTALL_DATA) $(srcdir)/wireshark-mime-package.xml $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
907         $(MKDIR_P) $(DESTDIR)$(datadir)/appdata
908         $(INSTALL_DATA) $(srcdir)/wireshark.appdata.xml $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
909         $(MKDIR_P) $(DESTDIR)$(datadir)/applications
910         $(INSTALL_DATA) $(srcdir)/wireshark.desktop $(srcdir)/wireshark-gtk.desktop $(DESTDIR)$(datadir)/applications
911         for size in 16 24 32 48 64 128 256; \
912         do \
913                 $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps ; \
914                 $(INSTALL_DATA) $(srcdir)/image/wsicon$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
915                 $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes ; \
916                 $(INSTALL_DATA) $(srcdir)/image/WiresharkDoc-$${size}.png $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
917         done
918         $(MKDIR_P) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps
919         $(INSTALL_DATA) $(srcdir)/image/wsicon.svg $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
920 endif
921
922 uninstall-local:
923 if BUILDING_WIRESHARK
924         rm -f $(DESTDIR)$(datadir)/appdata/wireshark.appdata.xml
925         rm -f $(DESTDIR)$(datadir)/applications/wireshark.desktop
926         rm -f $(DESTDIR)$(datadir)/applications/wireshark-gtk.desktop
927         rm -f $(DESTDIR)$(datadir)/mime/packages/wireshark.xml
928         for size in 16 24 32 48 64 128 256; \
929         do \
930                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
931                 rm -f $(DESTDIR)$(datadir)/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
932         done
933         rm -f $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/wireshark.svg
934 endif
935
936 install-data-hook: update-databases-and-caches-install
937 uninstall-hook: update-databases-and-caches-uninstall
938
939 #
940 # ldconfig may be needed to update a shared library cache.
941 #
942 # update-desktop-database and update-mime-database may be needed on
943 # freedesktop.org desktops.
944 #
945 # gtk-update-icon-cache may be needed only if we're installing a GTK+
946 # version of Wireshark.
947 #
948 # Only ldconfig may be needed if we're not building Wireshark
949 # (that being the only desktop app).
950 #
951 update-databases-and-caches-common:
952         @echo "-------------------------------------------------------------------------------"
953         @echo "You may need to run \"ldconfig\" as root"
954 if BUILDING_WIRESHARK
955         @echo "You may need to run \"update-desktop-database $(datadir)/applications\""
956         @echo "You may need to run \"update-mime-database $(datadir)/mime\""
957         @echo "You may need to run \"gtk-update-icon-cache -f -t $(datadir)/icons/hicolor\""
958 endif
959         @echo "-------------------------------------------------------------------------------"
960
961 update-databases-and-caches-install: update-databases-and-caches-common
962
963 update-databases-and-caches-uninstall: update-databases-and-caches-common
964
965 rpm-package: dist
966         $(MAKE) -C packaging/rpm
967
968 test-programs:
969         cd epan && $(MAKE) $@
970
971 checkapi_local:
972         $(PERL) $(top_srcdir)/tools/checkAPIs.pl -build \
973         -sourcedir=$(srcdir) \
974         $(TSHARK_TAP_SRC) \
975         $(wireshark_gtk_SOURCES)
976 #       $(EXTRA_wireshark_gtk_SOURCES)
977
978 checkapi: checkapi_local
979         cd wiretap && $(MAKE) checkapi
980         cd codecs && $(MAKE) checkapi
981         cd capchild && $(MAKE) checkapi
982         cd caputils && $(MAKE) checkapi
983         cd ui && $(MAKE) checkapi
984         cd ui/gtk && $(MAKE) checkapi
985         cd ui/cli && $(MAKE) checkapi
986         cd epan && $(MAKE) checkapi
987         cd epan/crypt && $(MAKE) checkapi
988         cd epan/dfilter && $(MAKE) checkapi
989         cd epan/ftypes && $(MAKE) checkapi
990         cd epan/wmem && $(MAKE) checkapi
991         cd epan/wslua && $(MAKE) checkapi
992         cd epan/dissectors && $(MAKE) checkapi
993         cd plugins && $(MAKE) checkapi
994         cd randpkt_core && $(MAKE) checkapi
995         cd writecap && $(MAKE) checkapi
996         cd wsutil && $(MAKE) checkapi
997
998 # --external-sources requires 0.4.0 or later.
999 shellcheck:
1000         cd $(top_srcdir) && \
1001         $(SHELLCHECK) --external-sources \
1002           tools/fuzz-test.sh \
1003           tools/randpkt-test.sh \
1004           tools/test-captures.sh \
1005           tools/valgrind-wireshark.sh
1006
1007 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1008 if HAVE_DOXYGEN
1009         rm -rf wsar_html
1010         cd epan && $(MAKE) $@
1011         cd capchild && $(MAKE) $@
1012         cd caputils && $(MAKE) $@
1013         cd randpkt_core && $(MAKE) $@
1014         cd ui && $(MAKE) $@
1015         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1016 endif
1017
1018 wsar-zip: wsar_html
1019 if HAVE_DOXYGEN
1020         rm -f wsar_html.zip
1021         zip -rq wsar_html.zip wsar_html
1022 endif
1023
1024 # Update AUTHORS file with entries from git shortlog
1025 gen-authors:
1026         cd $(top_srcdir) && $(PERL) tools/generate_authors.pl AUTHORS.src > AUTHORS
1027
1028 dist-hook:
1029         printf "git_description=%s\n" "$$(git -C $(top_srcdir) describe --match 'v[1-9]*')" \
1030                 > $(top_distdir)/version.conf