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