packet-smb-direct.c: add support for reassembling of fragments
[metze/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Wireshark
3 #
4 # $Id$
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
23
24 AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
25 ACLOCAL_AMFLAGS = `./aclocal-flags`
26
27 if HAVE_LIBPY
28 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
29 else
30 py_dissectors_dir = -DPYTHON_DIR=
31 endif
32
33
34 if HAVE_WARNINGS_AS_ERRORS
35 AM_CLEAN_CFLAGS = -Werror
36 endif
37
38 bin_PROGRAMS = \
39         @wireshark_bin@         \
40         @tshark_bin@            \
41         @tfshark_bin@           \
42         @text2pcap_bin@         \
43         @mergecap_bin@          \
44         @capinfos_bin@          \
45         @captype_bin@           \
46         @editcap_bin@           \
47         @randpkt_bin@           \
48         @dftest_bin@            \
49         @dumpcap_bin@           \
50         @reordercap_bin@        \
51         @rawshark_bin@          \
52         @echld_test_bin@
53
54 EXTRA_PROGRAMS = wireshark wireshark-qt tshark tfshark capinfos captype editcap \
55         mergecap dftest randpkt text2pcap dumpcap reordercap rawshark \
56         wireshark_cxx echld_test
57
58 #
59 # Wireshark configuration files are put in $(pkgdatadir).
60 #
61 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
62         smi_modules ipmap.html pdml2html.xsl
63
64 #
65 # Install global profiles in the "profiles" subdirectory
66 #
67 profilesdir = $(pkgdatadir)
68 nobase_dist_profiles_DATA = \
69         profiles/Bluetooth/colorfilters \
70         profiles/Classic/colorfilters
71
72 #
73 # Install the Diameter DTD and XML files in the "diameter" subdirectory
74 # of that directory.
75 #
76 diameterdir = $(pkgdatadir)/diameter
77 include diameter/Custom.make
78 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
79         diameter/chargecontrol.xml \
80         diameter/ChinaTelecom.xml \
81         diameter/Cisco.xml \
82         diameter/Custom.xml \
83         diameter/dictionary.dtd \
84         diameter/dictionary.xml \
85         diameter/eap.xml \
86         diameter/Ericsson.xml \
87         diameter/etsie2e4.xml \
88         diameter/gqpolicy.xml \
89         diameter/imscxdx.xml \
90         diameter/mobileipv4.xml \
91         diameter/mobileipv6.xml \
92         diameter/nasreq.xml \
93         diameter/sip.xml \
94         diameter/Starent.xml \
95         diameter/sunping.xml \
96         diameter/TGPPGmb.xml \
97         diameter/TGPPRx.xml \
98         diameter/TGPPS9.xml \
99         diameter/TGPPSh.xml \
100         diameter/Vodafone.xml \
101         diameter/AlcatelLucent.xml \
102         diameter/Nokia.xml \
103         diameter/NokiaSiemensNetworks.xml \
104         diameter/SKT.xml \
105         diameter/VerizonWireless.xml
106
107 #
108 # Install the DTDs directory files in the "dtds" subdirectory
109 # of that directory
110 #
111 dtdsdir = $(pkgdatadir)/dtds
112 dist_dtds_DATA = \
113         dtds/dc.dtd \
114         dtds/itunes.dtd \
115         dtds/mscml.dtd \
116         dtds/pocsettings.dtd \
117         dtds/presence.dtd \
118         dtds/reginfo.dtd \
119         dtds/rlmi.dtd \
120         dtds/rss.dtd \
121         dtds/smil.dtd \
122         dtds/xcap-caps.dtd \
123         dtds/xcap-error.dtd \
124         dtds/watcherinfo.dtd
125
126 #
127 # Install the RADIUS directory files in the "radius" subdirectory
128 # of that directory.
129 #
130 radiusdir = $(pkgdatadir)/radius
131 include radius/Custom.make
132 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
133         radius/README.radius_dictionary  \
134         radius/custom.includes  \
135         radius/dictionary  \
136         radius/dictionary.3com  \
137         radius/dictionary.3gpp  \
138         radius/dictionary.3gpp2  \
139         radius/dictionary.acc  \
140         radius/dictionary.acme \
141         radius/dictionary.airespace \
142         radius/dictionary.alcatel  \
143         radius/dictionary.alcatel.esam \
144         radius/dictionary.alcatel.sr \
145         radius/dictionary.alcatel-lucent.aaa \
146         radius/dictionary.alcatel-lucent.xylan \
147         radius/dictionary.alteon  \
148         radius/dictionary.altiga  \
149         radius/dictionary.alvarion \
150         radius/dictionary.apc \
151         radius/dictionary.aptis  \
152         radius/dictionary.aruba  \
153         radius/dictionary.ascend  \
154         radius/dictionary.asn \
155         radius/dictionary.audiocodes \
156         radius/dictionary.avaya \
157         radius/dictionary.azaire \
158         radius/dictionary.bay  \
159         radius/dictionary.bintec  \
160         radius/dictionary.bristol  \
161         radius/dictionary.cablelabs  \
162         radius/dictionary.cabletron  \
163         radius/dictionary.chillispot \
164         radius/dictionary.cisco  \
165         radius/dictionary.cisco.bbsm  \
166         radius/dictionary.cisco.vpn3000  \
167         radius/dictionary.cisco.vpn5000  \
168         radius/dictionary.clavister \
169         radius/dictionary.colubris  \
170         radius/dictionary.columbia_university  \
171         radius/dictionary.compat  \
172         radius/dictionary.cosine  \
173         radius/dictionary.dhcp \
174         radius/dictionary.digium \
175         radius/dictionary.eltex \
176         radius/dictionary.epygi \
177         radius/dictionary.ericsson  \
178         radius/dictionary.erx  \
179         radius/dictionary.extreme  \
180         radius/dictionary.fortinet \
181         radius/dictionary.foundry  \
182         radius/dictionary.freeradius  \
183         radius/dictionary.freeradius.internal  \
184         radius/dictionary.freeswitch \
185         radius/dictionary.gandalf  \
186         radius/dictionary.garderos  \
187         radius/dictionary.gemtek  \
188         radius/dictionary.h3c \
189         radius/dictionary.hp \
190         radius/dictionary.huawei \
191         radius/dictionary.iea \
192         radius/dictionary.infonet \
193         radius/dictionary.ipunplugged \
194         radius/dictionary.issanni \
195         radius/dictionary.itk  \
196         radius/dictionary.jradius \
197         radius/dictionary.juniper  \
198         radius/dictionary.karlnet  \
199         radius/dictionary.lancom \
200         radius/dictionary.livingston  \
201         radius/dictionary.localweb  \
202         radius/dictionary.lucent \
203         radius/dictionary.manzara \
204         radius/dictionary.merit  \
205         radius/dictionary.microsoft  \
206         radius/dictionary.mikrotik  \
207         radius/dictionary.motorola \
208         radius/dictionary.motorola.wimax \
209         radius/dictionary.navini  \
210         radius/dictionary.netscreen  \
211         radius/dictionary.networkphysics \
212         radius/dictionary.nexans \
213         radius/dictionary.nokia  \
214         radius/dictionary.nokia.conflict \
215         radius/dictionary.nomadix  \
216         radius/dictionary.nortel \
217         radius/dictionary.ntua \
218         radius/dictionary.openser \
219         radius/dictionary.packeteer \
220         radius/dictionary.patton \
221         radius/dictionary.propel  \
222         radius/dictionary.prosoft \
223         radius/dictionary.quiconnect \
224         radius/dictionary.quintum  \
225         radius/dictionary.redback  \
226         radius/dictionary.redcreek  \
227         radius/dictionary.rfc2865 \
228         radius/dictionary.rfc2866 \
229         radius/dictionary.rfc2867 \
230         radius/dictionary.rfc2868 \
231         radius/dictionary.rfc2869 \
232         radius/dictionary.rfc3162 \
233         radius/dictionary.rfc3576 \
234         radius/dictionary.rfc3580 \
235         radius/dictionary.rfc4072 \
236         radius/dictionary.rfc4372 \
237         radius/dictionary.rfc4603 \
238         radius/dictionary.rfc4675 \
239         radius/dictionary.rfc4679 \
240         radius/dictionary.rfc4818 \
241         radius/dictionary.rfc4849 \
242         radius/dictionary.rfc5090 \
243         radius/dictionary.rfc5176 \
244         radius/dictionary.rfc5447 \
245         radius/dictionary.rfc5580 \
246         radius/dictionary.rfc5607 \
247         radius/dictionary.rfc5904 \
248         radius/dictionary.rfc6519 \
249         radius/dictionary.rfc6572 \
250         radius/dictionary.riverstone \
251         radius/dictionary.roaringpenguin \
252         radius/dictionary.shasta  \
253         radius/dictionary.shiva  \
254         radius/dictionary.slipstream \
255         radius/dictionary.sofaware \
256         radius/dictionary.sonicwall  \
257         radius/dictionary.springtide  \
258         radius/dictionary.starent  \
259         radius/dictionary.t_systems_nova  \
260         radius/dictionary.telebit  \
261         radius/dictionary.telkom \
262         radius/dictionary.trapeze  \
263         radius/dictionary.tropos \
264         radius/dictionary.ukerna  \
265         radius/dictionary.unix  \
266         radius/dictionary.usr  \
267         radius/dictionary.utstarcom \
268         radius/dictionary.valemount  \
269         radius/dictionary.versanet  \
270         radius/dictionary.vqp \
271         radius/dictionary.walabi \
272         radius/dictionary.waverider \
273         radius/dictionary.wichorus \
274         radius/dictionary.wimax  \
275         radius/dictionary.wimax.wichorus \
276         radius/dictionary.wispr  \
277         radius/dictionary.xedia \
278         radius/dictionary.zyxel
279
280 #
281 # Install the tpncp directory files in the "tpncp" subdirectory
282 # of that directory
283 #
284 tpncpdir = $(pkgdatadir)/tpncp
285 dist_tpncp_DATA = \
286         tpncp/tpncp.dat
287
288 #
289 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
290 # of that directory
291 #
292 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
293 dist_wimaxasncp_DATA = \
294         wimaxasncp/dictionary.xml \
295         wimaxasncp/dictionary.dtd
296
297 PLATFORM_PCAP_SRC = \
298         capture-pcap-util-unix.c
299
300 if HAVE_PLUGINS
301 -include plugins/Custom.make
302 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
303         -dlopen plugins/docsis/docsis.la \
304         -dlopen plugins/ethercat/ethercat.la \
305         -dlopen plugins/gryphon/gryphon.la \
306         -dlopen plugins/irda/irda.la \
307         -dlopen plugins/m2m/m2m.la \
308         -dlopen plugins/mate/mate.la \
309         -dlopen plugins/opcua/opcua.la \
310         -dlopen plugins/profinet/profinet.la \
311         -dlopen plugins/stats_tree/stats_tree.la \
312         -dlopen plugins/unistim/unistim.la \
313         -dlopen plugins/wimax/wimax.la \
314         -dlopen plugins/wimaxmacphy/wimaxmacphy.la
315
316 else            # HAVE_PLUGINS
317
318 plugin_ldadd =
319
320 endif           # HAVE_PLUGINS
321
322 include Makefile.common
323
324 if ENABLE_STATIC
325 if HAVE_GTK
326 wireshark_LDFLAGS = -Wl,-static -all-static
327 endif
328 if HAVE_Qt
329 wireshark_qt_LDFLAGS = -Wl,-static -all-static
330 endif
331 else
332 if HAVE_GTK
333 wireshark_LDFLAGS = -export-dynamic
334 endif
335 if HAVE_Qt
336 wireshark_qt_LDFLAGS = -export-dynamic
337 endif
338 endif
339
340 # Libraries and plugin flags with which to link wireshark.
341 #
342 # Note that Wireshark, when built with a version of GTK+ that runs
343 # atop X11, doesn't have to be linked with @SOCKET_LIBS@ or @NSL_LIBS@,
344 # as those should also be included in @GTK_LIBS@ (as those are also
345 # needed for X applications, and GTK+ applications are X applications
346 # if the version of GTK+ they're built with runs atop X11).
347 #
348 # However, it *does* have to be linked with @GLIB_LIBS@; not all of
349 # the necessary GLib libraries are included in @GTK_LIBS@.  To quote
350 # Gentoo bug 423743 at
351 #
352 #       https://bugs.gentoo.org/show_bug.cgi?id=423743
353 #
354 # "The Makefile.am claims including GLIB_LIBS when linking wireshark is
355 # unnecessary, because wireshark links to GTK_LIBS which is a superset.
356 # It is not actually a superset: gmodule is included in GLIB_LIBS but
357 # not in GTK_LIBS (unless accidentally on older glibs/gtks)."
358 #
359 # although it's also possible that -lgmodule is in GTK_LIBS but not
360 # GLIB_LIBS (that's the case on my machine right now, for example).
361 #
362 wireshark_ldadd = \
363         ui/libui.a                      \
364         ui/libui_dirty.a                \
365         codecs/libcodec.a               \
366         filetap/libfiletap.la           \
367         wiretap/libwiretap.la           \
368         epan/libwireshark.la            \
369         wsutil/libwsutil.la             \
370         @SSL_LIBS@                      \
371         $(plugin_ldadd)                 \
372         @PCAP_LIBS@                     \
373         @C_ARES_LIBS@                   \
374         @ADNS_LIBS@                     \
375         @KRB5_LIBS@                     \
376         @APPLICATIONSERVICES_FRAMEWORKS@        \
377         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
378         @COREFOUNDATION_FRAMEWORKS@     \
379         @PY_LIBS@                       \
380         @LIBGCRYPT_LIBS@                \
381         @LIBGNUTLS_LIBS@                \
382         @LIBSMI_LDFLAGS@                \
383         @PORTAUDIO_LIBS@                \
384         @GLIB_LIBS@                     \
385         -lm
386
387 if HAVE_Qt
388 wireshark_qt_SOURCES = $(WIRESHARK_COMMON_SRC)
389 wireshark_qt_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
390 wireshark_qt_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
391 wireshark_qt_LDADD = \
392         ui/qt/libqtui.a \
393         $(wireshark_ldadd) \
394         @Qt_LIBS@
395
396 #
397 # XXX - this makes wireshark_qt_LDFLAGS not work; we should figure out
398 # another way to get wireshark-qt linked as a C++ program, perhaps by
399 # having a top-level wireshark-qt.cpp file that contains main() and
400 # hthat calls the UI code from ui/qt.
401 #
402 wireshark_qt_LINK = $(CXXLINK)
403 endif
404
405 if HAVE_GTK
406 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC)
407 wireshark_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
408 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
409 wireshark_LDADD = \
410         ui/gtk/libgtkui.a \
411         $(wireshark_ldadd) \
412         @GTK_LIBS@
413 endif
414
415 # Ideally we could trigger automatic c++ linking here with
416 #   nodist_EXTRA_wireshark_SOURCES = dummy.cpp
417 # Unfortunately that check is done by automake and not configure.
418 # We do the following to try to avoid using c++ to link Wireshark at
419 # all times.
420 nodist_EXTRA_wireshark_cxx_SOURCES = dummy.cpp
421 wireshark_cxx_SOURCES =
422
423 if ENABLE_STATIC
424 tshark_LDFLAGS = -Wl,-static -all-static
425 else
426 tshark_LDFLAGS = -export-dynamic
427 endif
428
429 # Libraries and plugin flags with which to link tshark.
430 tshark_LDADD = \
431         ui/cli/libcliui.a               \
432         ui/libui.a                      \
433         wiretap/libwiretap.la           \
434         epan/libwireshark.la            \
435         wsutil/libwsutil.la             \
436         @SSL_LIBS@                      \
437         $(plugin_ldadd)                 \
438         @GLIB_LIBS@ -lm                 \
439         @PCAP_LIBS@                     \
440         @SOCKET_LIBS@                   \
441         @NSL_LIBS@                      \
442         @C_ARES_LIBS@                   \
443         @ADNS_LIBS@                     \
444         @KRB5_LIBS@                     \
445         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
446         @COREFOUNDATION_FRAMEWORKS@     \
447         @PY_LIBS@                       \
448         @LIBGCRYPT_LIBS@                \
449         @LIBGNUTLS_LIBS@                \
450         @LIBSMI_LDFLAGS@
451 tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
452
453 if ENABLE_STATIC
454 tfshark_LDFLAGS = -Wl,-static -all-static
455 else
456 tfshark_LDFLAGS = -export-dynamic
457 endif
458
459 # Libraries and plugin flags with which to link tfshark.
460 tfshark_LDADD = \
461         ui/cli/libcliui.a               \
462         ui/libui.a                      \
463         filetap/libfiletap.la           \
464         wiretap/libwiretap.la           \
465         epan/libwireshark.la            \
466         wsutil/libwsutil.la             \
467         @SSL_LIBS@                      \
468         $(plugin_ldadd)                 \
469         @GLIB_LIBS@ -lm                 \
470         @PCAP_LIBS@                     \
471         @SOCKET_LIBS@                   \
472         @NSL_LIBS@                      \
473         @KRB5_LIBS@                     \
474         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
475         @COREFOUNDATION_FRAMEWORKS@     \
476         @PY_LIBS@                       \
477         @LIBGNUTLS_LIBS@                \
478         @LIBSMI_LDFLAGS@
479 tfshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
480
481 if ENABLE_STATIC
482 rawshark_LDFLAGS = -Wl,-static -all-static
483 else
484 rawshark_LDFLAGS = -export-dynamic
485 endif
486
487 # Libraries and plugin flags with which to link rawshark.
488 rawshark_LDADD = \
489         ui/libui.a                      \
490         wiretap/libwiretap.la           \
491         epan/libwireshark.la            \
492         wsutil/libwsutil.la             \
493         @SSL_LIBS@                      \
494         $(plugin_ldadd)                 \
495         @GLIB_LIBS@ -lm                 \
496         @PCAP_LIBS@                     \
497         @SOCKET_LIBS@                   \
498         @NSL_LIBS@                      \
499         @C_ARES_LIBS@                   \
500         @ADNS_LIBS@                     \
501         @KRB5_LIBS@                     \
502         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
503         @COREFOUNDATION_FRAMEWORKS@     \
504         @PY_LIBS@                       \
505         @LIBGCRYPT_LIBS@                \
506         @LIBGNUTLS_LIBS@                \
507         @LIBSMI_LDFLAGS@
508 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
509
510 # Libraries with which to link text2pcap.
511 text2pcap_LDADD = \
512         wsutil/libwsutil.la             \
513         @GLIB_LIBS@ -lm
514 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
515 # which is generated (and therefore not always clean).
516 # We could generate text2pcap.o as a library with -Werror but for now it
517 # doesn't seem worth the effort.
518 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
519
520 # Libraries with which to link mergecap.
521 mergecap_LDADD = \
522         wiretap/libwiretap.la           \
523         wsutil/libwsutil.la             \
524         @GLIB_LIBS@
525 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS)
526
527 # Libraries with which to link capinfos.
528 capinfos_LDADD = \
529         wiretap/libwiretap.la           \
530         wsutil/libwsutil.la             \
531         @GLIB_LIBS@                     \
532         @LIBGCRYPT_LIBS@
533 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
534
535 # Libraries with which to link captype.
536 captype_LDADD = \
537         wiretap/libwiretap.la           \
538         wsutil/libwsutil.la             \
539         @GLIB_LIBS@
540 captype_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
541
542 # Libraries with which to link editcap.
543 editcap_LDADD = \
544         wiretap/libwiretap.la           \
545         wsutil/libwsutil.la             \
546         @GLIB_LIBS@
547 editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
548
549 # Libraries with which to link reordercap.
550 reordercap_LDADD = \
551         wiretap/libwiretap.la           \
552         wsutil/libwsutil.la             \
553         @GLIB_LIBS@
554 reordercap_CFLAGS = $(AM_CLEAN_CFLAGS)
555
556 # Libraries with which to link randpkt.
557 randpkt_LDADD = \
558         wiretap/libwiretap.la           \
559         wsutil/libwsutil.la             \
560         @GLIB_LIBS@ -lm                 \
561         @PCAP_LIBS@                     \
562         @SOCKET_LIBS@                   \
563         @NSL_LIBS@                      \
564         @C_ARES_LIBS@                   \
565         @ADNS_LIBS@
566 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
567
568 # Libraries and plugin flags with which to link dftest.
569 dftest_LDADD = \
570         ui/libui.a                      \
571         wiretap/libwiretap.la           \
572         wsutil/libwsutil.la             \
573         epan/libwireshark.la            \
574         @SSL_LIBS@                      \
575         $(plugin_ldadd)                 \
576         @GLIB_LIBS@ -lm                 \
577         @PCAP_LIBS@                     \
578         @SOCKET_LIBS@                   \
579         @NSL_LIBS@                      \
580         @C_ARES_LIBS@                   \
581         @ADNS_LIBS@                     \
582         @KRB5_LIBS@                     \
583         @PY_LIBS@                       \
584         @LIBGCRYPT_LIBS@                \
585         @LIBGNUTLS_LIBS@                \
586         @LIBSMI_LDFLAGS@
587 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
588
589 echld_test_LDADD = \
590         epan/libwireshark.la \
591         echld/libechld.la \
592         wsutil/libwsutil.la \
593         @GLIB_LIBS@ -lm                 \
594         @PCAP_LIBS@                     \
595         @SOCKET_LIBS@                   \
596         @NSL_LIBS@                      \
597         @C_ARES_LIBS@                   \
598         @ADNS_LIBS@
599
600 echld_test_DEPENDENCIES = \
601         echld/libechld.la \
602         epan/libwireshark.la
603
604 echld_test_CFLAGS = $(AM_CLEAN_CFLAGS)
605
606
607 # Libraries with which to link dumpcap.
608 dumpcap_LDADD = \
609         wsutil/libwsutil.la             \
610         @GLIB_LIBS@                     \
611         @PCAP_LIBS@                     \
612         @SOCKET_LIBS@                   \
613         @NSL_LIBS@                      \
614         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
615         @COREFOUNDATION_FRAMEWORKS@     \
616         @LIBCAP_LIBS@
617 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
618 dumpcap_LDFLAGS = $(PIE_LDFLAGS)
619
620 # Common headers
621 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
622         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS) \
623         @LUA_INCLUDES@ -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
624
625 #
626 # Build the version string
627 #
628 # FORCE is the portable version of .PHONY
629 FORCE:
630
631 AM_V_PERL = $(am__v_PERL_@AM_V@)
632 am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
633 am__v_PERL_0 = @echo "  PERL    " $@;
634 am__v_PERL_1 =
635
636 version.h: FORCE
637         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
638
639 #
640 # Build shell scripts by doing variable substitution.
641 # Taken from autoconf 2.13.
642 #
643 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
644
645 SUFFIXES = .sh
646 .sh:
647         rm -f $@ $@.tmp
648         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
649
650 services:
651         $(PYTHON) $(srcdir)/tools/make-services.py
652
653 CLEANFILES =            \
654         *~              \
655         doxygen-core.tag        \
656         vgcore.*
657
658 #
659 # We have to remove version.h with "make distclean", as, otherwise,
660 # "make distcheck" fails.  We still need to make the tarballs work
661 # even if you do "make distclean" and try to rebuild; that's a work in
662 # progress.
663 #
664 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
665 # list of files removed by "make distclean"?  (It's deliberately
666 # included in that list.)
667 #
668 DISTCLEANFILES = \
669         ps.c                    \
670         version.h
671
672 MAINTAINERCLEANFILES =          \
673         $(GENERATED_FILES)      \
674         Makefile.in             \
675         aclocal.m4              \
676         compile                 \
677         config.h.in             \
678         configure               \
679         depcomp                 \
680         install-sh              \
681         ltmain.sh               \
682         missing                 \
683         ylwrap
684
685 EXTRA_DIST = \
686         INSTALL.configure       \
687         Makefile.am.inc         \
688         Makefile.common         \
689         Makefile.nmake          \
690         Makefile.nmake.inc      \
691         README.aix              \
692         README.bsd              \
693         README.DECT             \
694         README.hpux             \
695         README.irix             \
696         README.linux            \
697         README.macos            \
698         README.tru64            \
699         README.vmware           \
700         README.windows          \
701         abi-descriptor.template \
702         aclocal-fallback/libsmi.m4 \
703         aclocal-fallback/libgcrypt.m4 \
704         aclocal-fallback/glib-2.0.m4 \
705         aclocal-fallback/gtk-2.0.m4 \
706         aclocal-fallback/gtk-3.0.m4 \
707         aclocal-flags           \
708         adns_dll.dep            \
709         adns_dll.rc             \
710         autogen.sh              \
711         capinfos.c              \
712         captype.c               \
713         capture_win_ifnames.c   \
714         capture_win_ifnames.h   \
715         capture-wpcap.c         \
716         capture-wpcap.h         \
717         capture_wpcap_packet.c  \
718         capture_wpcap_packet.h  \
719         cfilters                \
720         colorfilters            \
721         config.h.win32          \
722         config.nmake            \
723         debian/changelog        \
724         debian/compat           \
725         debian/control          \
726         debian/copyright        \
727         debian/dirs             \
728         debian/headers-check.c  \
729         debian/patches/00list   \
730         debian/postinst         \
731         debian/pycompat         \
732         debian/pyversions       \
733         debian/rules            \
734         debian/README.source    \
735         debian/tshark.files     \
736         debian/tshark.manpages  \
737         debian/watch            \
738         debian/wireshark-common.files \
739         debian/wireshark-common.manpages \
740         debian/wireshark-common.shlibs \
741         debian/wireshark-dev.docs \
742         debian/wireshark-dev.files \
743         debian/wireshark-dev.header-files \
744         debian/wireshark-dev.manpages \
745         debian/wireshark-dev.prerm \
746         debian/wireshark-root.desktop \
747         debian/wireshark.desktop \
748         debian/wireshark.files \
749         debian/wireshark.manpages \
750         debian/wireshark.menu   \
751         dfilters                \
752         doxygen.cfg.in          \
753         dumpcap.c       \
754         editcap.c               \
755         epan/print.ps           \
756         filetap/CMakeLists.txt  \
757         fix/FIX.xml             \
758         fix/FIX40.xml           \
759         fix/FIX41.xml           \
760         fix/FIX42.xml           \
761         fix/FIX43.xml           \
762         fix/FIX44.xml           \
763         fix/README              \
764         fix/Values.xsl          \
765         fix/hfDecl.xsl          \
766         fix/hfField.xsl         \
767         fix/hfList.xsl          \
768         idl/coseventcomm.idl    \
769         idl/cosnaming.idl       \
770         idl/tango.idl   \
771         idl/parlay/am.idl       \
772         idl/parlay/cccs.idl     \
773         idl/parlay/cm.idl       \
774         idl/parlay/common_cc_data.idl   \
775         idl/parlay/cs.idl       \
776         idl/parlay/dsc.idl      \
777         idl/parlay/fw_data.idl  \
778         idl/parlay/fw_if.idl    \
779         idl/parlay/fw_if_access.idl     \
780         idl/parlay/fw_if_app.idl        \
781         idl/parlay/fw_if_entop.idl      \
782         idl/parlay/fw_if_service.idl    \
783         idl/parlay/gcc_data.idl \
784         idl/parlay/gcc_interfaces.idl   \
785         idl/parlay/gms.idl      \
786         idl/parlay/mm.idl       \
787         idl/parlay/mmccs.idl    \
788         idl/parlay/mmm.idl      \
789         idl/parlay/mpcc_data.idl        \
790         idl/parlay/mpcc_interfaces.idl  \
791         idl/parlay/osa.idl      \
792         idl/parlay/pam_data.idl \
793         idl/parlay/pam_interfaces.idl   \
794         idl/parlay/Parlay.idl   \
795         idl/parlay/policy_data.idl      \
796         idl/parlay/policy_interfaces.idl        \
797         idl/parlay/README.parlay        \
798         idl/parlay/termcap.idl  \
799         idl/parlay/ui_data.idl  \
800         idl/parlay/ui_interfaces.idl    \
801         image/capinfos.rc.in    \
802         image/captype.rc.in     \
803         image/capture_comment.svg       \
804         image/capture_comment_add.png   \
805         image/capture_comment_disabled.png      \
806         image/capture_comment_update.png        \
807         image/capture_start_24.png              \
808         image/capture_start_active_24.png       \
809         image/capture_stop_24.png               \
810         image/clist_ascend.xpm                  \
811         image/clist_descend.xpm                 \
812         image/copy-8.png                        \
813         image/dfilter_apply_disabled.png        \
814         image/dfilter_apply_hover.png           \
815         image/dfilter_apply_normal.png          \
816         image/dfilter_apply_pressed.png         \
817         image/dfilter_bookmark_disabled.png     \
818         image/dfilter_bookmark_hover.png        \
819         image/dfilter_bookmark_normal.png       \
820         image/dfilter_bookmark_pressed.png      \
821         image/dfilter_dropdown.png              \
822         image/dfilter_erase_active.png          \
823         image/dfilter_erase_normal.png          \
824         image/dfilter_erase_selected.png        \
825         image/dfilter_refresh_active.png        \
826         image/dfilter_refresh_normal.png        \
827         image/display_filter.qrc                \
828         image/dumpcap.rc.in     \
829         image/editcap.rc.in     \
830         image/expert_chat.png   \
831         image/expert_error.png  \
832         image/expert_indicators.svg     \
833         image/expert_none.png   \
834         image/expert_note.png   \
835         image/expert_warn.png   \
836         image/file_dlg_win32.rc \
837         image/filetap.rc.in     \
838         image/hi16-app-wireshark.png    \
839         image/hi32-app-wireshark.png    \
840         image/hi48-app-wireshark.png    \
841         image/layout_1.png              \
842         image/layout_2.png              \
843         image/layout_3.png              \
844         image/layout_4.png              \
845         image/layout_5.png              \
846         image/layout_6.png              \
847         image/libwireshark.rc.in        \
848         image/libwsutil.rc.in           \
849         image/lo16-app-wireshark.png    \
850         image/lo32-app-wireshark.png    \
851         image/lo48-app-wireshark.png    \
852         image/Makefile.nmake                    \
853         image/mergecap.rc.in                    \
854         image/minus-8.png                       \
855         image/nsis-checked.bmp                  \
856         image/nsis-unchecked.bmp                \
857         image/openhand-16.png                   \
858         image/plus-8.png                        \
859         image/rawshark.rc.in                    \
860         image/README.image                      \
861         image/reordercap.rc.in                  \
862         image/rubberband-16.png                 \
863         image/status.qrc                        \
864         image/stock_dialog_error_48.xpm         \
865         image/stock_dialog_info_48.xpm          \
866         image/stock_dialog_question_48.xpm      \
867         image/stock_dialog_stop_48.xpm          \
868         image/stock_dialog_warning_48.xpm       \
869         image/text2pcap.rc.in                   \
870         image/toolbar.qrc                       \
871         image/toolbar/analyze_24.xpm            \
872         image/toolbar/audio_player_24.xpm       \
873         image/toolbar/autoscroll_24.xpm         \
874         image/toolbar/capture_airpcap_16.xpm    \
875         image/toolbar/capture_capture_16.xpm    \
876         image/toolbar/capture_details_16.xpm    \
877         image/toolbar/capture_details_24.xpm    \
878         image/toolbar/capture_ethernet_16.xpm   \
879         image/toolbar/capture_filter_24.xpm     \
880         image/toolbar/capture_interfaces_16.png \
881         image/toolbar/capture_interfaces_24.png \
882         image/toolbar/capture_options_16.png    \
883         image/toolbar/capture_options_24.png    \
884         image/toolbar/capture_prepare_16.xpm    \
885         image/toolbar/capture_restart_16.png    \
886         image/toolbar/capture_restart_24.png    \
887         image/toolbar/capture_start_16.png      \
888         image/toolbar/capture_start_24.png      \
889         image/toolbar/capture_stop_16.png       \
890         image/toolbar/capture_stop_24.png       \
891         image/toolbar/checkbox_16.xpm           \
892         image/toolbar/colorize_24.xpm           \
893         image/toolbar/conversations_16.xpm      \
894         image/toolbar/decode_24.xpm             \
895         image/toolbar/decode_as_16.xpm          \
896         image/toolbar/display_filter_24.xpm     \
897         image/toolbar/endpoints_16.xpm          \
898         image/toolbar/expert_info_16.xpm        \
899         image/toolbar/file_set_list_16.xpm      \
900         image/toolbar/file_set_next_16.xpm      \
901         image/toolbar/file_set_previous_16.xpm  \
902         image/toolbar/flow_graph_16.xpm \
903         image/toolbar/gnome_emblem_web_16.png   \
904         image/toolbar/gnome_emblem_web_24.png   \
905         image/toolbar/graphs_16.xpm     \
906         image/toolbar/icon_color_0.xpm  \
907         image/toolbar/icon_color_1.xpm  \
908         image/toolbar/icon_color_2.xpm  \
909         image/toolbar/icon_color_3.xpm  \
910         image/toolbar/icon_color_4.xpm  \
911         image/toolbar/icon_color_5.xpm  \
912         image/toolbar/icon_color_6.xpm  \
913         image/toolbar/icon_color_7.xpm  \
914         image/toolbar/icon_color_8.xpm  \
915         image/toolbar/icon_color_9.xpm  \
916         image/toolbar/internet_24.xpm   \
917         image/toolbar/modem_16.png      \
918         image/toolbar/modem_16.xpm      \
919         image/toolbar/network_bluetooth_16.png  \
920         image/toolbar/network_usb.svg           \
921         image/toolbar/network_usb_16.png        \
922         image/toolbar/network_virtual_16.xpm    \
923         image/toolbar/network_wired_16.png      \
924         image/toolbar/network_wireless_16.png   \
925         image/toolbar/pipe_16.png       \
926         image/toolbar/remote_arrow_16.png       \
927         image/toolbar/remote_globe_16.png       \
928         image/toolbar/remote_sat_16.png \
929         image/toolbar/resize_columns_24.xpm     \
930         image/toolbar/telephone_16.xpm  \
931         image/toolbar/telephony_16.xpm  \
932         image/toolbar/time_24.xpm       \
933         image/toolbar/toolbar_wireshark_file_16.png     \
934         image/toolbar/toolbar_wireshark_file_24.png     \
935         image/toolbar/voip_flow_24.xpm  \
936         image/toolbar/web_support_24.xpm        \
937         image/toolbar/wep_closed_24.xpm \
938         image/tshark.rc.in      \
939         image/voip_bg.xpm       \
940         image/voip_select.xpm   \
941         image/wireshark.exe.manifest.in \
942         image/wireshark.ico     \
943         image/wireshark.rc.in   \
944         image/wiresharkdoc.ico  \
945         image/wiresharkinst.ico \
946         image/WiresharkDoc-16.png       \
947         image/WiresharkDoc-24.png       \
948         image/WiresharkDoc-32.png       \
949         image/WiresharkDoc-48.png       \
950         image/WiresharkDoc-64.png       \
951         image/WiresharkDoc-128.png      \
952         image/WiresharkDoc-256.png      \
953         image/wiretap.rc.in     \
954         image/wsicon.svg        \
955         image/wsicon16.png      \
956         image/wsicon24.png      \
957         image/wsicon32.png      \
958         image/wsicon48.png      \
959         image/wsicon64.png      \
960         image/wsicon128.png     \
961         image/wsicon256.png     \
962         image/wsicon512.png     \
963         image/wsicon1024.png    \
964         image/wsicon-ask.png    \
965         image/wsicon-ask.svg    \
966         image/wsiconcap.svg     \
967         image/wsiconcap256.png  \
968         image/wsiconcap512.png  \
969         image/wsiconcap1024.png \
970         image/wsiconinst.svg    \
971         image/wsiconinst256.png \
972         image/wslogo-dev.svg    \
973         image/wslogo.eps        \
974         image/wslogo.svg        \
975         image/wssplash_dev.png  \
976         image/wssplash.png      \
977         ipmap.html              \
978         macosx-setup.sh         \
979         macosx-support-lib-patches/glib-gconvert.c.patch \
980         macosx-support-lib-patches/glib-pkgconfig.patch \
981         macosx-support-lib-patches/gnutls-pkgconfig.patch \
982         macosx-support-lib-patches/portaudio-pa_mac_core.h.patch \
983         macosx-support-lib-patches/portaudio-pa_mac_core.c.patch \
984         make-version.pl         \
985         manuf                   \
986         manuf.tmpl              \
987         mergecap.c              \
988         pdml2html.xsl           \
989         reordercap.c            \
990         smi_modules             \
991         text2pcap-scanner.l     \
992         text2pcap.h             \
993         services                \
994         wireshark.desktop       \
995         wireshark-mime-package.xml \
996         wka.tmpl                \
997         CMakeLists.txt          \
998         cmakeconfig.h.in        \
999         wsutil/CMakeLists.txt   \
1000         CMakeOptions.txt        \
1001         wiretap/CMakeLists.txt  \
1002         README.cmake            \
1003         ConfigureChecks.cmake   \
1004         cmake/modules/CMakeInstallDirs.cmake    \
1005         cmake/modules/COPYING-CMAKE-SCRIPTS     \
1006         cmake/modules/CheckCLinkerFlag.cmake    \
1007         cmake/modules/FeatureSummary.cmake      \
1008         cmake/modules/FindADNS.cmake            \
1009         cmake/modules/FindCAP.cmake             \
1010         cmake/modules/FindCARES.cmake           \
1011         cmake/modules/FindFOP.cmake             \
1012         cmake/modules/FindGCRYPT.cmake          \
1013         cmake/modules/FindGEOIP.cmake           \
1014         cmake/modules/FindGLIB2.cmake           \
1015         cmake/modules/FindGMODULE2.cmake        \
1016         cmake/modules/FindGNUTLS.cmake          \
1017         cmake/modules/FindGTHREAD2.cmake        \
1018         cmake/modules/FindGTK2.cmake            \
1019         cmake/modules/FindGTK3.cmake            \
1020         cmake/modules/FindHtmlViewer.cmake      \
1021         cmake/modules/FindKERBEROS.cmake        \
1022         cmake/modules/FindNL.cmake              \
1023         cmake/modules/FindLEX.cmake             \
1024         cmake/modules/FindLUA.cmake             \
1025         cmake/modules/FindLYNX.cmake            \
1026         cmake/modules/FindM.cmake               \
1027         cmake/modules/FindPCAP.cmake            \
1028         cmake/modules/FindPOD.cmake             \
1029         cmake/modules/FindPORTAUDIO.cmake       \
1030         cmake/modules/FindSED.cmake             \
1031         cmake/modules/FindSH.cmake              \
1032         cmake/modules/FindSMI.cmake             \
1033         cmake/modules/FindXMLLINT.cmake         \
1034         cmake/modules/FindXSLTPROC.cmake        \
1035         cmake/modules/FindYACC.cmake            \
1036         cmake/modules/FindYAPP.cmake            \
1037         cmake/modules/FindZLIB.cmake            \
1038         cmake/modules/LICENSE.txt               \
1039         cmake/modules/UseLemon.cmake            \
1040         cmake/modules/UseMakeDissectorReg.cmake \
1041         cmake/modules/UseMakeTapReg.cmake       \
1042         cmake/modules/readme.txt                \
1043         ui/win32/Makefile.nmake                 \
1044         ui/win32/console_win32.c                \
1045         ui/win32/console_win32.h                \
1046         ui/win32/file_dlg_win32.c               \
1047         ui/win32/file_dlg_win32.h               \
1048         ui/win32/print_win32.c                  \
1049         ui/win32/print_win32.h                  \
1050         ui/win32/settings.ini                   \
1051         CPackConfig.txt                         \
1052         all.vcproj                              \
1053         dumpcap.vcproj                          \
1054         packaging.vcproj                        \
1055         tshark.vcproj                           \
1056         wireshark.vcproj
1057
1058 install-exec-hook:
1059 if HAVE_DUMPCAP_GROUP
1060         -chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
1061 endif
1062 if SETCAP_INSTALL
1063         -$(SETCAP) cap_net_raw,cap_net_admin+ep $(DESTDIR)$(bindir)/dumpcap
1064         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
1065 else
1066 if SETUID_INSTALL
1067         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
1068         -chmod +s $(DESTDIR)$(bindir)/dumpcap
1069 endif
1070 endif
1071
1072
1073 DIST_SUBDIRS = asn1 codecs doc epan echld filetap ui ui/cli ui/gtk ui/qt help packaging plugins tools wiretap wsutil docbook
1074
1075 if HAVE_PLUGINS
1076 SUBDIRS = tools wsutil wiretap filetap epan @echld_dir@ plugins packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
1077 else
1078 SUBDIRS = tools wsutil wiretap filetap epan @echld_dir@ packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
1079 endif
1080
1081 help/faq.txt: $(srcdir)/help/faq.py
1082         $(AM_V_GEN)(cd help ; \
1083         $(MAKE) faq.txt ;)
1084
1085 libtool: $(LIBTOOL_DEPS)
1086         $(SHELL) ./config.status --recheck
1087
1088
1089 # Used by patch-bzip2
1090 # Trim off any extra version information and find the previous micro release.
1091 BASE_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
1092 PREV_VERSION=`echo "$(VERSION)" | awk -F. '{$$3 = $$3 + 0 ; if ($$3 > 0) $$3-- ; printf("%d.%d.%d"), $$1, $$2, $$3}'`
1093 PREV_DIR="wireshark-$(PREV_VERSION)"
1094 PREV_FILE="$(PREV_DIR).tar.bz2"
1095 PREV_URL="http://www.wireshark.org/download/src/all-versions/$(PREV_FILE)"
1096
1097 patch-bzip2: distdir
1098         if test x$(BASE_VERSION) != x$(PREV_VERSION) ; then \
1099                 curl -z $(PREV_FILE) -o $(PREV_FILE) $(PREV_URL) && \
1100                 tar -xjf $(PREV_FILE) && \
1101                 diff -urN $(PREV_DIR) $(distdir) | bzip2 > patch-wireshark-$(PREV_VERSION)-to-$(VERSION).bz2 && \
1102                 echo "Created patch-bzip2" ; \
1103                 rm -rf "$(PREV_FILE)" "$(PREV_DIR)" ; \
1104         else \
1105                 echo "This appears to be the first micro version ($(PREV_VERSION)). Skipping." ; \
1106         fi
1107         $(am__remove_distdir)
1108
1109 # Install some desktop files (for use with GNOME, KDE, or any other freedesktop.org-compliant desktops)
1110 # No, these do not go into $(datarootdir): the desktop won't look for them there.
1111 # Yes, that violate's autofoo's principle of relocatability.
1112 # What we (probably) should do is check `pkg-config --variable=prefix gtk+-2.0` to know where
1113 # to install this stuff...
1114 install_desktop_files:
1115         mkdir -p $(DESTDIR)/usr/share/{mime/packages,applications}
1116         install -m 644 -T wireshark-mime-package.xml $(DESTDIR)/usr/share/mime/packages/wireshark.xml
1117         if test x$(DESKTOP_FILE_INSTALL) != x ; then \
1118                 $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)/usr/share/applications wireshark.desktop; \
1119         else \
1120                 install -m 644 -T wireshark.desktop $(DESTDIR)/usr/share/applications/wireshark.desktop; \
1121         fi
1122         for size in 16 24 32 48 64 128 256; \
1123         do \
1124                 mkdir -p $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/{apps,mimetypes} ; \
1125                 install -m 644 image/wsicon$${size}.png  $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
1126                 install -m 644 -T image/WiresharkDoc-$${size}.png  $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
1127         done
1128         mkdir -p $(DESTDIR)/usr/share/icons/hicolor/scalable/apps
1129         install -m 644 image/wsicon.svg $(DESTDIR)/usr/share/icons/hicolor/scalable/apps/wireshark.svg
1130         @echo "Don't forget to run \"update-desktop-database\" and \"update-mime-database /usr/share/mime\""
1131
1132 # Used by svr4-package and osx-package
1133 # We load top_stagedir with an explicit path so that libtool doesn't freak.
1134 top_stagedir=`cd $(top_builddir) && pwd`/packaging/staging
1135 stagedir=$(top_stagedir)/$(PACKAGE).inst
1136
1137 host_cpu=@host_cpu@
1138 host_os=@host_os@
1139
1140 solaris-package: svr4-package
1141
1142 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
1143         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
1144                 rm -rf $(stagedir) ; \
1145                 $(MAKE) DESTDIR=$(stagedir) install; \
1146                 $(srcdir)/packaging/svr4/mkpkg \
1147                         $(PACKAGE) \
1148                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
1149                         $(prefix) \
1150                         $(top_stagedir) ; \
1151         else \
1152                 echo "Error: SVR4 packaging tools not found." ; \
1153                 echo "Package build abandoned." ; \
1154         fi
1155
1156
1157 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
1158 rpm-package: dist
1159         @if test x$(HAVE_RPM) = xyes ; then \
1160                 cd $(rpm_topdir) ; \
1161                 mkdir -p BUILD RPMS SOURCES SRPMS; \
1162                 cd SOURCES ; \
1163                 ln -sf ../../../$(distdir).tar.bz2 ; \
1164                 cd .. ; \
1165                 rpmbuild --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" \
1166                         @RPMBUILD_WITH_ARGS@ --clean -ba SPECS/wireshark.spec && \
1167                         echo "Package successfully built in `pwd`/RPMS." && \
1168                         rm -f SOURCES/$(distdir).tar.bz2 $(distdir).tar.bz2 ; \
1169         else \
1170                 echo "Error: RPM executable and/or source directory not found." ; \
1171                 false; \
1172         fi
1173
1174 debian-package: debian/rules
1175         @if test x$(HAVE_DPKG_BUILDPACKAGE) = xyes ; then \
1176                 dpkg-buildpackage -rfakeroot -us -uc ; \
1177         else \
1178                 echo "Error: Debian packaging tools not found." ; \
1179                 echo "Package build abandoned." ; \
1180         fi
1181
1182 # XXX - This assumes we're building from the source directory.
1183 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
1184         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1185                 rm -rf $(stagedir) ; \
1186                 $(MAKE) DESTDIR=$(stagedir) install; \
1187                 cd $(srcdir)/packaging/macosx ;  \
1188                 ./osx-app.sh @OSX_APP_FLAGS@ -bp ../staging/$(PACKAGE).inst$(bindir) ; \
1189         else \
1190                 echo "Error: OS X packaging tools not found." ; \
1191                 echo "Package build abandoned." ; \
1192         fi
1193
1194 packaging/macosx/COPYING.txt: COPYING
1195         (cd packaging/macosx ; \
1196         $(MAKE) COPYING.txt ;)
1197
1198 osx-package: osx-app packaging/macosx/COPYING.txt
1199         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1200                 cd $(srcdir)/packaging/macosx ;  \
1201                 chmod +x ./osx-dmg.sh ; \
1202                 ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
1203         fi
1204
1205 osx-install: osx-app
1206         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
1207                 echo "Copying Wireshark.app to /Applications" ; \
1208                 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ;  \
1209         fi
1210
1211 clean-local:
1212         rm -rf $(top_stagedir)
1213
1214 dumpabi:
1215         $(MAKE) -C filetap dumpabi-libfiletap
1216         $(MAKE) -C wiretap dumpabi-libwiretap
1217         $(MAKE) -C epan dumpabi-libwireshark
1218         $(MAKE) -C wsutil dumpabi-libwsutil
1219
1220 checkapi_local:
1221         $(PERL) tools/checkAPIs.pl -build \
1222         $(TSHARK_TAP_SRC) \
1223         $(wireshark_SOURCES)
1224 #       $(EXTRA_wireshark_SOURCES)
1225
1226 checkapi: checkapi_local
1227         cd wiretap && $(MAKE) checkapi
1228         cd filetap && $(MAKE) checkapi
1229         cd codecs && $(MAKE) checkapi
1230         cd ui && $(MAKE) checkapi
1231         cd ui/gtk && $(MAKE) checkapi
1232 ##      cd epan && $(MAKE) checkapi
1233 ##      cd epan/crypt && $(MAKE) checkapi
1234         cd epan/dfilter && $(MAKE) checkapi
1235 ##      cd epan/ftypes && $(MAKE) checkapi
1236 ##      cd epan/wslua && $(MAKE) checkapi
1237         cd epan/dissectors && $(MAKE) checkapi
1238         cd plugins && $(MAKE) checkapi
1239         cd wsutil && $(MAKE) checkapi
1240
1241 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1242 if HAVE_DOXYGEN
1243         rm -rf wsar_html
1244         cd epan && $(MAKE) $@
1245         cd ui && $(MAKE) $@
1246         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1247 endif
1248
1249 wsar-zip: wsar_html
1250 if HAVE_DOXYGEN
1251         rm -f wsar_html.zip
1252         zip -rq wsar_html.zip wsar_html
1253 endif
1254