SSH Dissector : Remove ssh_proto_tree_add_item (No longer needed)
[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 AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
23 ACLOCAL_AMFLAGS = `./aclocal-flags`
24
25 if HAVE_LIBPY
26 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
27 else
28 py_dissectors_dir = -DPYTHON_DIR=
29 endif
30
31
32 if HAVE_WARNINGS_AS_ERRORS
33 AM_CLEAN_CFLAGS = -Werror
34 endif
35
36 bin_PROGRAMS = \
37         @wireshark_bin@         \
38         @tshark_bin@            \
39         @tfshark_bin@           \
40         @text2pcap_bin@         \
41         @mergecap_bin@          \
42         @capinfos_bin@          \
43         @captype_bin@           \
44         @editcap_bin@           \
45         @randpkt_bin@           \
46         @dftest_bin@            \
47         @dumpcap_bin@           \
48         @reordercap_bin@        \
49         @rawshark_bin@          \
50         @echld_test_bin@
51
52 EXTRA_PROGRAMS = wireshark wireshark-qt tshark tfshark capinfos captype editcap \
53         mergecap dftest randpkt text2pcap dumpcap reordercap rawshark \
54         wireshark_cxx echld_test
55
56 #
57 # Wireshark configuration files are put in $(pkgdatadir).
58 #
59 dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
60         smi_modules ipmap.html pdml2html.xsl
61
62 #
63 # Install global profiles in the "profiles" subdirectory
64 #
65 profilesdir = $(pkgdatadir)
66 nobase_dist_profiles_DATA = \
67         profiles/Bluetooth/colorfilters \
68         profiles/Classic/colorfilters
69
70 #
71 # Install the Diameter DTD and XML files in the "diameter" subdirectory
72 # of that directory.
73 #
74 diameterdir = $(pkgdatadir)/diameter
75 include diameter/Custom.make
76 dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
77         diameter/chargecontrol.xml \
78         diameter/ChinaTelecom.xml \
79         diameter/Cisco.xml \
80         diameter/Custom.xml \
81         diameter/dictionary.dtd \
82         diameter/dictionary.xml \
83         diameter/eap.xml \
84         diameter/Ericsson.xml \
85         diameter/etsie2e4.xml \
86         diameter/gqpolicy.xml \
87         diameter/imscxdx.xml \
88         diameter/mobileipv4.xml \
89         diameter/mobileipv6.xml \
90         diameter/nasreq.xml \
91         diameter/sip.xml \
92         diameter/Starent.xml \
93         diameter/sunping.xml \
94         diameter/TGPPGmb.xml \
95         diameter/TGPPRx.xml \
96         diameter/TGPPS9.xml \
97         diameter/TGPPSh.xml \
98         diameter/Vodafone.xml \
99         diameter/AlcatelLucent.xml \
100         diameter/Nokia.xml \
101         diameter/NokiaSiemensNetworks.xml \
102         diameter/SKT.xml \
103         diameter/VerizonWireless.xml
104
105 #
106 # Install the DTDs directory files in the "dtds" subdirectory
107 # of that directory
108 #
109 dtdsdir = $(pkgdatadir)/dtds
110 dist_dtds_DATA = \
111         dtds/dc.dtd \
112         dtds/itunes.dtd \
113         dtds/mscml.dtd \
114         dtds/pocsettings.dtd \
115         dtds/presence.dtd \
116         dtds/reginfo.dtd \
117         dtds/rlmi.dtd \
118         dtds/rss.dtd \
119         dtds/smil.dtd \
120         dtds/xcap-caps.dtd \
121         dtds/xcap-error.dtd \
122         dtds/watcherinfo.dtd
123
124 #
125 # Install the RADIUS directory files in the "radius" subdirectory
126 # of that directory.
127 #
128 radiusdir = $(pkgdatadir)/radius
129 include radius/Custom.make
130 dist_radius_DATA = $(_CUSTOM_radius_dict_) \
131         radius/README.radius_dictionary  \
132         radius/custom.includes  \
133         radius/dictionary  \
134         radius/dictionary.3com  \
135         radius/dictionary.3gpp  \
136         radius/dictionary.3gpp2  \
137         radius/dictionary.acc  \
138         radius/dictionary.acme \
139         radius/dictionary.airespace \
140         radius/dictionary.alcatel  \
141         radius/dictionary.alcatel.esam \
142         radius/dictionary.alcatel.sr \
143         radius/dictionary.alcatel-lucent.aaa \
144         radius/dictionary.alcatel-lucent.xylan \
145         radius/dictionary.alteon  \
146         radius/dictionary.altiga  \
147         radius/dictionary.alvarion \
148         radius/dictionary.apc \
149         radius/dictionary.aptis  \
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.bintec  \
158         radius/dictionary.bristol  \
159         radius/dictionary.cablelabs  \
160         radius/dictionary.cabletron  \
161         radius/dictionary.chillispot \
162         radius/dictionary.cisco  \
163         radius/dictionary.cisco.bbsm  \
164         radius/dictionary.cisco.vpn3000  \
165         radius/dictionary.cisco.vpn5000  \
166         radius/dictionary.clavister \
167         radius/dictionary.colubris  \
168         radius/dictionary.columbia_university  \
169         radius/dictionary.compat  \
170         radius/dictionary.cosine  \
171         radius/dictionary.dhcp \
172         radius/dictionary.digium \
173         radius/dictionary.eltex \
174         radius/dictionary.epygi \
175         radius/dictionary.ericsson  \
176         radius/dictionary.erx  \
177         radius/dictionary.extreme  \
178         radius/dictionary.fortinet \
179         radius/dictionary.foundry  \
180         radius/dictionary.freeradius  \
181         radius/dictionary.freeradius.internal  \
182         radius/dictionary.freeswitch \
183         radius/dictionary.gandalf  \
184         radius/dictionary.garderos  \
185         radius/dictionary.gemtek  \
186         radius/dictionary.h3c \
187         radius/dictionary.hp \
188         radius/dictionary.huawei \
189         radius/dictionary.iea \
190         radius/dictionary.infonet \
191         radius/dictionary.ipunplugged \
192         radius/dictionary.issanni \
193         radius/dictionary.itk  \
194         radius/dictionary.jradius \
195         radius/dictionary.juniper  \
196         radius/dictionary.karlnet  \
197         radius/dictionary.lancom \
198         radius/dictionary.livingston  \
199         radius/dictionary.localweb  \
200         radius/dictionary.lucent \
201         radius/dictionary.manzara \
202         radius/dictionary.merit  \
203         radius/dictionary.microsoft  \
204         radius/dictionary.mikrotik  \
205         radius/dictionary.motorola \
206         radius/dictionary.motorola.wimax \
207         radius/dictionary.navini  \
208         radius/dictionary.netscreen  \
209         radius/dictionary.networkphysics \
210         radius/dictionary.nexans \
211         radius/dictionary.nokia  \
212         radius/dictionary.nokia.conflict \
213         radius/dictionary.nomadix  \
214         radius/dictionary.nortel \
215         radius/dictionary.ntua \
216         radius/dictionary.openser \
217         radius/dictionary.packeteer \
218         radius/dictionary.patton \
219         radius/dictionary.propel  \
220         radius/dictionary.prosoft \
221         radius/dictionary.quiconnect \
222         radius/dictionary.quintum  \
223         radius/dictionary.redback  \
224         radius/dictionary.redcreek  \
225         radius/dictionary.rfc2865 \
226         radius/dictionary.rfc2866 \
227         radius/dictionary.rfc2867 \
228         radius/dictionary.rfc2868 \
229         radius/dictionary.rfc2869 \
230         radius/dictionary.rfc3162 \
231         radius/dictionary.rfc3576 \
232         radius/dictionary.rfc3580 \
233         radius/dictionary.rfc4072 \
234         radius/dictionary.rfc4372 \
235         radius/dictionary.rfc4603 \
236         radius/dictionary.rfc4675 \
237         radius/dictionary.rfc4679 \
238         radius/dictionary.rfc4818 \
239         radius/dictionary.rfc4849 \
240         radius/dictionary.rfc5090 \
241         radius/dictionary.rfc5176 \
242         radius/dictionary.rfc5447 \
243         radius/dictionary.rfc5580 \
244         radius/dictionary.rfc5607 \
245         radius/dictionary.rfc5904 \
246         radius/dictionary.rfc6519 \
247         radius/dictionary.rfc6572 \
248         radius/dictionary.riverstone \
249         radius/dictionary.roaringpenguin \
250         radius/dictionary.shasta  \
251         radius/dictionary.shiva  \
252         radius/dictionary.slipstream \
253         radius/dictionary.sofaware \
254         radius/dictionary.sonicwall  \
255         radius/dictionary.springtide  \
256         radius/dictionary.starent  \
257         radius/dictionary.t_systems_nova  \
258         radius/dictionary.telebit  \
259         radius/dictionary.telkom \
260         radius/dictionary.trapeze  \
261         radius/dictionary.tropos \
262         radius/dictionary.ukerna  \
263         radius/dictionary.unix  \
264         radius/dictionary.usr  \
265         radius/dictionary.utstarcom \
266         radius/dictionary.valemount  \
267         radius/dictionary.versanet  \
268         radius/dictionary.vqp \
269         radius/dictionary.walabi \
270         radius/dictionary.waverider \
271         radius/dictionary.wichorus \
272         radius/dictionary.wimax  \
273         radius/dictionary.wimax.wichorus \
274         radius/dictionary.wispr  \
275         radius/dictionary.xedia \
276         radius/dictionary.zyxel
277
278 #
279 # Install the tpncp directory files in the "tpncp" subdirectory
280 # of that directory
281 #
282 tpncpdir = $(pkgdatadir)/tpncp
283 dist_tpncp_DATA = \
284         tpncp/tpncp.dat
285
286 #
287 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
288 # of that directory
289 #
290 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
291 dist_wimaxasncp_DATA = \
292         wimaxasncp/dictionary.xml \
293         wimaxasncp/dictionary.dtd
294
295 PLATFORM_PCAP_SRC = \
296         capture-pcap-util-unix.c
297
298 if HAVE_PLUGINS
299 -include plugins/Custom.make
300 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
301         -dlopen plugins/docsis/docsis.la \
302         -dlopen plugins/ethercat/ethercat.la \
303         -dlopen plugins/gryphon/gryphon.la \
304         -dlopen plugins/irda/irda.la \
305         -dlopen plugins/m2m/m2m.la \
306         -dlopen plugins/mate/mate.la \
307         -dlopen plugins/opcua/opcua.la \
308         -dlopen plugins/profinet/profinet.la \
309         -dlopen plugins/stats_tree/stats_tree.la \
310         -dlopen plugins/unistim/unistim.la \
311         -dlopen plugins/wimax/wimax.la \
312         -dlopen plugins/wimaxmacphy/wimaxmacphy.la
313
314 else            # HAVE_PLUGINS
315
316 plugin_ldadd =
317
318 endif           # HAVE_PLUGINS
319
320 include Makefile.common
321
322 if ENABLE_STATIC
323 if HAVE_GTK
324 wireshark_LDFLAGS = -Wl,-static -all-static
325 endif
326 if HAVE_Qt
327 wireshark_qt_LDFLAGS = -Wl,-static -all-static
328 endif
329 else
330 if HAVE_GTK
331 wireshark_LDFLAGS = -export-dynamic
332 endif
333 if HAVE_Qt
334 wireshark_qt_LDFLAGS = -export-dynamic
335 endif
336 endif
337
338 # Libraries and plugin flags with which to link wireshark.
339 #
340 # Note that Wireshark, when built with a version of GTK+ that runs
341 # atop X11, doesn't have to be linked with @SOCKET_LIBS@ or @NSL_LIBS@,
342 # as those should also be included in @GTK_LIBS@ (as those are also
343 # needed for X applications, and GTK+ applications are X applications
344 # if the version of GTK+ they're built with runs atop X11).
345 #
346 # However, it *does* have to be linked with @GLIB_LIBS@; not all of
347 # the necessary GLib libraries are included in @GTK_LIBS@.  To quote
348 # Gentoo bug 423743 at
349 #
350 #       https://bugs.gentoo.org/show_bug.cgi?id=423743
351 #
352 # "The Makefile.am claims including GLIB_LIBS when linking wireshark is
353 # unnecessary, because wireshark links to GTK_LIBS which is a superset.
354 # It is not actually a superset: gmodule is included in GLIB_LIBS but
355 # not in GTK_LIBS (unless accidentally on older glibs/gtks)."
356 #
357 # although it's also possible that -lgmodule is in GTK_LIBS but not
358 # GLIB_LIBS (that's the case on my machine right now, for example).
359 #
360 wireshark_ldadd = \
361         ui/libui.a                      \
362         ui/libui_dirty.a                \
363         codecs/libcodec.a               \
364         filetap/libfiletap.la           \
365         wiretap/libwiretap.la           \
366         epan/libwireshark.la            \
367         wsutil/libwsutil.la             \
368         @SSL_LIBS@                      \
369         $(plugin_ldadd)                 \
370         @PCAP_LIBS@                     \
371         @C_ARES_LIBS@                   \
372         @ADNS_LIBS@                     \
373         @KRB5_LIBS@                     \
374         @APPLICATIONSERVICES_FRAMEWORKS@        \
375         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
376         @COREFOUNDATION_FRAMEWORKS@     \
377         @PY_LIBS@                       \
378         @LIBGCRYPT_LIBS@                \
379         @LIBGNUTLS_LIBS@                \
380         @LIBSMI_LDFLAGS@                \
381         @PORTAUDIO_LIBS@                \
382         @GLIB_LIBS@                     \
383         -lm
384
385 if HAVE_Qt
386 wireshark_qt_SOURCES = $(WIRESHARK_COMMON_SRC)
387 wireshark_qt_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
388 wireshark_qt_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
389 wireshark_qt_LDADD = \
390         ui/qt/libqtui.a \
391         $(wireshark_ldadd) \
392         @Qt_LIBS@
393
394 #
395 # XXX - this makes wireshark_qt_LDFLAGS not work; we should figure out
396 # another way to get wireshark-qt linked as a C++ program, perhaps by
397 # having a top-level wireshark-qt.cpp file that contains main() and
398 # hthat calls the UI code from ui/qt.
399 #
400 wireshark_qt_LINK = $(CXXLINK)
401 endif
402
403 if HAVE_GTK
404 wireshark_SOURCES = $(WIRESHARK_COMMON_SRC)
405 wireshark_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
406 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
407 wireshark_LDADD = \
408         ui/gtk/libgtkui.a \
409         $(wireshark_ldadd) \
410         @GTK_LIBS@
411 endif
412
413 # Ideally we could trigger automatic c++ linking here with
414 #   nodist_EXTRA_wireshark_SOURCES = dummy.cpp
415 # Unfortunately that check is done by automake and not configure.
416 # We do the following to try to avoid using c++ to link Wireshark at
417 # all times.
418 nodist_EXTRA_wireshark_cxx_SOURCES = dummy.cpp
419 wireshark_cxx_SOURCES =
420
421 if ENABLE_STATIC
422 tshark_LDFLAGS = -Wl,-static -all-static
423 else
424 tshark_LDFLAGS = -export-dynamic
425 endif
426
427 # Libraries and plugin flags with which to link tshark.
428 tshark_LDADD = \
429         ui/cli/libcliui.a               \
430         ui/libui.a                      \
431         wiretap/libwiretap.la           \
432         epan/libwireshark.la            \
433         wsutil/libwsutil.la             \
434         @SSL_LIBS@                      \
435         $(plugin_ldadd)                 \
436         @GLIB_LIBS@                     \
437         @PCAP_LIBS@                     \
438         @SOCKET_LIBS@                   \
439         @NSL_LIBS@                      \
440         @C_ARES_LIBS@                   \
441         @ADNS_LIBS@                     \
442         @KRB5_LIBS@                     \
443         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
444         @COREFOUNDATION_FRAMEWORKS@     \
445         @PY_LIBS@                       \
446         @LIBGCRYPT_LIBS@                \
447         @LIBGNUTLS_LIBS@                \
448         @LIBSMI_LDFLAGS@                \
449         -lm
450 tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
451
452 if ENABLE_STATIC
453 tfshark_LDFLAGS = -Wl,-static -all-static
454 else
455 tfshark_LDFLAGS = -export-dynamic
456 endif
457
458 # Libraries and plugin flags with which to link tfshark.
459 tfshark_LDADD = \
460         ui/cli/libcliui.a               \
461         ui/libui.a                      \
462         filetap/libfiletap.la           \
463         wiretap/libwiretap.la           \
464         epan/libwireshark.la            \
465         wsutil/libwsutil.la             \
466         @SSL_LIBS@                      \
467         $(plugin_ldadd)                 \
468         @GLIB_LIBS@                     \
469         @PCAP_LIBS@                     \
470         @SOCKET_LIBS@                   \
471         @NSL_LIBS@                      \
472         @KRB5_LIBS@                     \
473         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
474         @COREFOUNDATION_FRAMEWORKS@     \
475         @PY_LIBS@                       \
476         @LIBGNUTLS_LIBS@                \
477         @LIBSMI_LDFLAGS@                \
478         -lm
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@                     \
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         -lm
509 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
510
511 # Libraries with which to link text2pcap.
512 text2pcap_LDADD = \
513         wsutil/libwsutil.la             \
514         @GLIB_LIBS@                     \
515         -lm
516 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
517 # which is generated (and therefore not always clean).
518 # We could generate text2pcap.o as a library with -Werror but for now it
519 # doesn't seem worth the effort.
520 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
521
522 # Libraries with which to link mergecap.
523 mergecap_LDADD = \
524         wiretap/libwiretap.la           \
525         wsutil/libwsutil.la             \
526         @GLIB_LIBS@
527 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS)
528
529 # Libraries with which to link capinfos.
530 capinfos_LDADD = \
531         wiretap/libwiretap.la           \
532         wsutil/libwsutil.la             \
533         @GLIB_LIBS@                     \
534         @LIBGCRYPT_LIBS@
535 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
536
537 # Libraries with which to link captype.
538 captype_LDADD = \
539         wiretap/libwiretap.la           \
540         wsutil/libwsutil.la             \
541         @GLIB_LIBS@
542 captype_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
543
544 # Libraries with which to link editcap.
545 editcap_LDADD = \
546         wiretap/libwiretap.la           \
547         wsutil/libwsutil.la             \
548         @GLIB_LIBS@
549 editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
550
551 # Libraries with which to link reordercap.
552 reordercap_LDADD = \
553         wiretap/libwiretap.la           \
554         wsutil/libwsutil.la             \
555         @GLIB_LIBS@
556 reordercap_CFLAGS = $(AM_CLEAN_CFLAGS)
557
558 # Libraries with which to link randpkt.
559 randpkt_LDADD = \
560         wiretap/libwiretap.la           \
561         wsutil/libwsutil.la             \
562         @GLIB_LIBS@                     \
563         @PCAP_LIBS@                     \
564         @SOCKET_LIBS@                   \
565         @NSL_LIBS@                      \
566         @C_ARES_LIBS@                   \
567         @ADNS_LIBS@                     \
568         -lm
569 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
570
571 # Libraries and plugin flags with which to link dftest.
572 dftest_LDADD = \
573         ui/libui.a                      \
574         wiretap/libwiretap.la           \
575         wsutil/libwsutil.la             \
576         epan/libwireshark.la            \
577         @SSL_LIBS@                      \
578         $(plugin_ldadd)                 \
579         @GLIB_LIBS@                     \
580         @PCAP_LIBS@                     \
581         @SOCKET_LIBS@                   \
582         @NSL_LIBS@                      \
583         @C_ARES_LIBS@                   \
584         @ADNS_LIBS@                     \
585         @KRB5_LIBS@                     \
586         @PY_LIBS@                       \
587         @LIBGCRYPT_LIBS@                \
588         @LIBGNUTLS_LIBS@                \
589         @LIBSMI_LDFLAGS@                \
590         -lm
591 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
592
593 echld_test_LDADD = \
594         epan/libwireshark.la            \
595         echld/libechld.la               \
596         wsutil/libwsutil.la             \
597         @GLIB_LIBS@                     \
598         @PCAP_LIBS@                     \
599         @SOCKET_LIBS@                   \
600         @NSL_LIBS@                      \
601         @C_ARES_LIBS@                   \
602         @ADNS_LIBS@                     \
603         -lm
604
605 echld_test_DEPENDENCIES = \
606         echld/libechld.la \
607         epan/libwireshark.la
608
609 echld_test_CFLAGS = $(AM_CLEAN_CFLAGS)
610
611
612 # Libraries with which to link dumpcap.
613 dumpcap_LDADD = \
614         wsutil/libwsutil.la             \
615         @GLIB_LIBS@                     \
616         @PCAP_LIBS@                     \
617         @SOCKET_LIBS@                   \
618         @NSL_LIBS@                      \
619         @SYSTEMCONFIGURATION_FRAMEWORKS@        \
620         @COREFOUNDATION_FRAMEWORKS@     \
621         @LIBCAP_LIBS@
622 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(PIE_CFLAGS)
623 dumpcap_LDFLAGS = $(PIE_LDFLAGS)
624
625 # Common headers
626 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
627         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS) \
628         @LUA_INCLUDES@ -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
629
630 #
631 # Build the version string
632 #
633 # FORCE is the portable version of .PHONY
634 FORCE:
635
636 AM_V_PERL = $(am__v_PERL_@AM_V@)
637 am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
638 am__v_PERL_0 = @echo "  PERL    " $@;
639 am__v_PERL_1 =
640
641 version.h: FORCE
642         $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
643
644 #
645 # Build shell scripts by doing variable substitution.
646 # Taken from autoconf 2.13.
647 #
648 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
649
650 SUFFIXES = .sh
651 .sh:
652         rm -f $@ $@.tmp
653         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
654
655 services:
656         $(PYTHON) $(srcdir)/tools/make-services.py
657
658 CLEANFILES =            \
659         *~              \
660         doxygen-core.tag        \
661         vgcore.*
662
663 #
664 # We have to remove version.h with "make distclean", as, otherwise,
665 # "make distcheck" fails.  We still need to make the tarballs work
666 # even if you do "make distclean" and try to rebuild; that's a work in
667 # progress.
668 #
669 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
670 # list of files removed by "make distclean"?  (It's deliberately
671 # included in that list.)
672 #
673 DISTCLEANFILES = \
674         ps.c                    \
675         version.h
676
677 MAINTAINERCLEANFILES =          \
678         $(GENERATED_FILES)      \
679         Makefile.in             \
680         aclocal.m4              \
681         compile                 \
682         config.h.in             \
683         configure               \
684         depcomp                 \
685         install-sh              \
686         ltmain.sh               \
687         missing                 \
688         ylwrap
689
690 EXTRA_DIST = \
691         INSTALL.configure       \
692         Makefile.am.inc         \
693         Makefile.common         \
694         Makefile.nmake          \
695         Makefile.nmake.inc      \
696         README.aix              \
697         README.bsd              \
698         README.DECT             \
699         README.hpux             \
700         README.irix             \
701         README.linux            \
702         README.macos            \
703         README.tru64            \
704         README.vmware           \
705         README.windows          \
706         abi-descriptor.template \
707         aclocal-fallback/libsmi.m4 \
708         aclocal-fallback/libgcrypt.m4 \
709         aclocal-fallback/glib-2.0.m4 \
710         aclocal-fallback/gtk-2.0.m4 \
711         aclocal-fallback/gtk-3.0.m4 \
712         aclocal-flags           \
713         adns_dll.dep            \
714         adns_dll.rc             \
715         autogen.sh              \
716         capinfos.c              \
717         captype.c               \
718         capture_win_ifnames.c   \
719         capture_win_ifnames.h   \
720         capture-wpcap.c         \
721         capture-wpcap.h         \
722         capture_wpcap_packet.c  \
723         capture_wpcap_packet.h  \
724         cfilters                \
725         colorfilters            \
726         config.h.win32          \
727         config.nmake            \
728         debian/changelog        \
729         debian/compat           \
730         debian/control          \
731         debian/copyright        \
732         debian/dirs             \
733         debian/headers-check.c  \
734         debian/patches/00list   \
735         debian/postinst         \
736         debian/pycompat         \
737         debian/pyversions       \
738         debian/rules            \
739         debian/README.source    \
740         debian/tshark.files     \
741         debian/tshark.manpages  \
742         debian/watch            \
743         debian/wireshark-common.files \
744         debian/wireshark-common.manpages \
745         debian/wireshark-common.shlibs \
746         debian/wireshark-dev.docs \
747         debian/wireshark-dev.files \
748         debian/wireshark-dev.header-files \
749         debian/wireshark-dev.manpages \
750         debian/wireshark-dev.prerm \
751         debian/wireshark-root.desktop \
752         debian/wireshark.desktop \
753         debian/wireshark.files \
754         debian/wireshark.manpages \
755         debian/wireshark.menu   \
756         dfilters                \
757         doxygen.cfg.in          \
758         dumpcap.c       \
759         editcap.c               \
760         epan/print.ps           \
761         filetap/CMakeLists.txt  \
762         fix/FIX.xml             \
763         fix/FIX40.xml           \
764         fix/FIX41.xml           \
765         fix/FIX42.xml           \
766         fix/FIX43.xml           \
767         fix/FIX44.xml           \
768         fix/README              \
769         fix/Values.xsl          \
770         fix/hfDecl.xsl          \
771         fix/hfField.xsl         \
772         fix/hfList.xsl          \
773         idl/coseventcomm.idl    \
774         idl/cosnaming.idl       \
775         idl/tango.idl   \
776         idl/parlay/am.idl       \
777         idl/parlay/cccs.idl     \
778         idl/parlay/cm.idl       \
779         idl/parlay/common_cc_data.idl   \
780         idl/parlay/cs.idl       \
781         idl/parlay/dsc.idl      \
782         idl/parlay/fw_data.idl  \
783         idl/parlay/fw_if.idl    \
784         idl/parlay/fw_if_access.idl     \
785         idl/parlay/fw_if_app.idl        \
786         idl/parlay/fw_if_entop.idl      \
787         idl/parlay/fw_if_service.idl    \
788         idl/parlay/gcc_data.idl \
789         idl/parlay/gcc_interfaces.idl   \
790         idl/parlay/gms.idl      \
791         idl/parlay/mm.idl       \
792         idl/parlay/mmccs.idl    \
793         idl/parlay/mmm.idl      \
794         idl/parlay/mpcc_data.idl        \
795         idl/parlay/mpcc_interfaces.idl  \
796         idl/parlay/osa.idl      \
797         idl/parlay/pam_data.idl \
798         idl/parlay/pam_interfaces.idl   \
799         idl/parlay/Parlay.idl   \
800         idl/parlay/policy_data.idl      \
801         idl/parlay/policy_interfaces.idl        \
802         idl/parlay/README.parlay        \
803         idl/parlay/termcap.idl  \
804         idl/parlay/ui_data.idl  \
805         idl/parlay/ui_interfaces.idl    \
806         image/capinfos.rc.in    \
807         image/captype.rc.in     \
808         image/capture_comment.svg       \
809         image/capture_comment_add.png   \
810         image/capture_comment_disabled.png      \
811         image/capture_comment_update.png        \
812         image/capture_start_24.png              \
813         image/capture_start_active_24.png       \
814         image/capture_stop_24.png               \
815         image/clist_ascend.xpm                  \
816         image/clist_descend.xpm                 \
817         image/copy-8.png                        \
818         image/dfilter_apply_disabled.png        \
819         image/dfilter_apply_hover.png           \
820         image/dfilter_apply_normal.png          \
821         image/dfilter_apply_pressed.png         \
822         image/dfilter_bookmark_disabled.png     \
823         image/dfilter_bookmark_hover.png        \
824         image/dfilter_bookmark_normal.png       \
825         image/dfilter_bookmark_pressed.png      \
826         image/dfilter_dropdown.png              \
827         image/dfilter_erase_active.png          \
828         image/dfilter_erase_normal.png          \
829         image/dfilter_erase_selected.png        \
830         image/dfilter_refresh_active.png        \
831         image/dfilter_refresh_normal.png        \
832         image/display_filter.qrc                \
833         image/dumpcap.rc.in     \
834         image/editcap.rc.in     \
835         image/expert_chat.png   \
836         image/expert_error.png  \
837         image/expert_indicators.svg     \
838         image/expert_none.png   \
839         image/expert_note.png   \
840         image/expert_warn.png   \
841         image/file_dlg_win32.rc \
842         image/filetap.rc.in     \
843         image/hi16-app-wireshark.png    \
844         image/hi32-app-wireshark.png    \
845         image/hi48-app-wireshark.png    \
846         image/layout_1.png              \
847         image/layout_2.png              \
848         image/layout_3.png              \
849         image/layout_4.png              \
850         image/layout_5.png              \
851         image/layout_6.png              \
852         image/libwireshark.rc.in        \
853         image/libwsutil.rc.in           \
854         image/lo16-app-wireshark.png    \
855         image/lo32-app-wireshark.png    \
856         image/lo48-app-wireshark.png    \
857         image/Makefile.nmake                    \
858         image/mergecap.rc.in                    \
859         image/minus-8.png                       \
860         image/nsis-checked.bmp                  \
861         image/nsis-unchecked.bmp                \
862         image/openhand-16.png                   \
863         image/plus-8.png                        \
864         image/rawshark.rc.in                    \
865         image/README.image                      \
866         image/reordercap.rc.in                  \
867         image/rubberband-16.png                 \
868         image/status.qrc                        \
869         image/stock_dialog_error_48.xpm         \
870         image/stock_dialog_info_48.xpm          \
871         image/stock_dialog_question_48.xpm      \
872         image/stock_dialog_stop_48.xpm          \
873         image/stock_dialog_warning_48.xpm       \
874         image/text2pcap.rc.in                   \
875         image/tfshark.rc.in                     \
876         image/toolbar.qrc                       \
877         image/toolbar/analyze_24.xpm            \
878         image/toolbar/audio_player_24.xpm       \
879         image/toolbar/autoscroll_24.xpm         \
880         image/toolbar/capture_airpcap_16.xpm    \
881         image/toolbar/capture_capture_16.xpm    \
882         image/toolbar/capture_details_16.xpm    \
883         image/toolbar/capture_details_24.xpm    \
884         image/toolbar/capture_ethernet_16.xpm   \
885         image/toolbar/capture_filter_24.xpm     \
886         image/toolbar/capture_interfaces_16.png \
887         image/toolbar/capture_interfaces_24.png \
888         image/toolbar/capture_options_16.png    \
889         image/toolbar/capture_options_24.png    \
890         image/toolbar/capture_prepare_16.xpm    \
891         image/toolbar/capture_restart_16.png    \
892         image/toolbar/capture_restart_24.png    \
893         image/toolbar/capture_start_16.png      \
894         image/toolbar/capture_start_24.png      \
895         image/toolbar/capture_stop_16.png       \
896         image/toolbar/capture_stop_24.png       \
897         image/toolbar/checkbox_16.xpm           \
898         image/toolbar/colorize_24.xpm           \
899         image/toolbar/conversations_16.xpm      \
900         image/toolbar/decode_24.xpm             \
901         image/toolbar/decode_as_16.xpm          \
902         image/toolbar/display_filter_24.xpm     \
903         image/toolbar/endpoints_16.xpm          \
904         image/toolbar/expert_info_16.xpm        \
905         image/toolbar/file_set_list_16.xpm      \
906         image/toolbar/file_set_next_16.xpm      \
907         image/toolbar/file_set_previous_16.xpm  \
908         image/toolbar/flow_graph_16.xpm \
909         image/toolbar/gnome_emblem_web_16.png   \
910         image/toolbar/gnome_emblem_web_24.png   \
911         image/toolbar/graphs_16.xpm     \
912         image/toolbar/icon_color_0.xpm  \
913         image/toolbar/icon_color_1.xpm  \
914         image/toolbar/icon_color_2.xpm  \
915         image/toolbar/icon_color_3.xpm  \
916         image/toolbar/icon_color_4.xpm  \
917         image/toolbar/icon_color_5.xpm  \
918         image/toolbar/icon_color_6.xpm  \
919         image/toolbar/icon_color_7.xpm  \
920         image/toolbar/icon_color_8.xpm  \
921         image/toolbar/icon_color_9.xpm  \
922         image/toolbar/internet_24.xpm   \
923         image/toolbar/modem_16.png      \
924         image/toolbar/modem_16.xpm      \
925         image/toolbar/network_bluetooth_16.png  \
926         image/toolbar/network_usb.svg           \
927         image/toolbar/network_usb_16.png        \
928         image/toolbar/network_virtual_16.xpm    \
929         image/toolbar/network_wired_16.png      \
930         image/toolbar/network_wireless_16.png   \
931         image/toolbar/pipe_16.png       \
932         image/toolbar/remote_arrow_16.png       \
933         image/toolbar/remote_globe_16.png       \
934         image/toolbar/remote_sat_16.png \
935         image/toolbar/resize_columns_24.xpm     \
936         image/toolbar/telephone_16.xpm  \
937         image/toolbar/telephony_16.xpm  \
938         image/toolbar/time_24.xpm       \
939         image/toolbar/toolbar_wireshark_file_16.png     \
940         image/toolbar/toolbar_wireshark_file_24.png     \
941         image/toolbar/voip_flow_24.xpm  \
942         image/toolbar/web_support_24.xpm        \
943         image/toolbar/wep_closed_24.xpm \
944         image/tshark.rc.in      \
945         image/voip_select.xpm   \
946         image/wireshark.exe.manifest.in \
947         image/wireshark.ico     \
948         image/wireshark.rc.in   \
949         image/wiresharkdoc.ico  \
950         image/wiresharkinst.ico \
951         image/WiresharkDoc-16.png       \
952         image/WiresharkDoc-24.png       \
953         image/WiresharkDoc-32.png       \
954         image/WiresharkDoc-48.png       \
955         image/WiresharkDoc-64.png       \
956         image/WiresharkDoc-128.png      \
957         image/WiresharkDoc-256.png      \
958         image/wiretap.rc.in     \
959         image/wsicon.svg        \
960         image/wsicon16.png      \
961         image/wsicon24.png      \
962         image/wsicon32.png      \
963         image/wsicon48.png      \
964         image/wsicon64.png      \
965         image/wsicon128.png     \
966         image/wsicon256.png     \
967         image/wsicon512.png     \
968         image/wsicon1024.png    \
969         image/wsicon-ask.png    \
970         image/wsicon-ask.svg    \
971         image/wsiconcap.svg     \
972         image/wsiconcap256.png  \
973         image/wsiconcap512.png  \
974         image/wsiconcap1024.png \
975         image/wsiconinst.svg    \
976         image/wsiconinst256.png \
977         image/wslogo-dev.svg    \
978         image/wslogo.eps        \
979         image/wslogo.svg        \
980         image/wssplash_dev.png  \
981         image/wssplash.png      \
982         ipmap.html              \
983         macosx-setup.sh         \
984         macosx-support-lib-patches/glib-gconvert.c.patch \
985         macosx-support-lib-patches/glib-pkgconfig.patch \
986         macosx-support-lib-patches/gnutls-pkgconfig.patch \
987         macosx-support-lib-patches/portaudio-pa_mac_core.h.patch \
988         macosx-support-lib-patches/portaudio-pa_mac_core.c.patch \
989         make-version.pl         \
990         manuf                   \
991         manuf.tmpl              \
992         mergecap.c              \
993         pdml2html.xsl           \
994         reordercap.c            \
995         smi_modules             \
996         text2pcap-scanner.l     \
997         text2pcap.h             \
998         services                \
999         wireshark.desktop       \
1000         wireshark-mime-package.xml \
1001         wka.tmpl                \
1002         CMakeLists.txt          \
1003         cmakeconfig.h.in        \
1004         wsutil/CMakeLists.txt   \
1005         CMakeOptions.txt        \
1006         wiretap/CMakeLists.txt  \
1007         README.cmake            \
1008         ConfigureChecks.cmake   \
1009         cmake/modules/CMakeInstallDirs.cmake    \
1010         cmake/modules/COPYING-CMAKE-SCRIPTS     \
1011         cmake/modules/CheckCLinkerFlag.cmake    \
1012         cmake/modules/FeatureSummary.cmake      \
1013         cmake/modules/FindADNS.cmake            \
1014         cmake/modules/FindCAP.cmake             \
1015         cmake/modules/FindCARES.cmake           \
1016         cmake/modules/FindFOP.cmake             \
1017         cmake/modules/FindGCRYPT.cmake          \
1018         cmake/modules/FindGEOIP.cmake           \
1019         cmake/modules/FindGLIB2.cmake           \
1020         cmake/modules/FindGMODULE2.cmake        \
1021         cmake/modules/FindGNUTLS.cmake          \
1022         cmake/modules/FindGTHREAD2.cmake        \
1023         cmake/modules/FindGTK2.cmake            \
1024         cmake/modules/FindGTK3.cmake            \
1025         cmake/modules/FindHtmlViewer.cmake      \
1026         cmake/modules/FindKERBEROS.cmake        \
1027         cmake/modules/FindNL.cmake              \
1028         cmake/modules/FindLEX.cmake             \
1029         cmake/modules/FindLUA.cmake             \
1030         cmake/modules/FindLYNX.cmake            \
1031         cmake/modules/FindM.cmake               \
1032         cmake/modules/FindPCAP.cmake            \
1033         cmake/modules/FindPOD.cmake             \
1034         cmake/modules/FindPORTAUDIO.cmake       \
1035         cmake/modules/FindSED.cmake             \
1036         cmake/modules/FindSH.cmake              \
1037         cmake/modules/FindSMI.cmake             \
1038         cmake/modules/FindXMLLINT.cmake         \
1039         cmake/modules/FindXSLTPROC.cmake        \
1040         cmake/modules/FindYACC.cmake            \
1041         cmake/modules/FindYAPP.cmake            \
1042         cmake/modules/FindZLIB.cmake            \
1043         cmake/modules/LICENSE.txt               \
1044         cmake/modules/UseLemon.cmake            \
1045         cmake/modules/UseMakeDissectorReg.cmake \
1046         cmake/modules/UseMakeTapReg.cmake       \
1047         cmake/modules/readme.txt                \
1048         ui/win32/Makefile.nmake                 \
1049         ui/win32/console_win32.c                \
1050         ui/win32/console_win32.h                \
1051         ui/win32/file_dlg_win32.c               \
1052         ui/win32/file_dlg_win32.h               \
1053         ui/win32/print_win32.c                  \
1054         ui/win32/print_win32.h                  \
1055         ui/win32/settings.ini                   \
1056         CPackConfig.txt
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) $(top_srcdir)/tools/checkAPIs.pl -build \
1222         -sourcedir=$(srcdir) \
1223         $(TSHARK_TAP_SRC) \
1224         $(wireshark_SOURCES)
1225 #       $(EXTRA_wireshark_SOURCES)
1226
1227 checkapi: checkapi_local
1228         cd wiretap && $(MAKE) checkapi
1229         cd filetap && $(MAKE) checkapi
1230         cd codecs && $(MAKE) checkapi
1231         cd ui && $(MAKE) checkapi
1232         cd ui/gtk && $(MAKE) checkapi
1233 ##      cd epan && $(MAKE) checkapi
1234 ##      cd epan/crypt && $(MAKE) checkapi
1235         cd epan/dfilter && $(MAKE) checkapi
1236 ##      cd epan/ftypes && $(MAKE) checkapi
1237 ##      cd epan/wslua && $(MAKE) checkapi
1238         cd epan/dissectors && $(MAKE) checkapi
1239         cd plugins && $(MAKE) checkapi
1240         cd wsutil && $(MAKE) checkapi
1241
1242 wsar_html: doxygen.cfg doxygen_global.cfg FORCE
1243 if HAVE_DOXYGEN
1244         rm -rf wsar_html
1245         cd epan && $(MAKE) $@
1246         cd ui && $(MAKE) $@
1247         (umask 022 ; $(DOXYGEN) doxygen.cfg)
1248 endif
1249
1250 wsar-zip: wsar_html
1251 if HAVE_DOXYGEN
1252         rm -f wsar_html.zip
1253         zip -rq wsar_html.zip wsar_html
1254 endif
1255