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