Do the Python embedding similarly to other "default = yes, if available"
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Wireshark
3 #
4 # $Id$
5 #
6 # Wireshark - Network traffic analyzer
7 # By Gerald Combs <gerald@wireshark.org>
8 # Copyright 1998 Gerald Combs
9 #
10 # This program is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License
12 # as published by the Free Software Foundation; either version 2
13 # of the License, or (at your option) any later version.
14 #
15 # This program is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 # GNU General Public License for more details.
19 #
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write to the Free Software
22 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
23
24 ACLOCAL_AMFLAGS = `./aclocal-flags`
25
26 INCLUDES= @LUA_INCLUDES@
27
28 if HAVE_LIBPY
29 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
30 else
31 py_dissectors_dir = -DPYTHON_DIR=
32 endif
33
34
35 if HAVE_WARNINGS_AS_ERRORS
36 AM_CLEAN_CFLAGS = -Werror
37 endif
38
39 bin_PROGRAMS = \
40         @wireshark_bin@ \
41         @tshark_bin@    \
42         @text2pcap_bin@ \
43         @mergecap_bin@  \
44         @capinfos_bin@  \
45         @editcap_bin@   \
46         @randpkt_bin@   \
47         @dftest_bin@    \
48         @dumpcap_bin@   \
49         @rawshark_bin@
50 bin_SCRIPTS = @idl2wrs_bin@
51
52 EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
53         randpkt text2pcap dumpcap rawshark
54 EXTRA_SCRIPTS = idl2wrs
55
56 idl2wrs: tools/idl2wrs.sh Makefile
57         cp tools/idl2wrs.sh idl2wrs
58         chmod +x idl2wrs
59
60 #
61 # Wireshark configuration files are put in $(pkgdatadir).
62 #
63 pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
64         smi_modules ipmap.html pdml2html.xsl
65
66 #
67 # Install the Diameter DTD and XML files in the "diameter" subdirectory
68 # of that directory.
69 #
70 diameterdir = $(pkgdatadir)/diameter
71 diameter_DATA = \
72         diameter/chargecontrol.xml \
73         diameter/Cisco.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/sunping.xml \
86         diameter/TGPPGmb.xml \
87         diameter/TGPPRx.xml \
88         diameter/TGPPSh.xml     \
89         diameter/Vodafone.xml
90
91 #
92 # Install the DTDs directory files in the "dtds" subdirectory
93 # of that directory
94 #
95 dtdsdir = $(pkgdatadir)/dtds
96 dtds_DATA = \
97         dtds/dc.dtd \
98         dtds/itunes.dtd \
99         dtds/mscml.dtd \
100         dtds/pocsettings.dtd \
101         dtds/presence.dtd \
102         dtds/reginfo.dtd \
103         dtds/rlmi.dtd \
104         dtds/rss.dtd \
105         dtds/smil.dtd \
106         dtds/xcap-caps.dtd \
107         dtds/xcap-error.dtd \
108         dtds/watcherinfo.dtd
109
110 #
111 # Install the RADIUS directory files in the "radius" subdirectory
112 # of that directory.
113 #
114 radiusdir = $(pkgdatadir)/radius
115 radius_DATA = \
116         radius/README.radius_dictionary  \
117         radius/dictionary  \
118         radius/dictionary.3com  \
119         radius/dictionary.3gpp  \
120         radius/dictionary.3gpp2  \
121         radius/dictionary.acc  \
122         radius/dictionary.acme \
123         radius/dictionary.airespace \
124         radius/dictionary.alcatel  \
125         radius/dictionary.alcatel.esam \
126         radius/dictionary.alcatel.sr \
127         radius/dictionary.alteon  \
128         radius/dictionary.altiga  \
129         radius/dictionary.alvarion \
130         radius/dictionary.apc \
131         radius/dictionary.aptis  \
132         radius/dictionary.aruba  \
133         radius/dictionary.ascend  \
134         radius/dictionary.asn \
135         radius/dictionary.audiocodes \
136         radius/dictionary.avaya \
137         radius/dictionary.azaire \
138         radius/dictionary.bay  \
139         radius/dictionary.bintec  \
140         radius/dictionary.bristol  \
141         radius/dictionary.cablelabs  \
142         radius/dictionary.cabletron  \
143         radius/dictionary.chillispot \
144         radius/dictionary.cisco  \
145         radius/dictionary.cisco.bbsm  \
146         radius/dictionary.cisco.vpn3000  \
147         radius/dictionary.cisco.vpn5000  \
148         radius/dictionary.clavister \
149         radius/dictionary.colubris  \
150         radius/dictionary.columbia_university  \
151         radius/dictionary.compat  \
152         radius/dictionary.cosine  \
153         radius/dictionary.dhcp \
154         radius/dictionary.digium \
155         radius/dictionary.eltex \
156         radius/dictionary.epygi \
157         radius/dictionary.ericsson  \
158         radius/dictionary.erx  \
159         radius/dictionary.extreme  \
160         radius/dictionary.fortinet \
161         radius/dictionary.foundry  \
162         radius/dictionary.freeradius  \
163         radius/dictionary.freeradius.internal  \
164         radius/dictionary.freeswitch \
165         radius/dictionary.gandalf  \
166         radius/dictionary.garderos  \
167         radius/dictionary.gemtek  \
168         radius/dictionary.h3c \
169         radius/dictionary.hp \
170         radius/dictionary.huawei \
171         radius/dictionary.iea \
172         radius/dictionary.infonet \
173         radius/dictionary.ipunplugged \
174         radius/dictionary.issanni \
175         radius/dictionary.itk  \
176         radius/dictionary.jradius \
177         radius/dictionary.juniper  \
178         radius/dictionary.karlnet  \
179         radius/dictionary.lancom \
180         radius/dictionary.livingston  \
181         radius/dictionary.localweb  \
182         radius/dictionary.lucent \
183         radius/dictionary.manzara \
184         radius/dictionary.merit  \
185         radius/dictionary.microsoft  \
186         radius/dictionary.mikrotik  \
187         radius/dictionary.motorola \
188         radius/dictionary.motorola.wimax \
189         radius/dictionary.navini  \
190         radius/dictionary.netscreen  \
191         radius/dictionary.networkphysics \
192         radius/dictionary.nexans \
193         radius/dictionary.nokia  \
194         radius/dictionary.nokia.conflict \
195         radius/dictionary.nomadix  \
196         radius/dictionary.nortel \
197         radius/dictionary.ntua \
198         radius/dictionary.openser \
199         radius/dictionary.packeteer \
200         radius/dictionary.patton \
201         radius/dictionary.propel  \
202         radius/dictionary.prosoft \
203         radius/dictionary.quiconnect \
204         radius/dictionary.quintum  \
205         radius/dictionary.redback  \
206         radius/dictionary.redcreek  \
207         radius/dictionary.rfc2865 \
208         radius/dictionary.rfc2866 \
209         radius/dictionary.rfc2867 \
210         radius/dictionary.rfc2868 \
211         radius/dictionary.rfc2869 \
212         radius/dictionary.rfc3162 \
213         radius/dictionary.rfc3576 \
214         radius/dictionary.rfc3580 \
215         radius/dictionary.rfc4072 \
216         radius/dictionary.rfc4372 \
217         radius/dictionary.rfc4603 \
218         radius/dictionary.rfc4675 \
219         radius/dictionary.rfc4679 \
220         radius/dictionary.rfc4818 \
221         radius/dictionary.rfc4849 \
222         radius/dictionary.rfc5090 \
223         radius/dictionary.rfc5176 \
224         radius/dictionary.rfc5580 \
225         radius/dictionary.rfc5607 \
226         radius/dictionary.rfc5904 \
227         radius/dictionary.riverstone \
228         radius/dictionary.roaringpenguin \
229         radius/dictionary.shasta  \
230         radius/dictionary.shiva  \
231         radius/dictionary.slipstream \
232         radius/dictionary.sofaware \
233         radius/dictionary.sonicwall  \
234         radius/dictionary.springtide  \
235         radius/dictionary.starent  \
236         radius/dictionary.t_systems_nova  \
237         radius/dictionary.telebit  \
238         radius/dictionary.telkom \
239         radius/dictionary.trapeze  \
240         radius/dictionary.tropos \
241         radius/dictionary.ukerna  \
242         radius/dictionary.unix  \
243         radius/dictionary.usr  \
244         radius/dictionary.utstarcom \
245         radius/dictionary.valemount  \
246         radius/dictionary.versanet  \
247         radius/dictionary.vqp \
248         radius/dictionary.walabi \
249         radius/dictionary.waverider \
250         radius/dictionary.wichorus \
251         radius/dictionary.wimax  \
252         radius/dictionary.wimax.wichorus \
253         radius/dictionary.wispr  \
254         radius/dictionary.xedia \
255         radius/dictionary.xylan \
256         radius/dictionary.zyxel
257
258 #
259 # Install the tpncp directory files in the "tpncp" subdirectory
260 # of that directory
261 #
262 tpncpdir = $(pkgdatadir)/tpncp
263 tpncp_DATA = \
264         tpncp/tpncp.dat
265
266
267 #
268 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
269 # of that directory
270 #
271 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
272 wimaxasncp_DATA = \
273         wimaxasncp/dictionary.xml \
274         wimaxasncp/dictionary.dtd
275
276 PLATFORM_SRC = capture-pcap-util-unix.c
277
278 if HAVE_PLUGINS
279 -include plugins/Custom.make
280 plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
281         -dlopen plugins/asn1/asn1.la \
282         -dlopen plugins/docsis/docsis.la \
283         -dlopen plugins/ethercat/ethercat.la \
284         -dlopen plugins/giop/cosnaming.la \
285         -dlopen plugins/giop/coseventcomm.la \
286         -dlopen plugins/gryphon/gryphon.la \
287         -dlopen plugins/irda/irda.la \
288         -dlopen plugins/m2m/m2m.la \
289         -dlopen plugins/mate/mate.la \
290         -dlopen plugins/opcua/opcua.la \
291         -dlopen plugins/profinet/profinet.la \
292         -dlopen plugins/stats_tree/stats_tree.la \
293         -dlopen plugins/unistim/unistim.la \
294         -dlopen plugins/wimax/wimax.la
295
296 WTAP_PLUGIN_SOURCES = \
297        epan/plugins.c \
298        epan/report_err.c \
299        epan/filesystem.c
300
301 else            # HAVE_PLUGINS
302
303 plugin_ldadd =
304 WTAP_PLUGIN_SOURCES =
305
306 endif           # HAVE_PLUGINS
307
308 include Makefile.common
309
310 if ENABLE_STATIC
311 wireshark_LDFLAGS = -Wl,-static -all-static
312 else
313 wireshark_LDFLAGS = -export-dynamic
314 endif
315
316 # Libraries and plugin flags with which to link wireshark.
317 #
318 # Note that Wireshark doesn't have to be linked with @GLIB_LIBS@, as
319 # they are included in @GTK_LIBS@, and doesn't have to be linked with
320 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
321 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
322 # applications are X applications).
323 wireshark_LDADD = \
324         gtk/libui.a                     \
325         gtk/libui_dirty.a               \
326         codecs/libcodec.a               \
327         wiretap/libwiretap.la           \
328         epan/libwireshark.la            \
329         wsutil/libwsutil.la             \
330         @SSL_LIBS@                      \
331         $(plugin_ldadd)                 \
332         @PCRE_LIBS@                     \
333         @PCAP_LIBS@                     \
334         @GTK_LIBS@ -lm                  \
335         @C_ARES_LIBS@                   \
336         @ADNS_LIBS@                     \
337         @KRB5_LIBS@                     \
338         @LAUNCHSERVICES_FRAMEWORKS@     \
339         @CORESERVICES_FRAMEWORKS@       \
340         @PY_LIBS@                       \
341         @LIBGCRYPT_LIBS@                \
342         @LIBGNUTLS_LIBS@                \
343         @LIBSMI_LDFLAGS@                \
344         @PORTAUDIO_LIBS@
345 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
346
347 if ENABLE_STATIC
348 tshark_LDFLAGS = -Wl,-static -all-static
349 else
350 tshark_LDFLAGS = -export-dynamic
351 endif
352
353 # Libraries and plugin flags with which to link tshark.
354 tshark_LDADD = \
355         wiretap/libwiretap.la           \
356         epan/libwireshark.la            \
357         wsutil/libwsutil.la             \
358         @SSL_LIBS@                      \
359         $(plugin_ldadd)                 \
360         @PCRE_LIBS@                     \
361         @GLIB_LIBS@ -lm                 \
362         @PCAP_LIBS@                     \
363         @SOCKET_LIBS@                   \
364         @NSL_LIBS@                      \
365         @C_ARES_LIBS@                   \
366         @ADNS_LIBS@                     \
367         @KRB5_LIBS@                     \
368         @CORESERVICES_FRAMEWORKS@       \
369         @PY_LIBS@                       \
370         @LIBGCRYPT_LIBS@                \
371         @LIBGNUTLS_LIBS@                \
372         @LIBSMI_LDFLAGS@
373 tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
374
375 if ENABLE_STATIC
376 rawshark_LDFLAGS = -Wl,-static -all-static
377 else
378 rawshark_LDFLAGS = -export-dynamic
379 endif
380
381 # Libraries and plugin flags with which to link rawshark.
382 rawshark_LDADD = \
383         wiretap/libwiretap.la           \
384         epan/libwireshark.la            \
385         wsutil/libwsutil.la             \
386         @SSL_LIBS@                      \
387         $(plugin_ldadd)                 \
388         @PCRE_LIBS@                     \
389         @GLIB_LIBS@ -lm                 \
390         @PCAP_LIBS@                     \
391         @SOCKET_LIBS@                   \
392         @NSL_LIBS@                      \
393         @C_ARES_LIBS@                   \
394         @ADNS_LIBS@                     \
395         @KRB5_LIBS@                     \
396         @CORESERVICES_FRAMEWORKS@       \
397         @PY_LIBS@                       \
398         @LIBGCRYPT_LIBS@                \
399         @LIBGNUTLS_LIBS@                \
400         @LIBSMI_LDFLAGS@
401 rawshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
402
403 # Libraries with which to link text2pcap.
404 text2pcap_LDADD = \
405         wiretap/libwiretap.la           \
406         wsutil/libwsutil.la             \
407         @GLIB_LIBS@ -lm
408 # Don't turn on -Werror for text2pcap: its source includes text2pcap-scanner.c
409 # which is generated (and therefore not always clean).
410 # We could generate text2pcap.o as a library with -Werror but for now it
411 # doesn't seem worth the effort.
412 #text2pcap_CFLAGS = $(AM_CLEAN_CFLAGS)
413
414 # Libraries with which to link mergecap.
415 mergecap_LDADD = \
416         wiretap/libwiretap.la           \
417         wsutil/libwsutil.la             \
418         @GLIB_LIBS@
419 mergecap_CFLAGS = $(AM_CLEAN_CFLAGS)
420
421 # Libraries with which to link capinfos.
422 capinfos_LDADD = \
423         wiretap/libwiretap.la           \
424         wsutil/libwsutil.la             \
425         @GLIB_LIBS@                     \
426         @LIBGCRYPT_LIBS@
427 capinfos_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
428
429 # Libraries with which to link editcap.
430 editcap_LDADD = \
431         wiretap/libwiretap.la           \
432         wsutil/libwsutil.la             \
433         @GLIB_LIBS@
434 editcap_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
435
436 # Libraries with which to link randpkt.
437 randpkt_LDADD = \
438         wiretap/libwiretap.la           \
439         wsutil/libwsutil.la             \
440         @GLIB_LIBS@ -lm                 \
441         @PCAP_LIBS@                     \
442         @SOCKET_LIBS@                   \
443         @NSL_LIBS@                      \
444         @C_ARES_LIBS@                   \
445         @ADNS_LIBS@
446 randpkt_CFLAGS = $(AM_CLEAN_CFLAGS)
447
448 # Libraries and plugin flags with which to link dftest.
449 dftest_LDADD = \
450         wiretap/libwiretap.la           \
451         wsutil/libwsutil.la             \
452         epan/libwireshark.la            \
453         @SSL_LIBS@                      \
454         $(plugin_ldadd)                 \
455         @PCRE_LIBS@                     \
456         @GLIB_LIBS@ -lm                 \
457         @PCAP_LIBS@                     \
458         @SOCKET_LIBS@                   \
459         @NSL_LIBS@                      \
460         @C_ARES_LIBS@                   \
461         @ADNS_LIBS@                     \
462         @KRB5_LIBS@                     \
463         @PY_LIBS@                       \
464         @LIBGCRYPT_LIBS@                \
465         @LIBGNUTLS_LIBS@                \
466         @LIBSMI_LDFLAGS@
467 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
468
469 # Libraries with which to link dumpcap.
470 dumpcap_LDADD = \
471         wsutil/libwsutil.la             \
472         @GLIB_LIBS@                     \
473         @PCAP_LIBS@                     \
474         @SOCKET_LIBS@                   \
475         @NSL_LIBS@                      \
476         @CORESERVICES_FRAMEWORKS@       \
477         @LIBCAP_LIBS@
478 dumpcap_CFLAGS = $(AM_CLEAN_CFLAGS)
479
480 # Common headers
481 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
482         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS)
483
484 #
485 # Build the version string
486 #
487 # FORCE is the portable version of .PHONY
488 FORCE:
489
490 svnversion.h: FORCE
491         $(PERL) $(srcdir)/make-version.pl $(srcdir)
492
493 #
494 # Build shell scripts by doing variable substitution.
495 # Taken from autoconf 2.13.
496 #
497 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
498
499 SUFFIXES = .sh
500 .sh:
501         rm -f $@ $@.tmp
502         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
503
504 #
505 # Build "tshark-tap-register.c", which contains a function
506 # "register_all_tap_listeners()"
507 # that calls the register routines for all tshark tap listeners.
508 #
509 # We do this by grepping through sources.
510 #
511 # Formatting conventions:  The name of the tap_listener_register_*
512 # routines must start in column zero, or must be preceded only by
513 # "void " starting in column zero, and must not be inside #if.
514 #
515 # The first argument is the directory in which the source files live.
516 # All subsequent arguments are the files to scan.
517 #
518 tshark-tap-register.c: $(TSHARK_TAP_SRC) $(srcdir)/tools/make-tapreg-dotc
519         @echo Making tshark-tap-register.c
520         @$(srcdir)/tools/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC)
521
522 ps.c: print.ps $(srcdir)/tools/rdps.py
523         $(PYTHON) $(srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
524
525 services: tools/make-services.pl
526         $(PERL) $(srcdir)/tools/make-services.pl
527
528 #
529 # XXX - "svnversion.h" is distributed in the release tarball; should
530 # we be deleting it with "make clean", or should we only do that with
531 # "make maintainer-clean"?
532 #
533 CLEANFILES =            \
534         svnversion.h    \
535         idl2wrs         \
536         *~              \
537         vgcore.*
538
539 #
540 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
541 # list of files removed by "make distclean"?  (It's deliberately
542 # included in that list.)
543 #
544 DISTCLEANFILES = \
545         ps.c
546
547 MAINTAINERCLEANFILES =          \
548         $(GENERATED_FILES)      \
549         Makefile.in             \
550         aclocal.m4              \
551         config.h.in             \
552         configure               \
553         depcomp                 \
554         install-sh              \
555         ltmain.sh               \
556         missing
557
558 EXTRA_DIST = \
559         INSTALL.configure       \
560         Makefile.am.inc         \
561         Makefile.common         \
562         Makefile.nmake          \
563         Makefile.nmake.inc      \
564         README.aix              \
565         README.bsd              \
566         README.DECT             \
567         README.hpux             \
568         README.irix             \
569         README.linux            \
570         README.macos            \
571         README.tru64            \
572         README.vmware           \
573         README.windows          \
574         abi-descriptor.template \
575         aclocal-fallback/glib-2.0.m4 \
576         aclocal-fallback/gtk-2.0.m4 \
577         aclocal-flags           \
578         adns_dll.dep            \
579         adns_dll.rc             \
580         autogen.sh              \
581         capinfos.c              \
582         capture-wpcap.c         \
583         capture-wpcap.h         \
584         capture_wpcap_packet.c  \
585         capture_wpcap_packet.h  \
586         cfilters                \
587         colorfilters            \
588         config.h.win32          \
589         config.nmake            \
590         debian/changelog        \
591         debian/compat           \
592         debian/control          \
593         debian/copyright        \
594         debian/dirs             \
595         debian/headers-check.c  \
596         debian/patches/00list   \
597         debian/patches/03_preferences.dpatch \
598         debian/postinst         \
599         debian/pycompat         \
600         debian/pyversions       \
601         debian/rules            \
602         debian/README.source    \
603         debian/tshark.files     \
604         debian/tshark.manpages  \
605         debian/watch            \
606         debian/wireshark-common.files \
607         debian/wireshark-common.manpages \
608         debian/wireshark-common.shlibs \
609         debian/wireshark-dev.docs \
610         debian/wireshark-dev.files \
611         debian/wireshark-dev.header-files \
612         debian/wireshark-dev.manpages \
613         debian/wireshark-dev.prerm \
614         debian/wireshark-root.desktop \
615         debian/wireshark.desktop \
616         debian/wireshark.files \
617         debian/wireshark.manpages \
618         debian/wireshark.menu   \
619         epan/dfilter/README.dfilter     \
620         dfilters                \
621         doxygen.cfg.in          \
622         dumpcap.c       \
623         editcap.c               \
624         fix/FIX.xml             \
625         fix/FIX40.xml           \
626         fix/FIX41.xml           \
627         fix/FIX42.xml           \
628         fix/FIX43.xml           \
629         fix/FIX44.xml           \
630         fix/README              \
631         fix/Values.xsl          \
632         fix/hfDecl.xsl          \
633         fix/hfField.xsl         \
634         fix/hfList.xsl          \
635         idl/coseventcomm.idl    \
636         idl/cosnaming.idl       \
637         idl/tango.idl   \
638         idl/parlay/am.idl       \
639         idl/parlay/cccs.idl     \
640         idl/parlay/cm.idl       \
641         idl/parlay/common_cc_data.idl   \
642         idl/parlay/cs.idl       \
643         idl/parlay/dsc.idl      \
644         idl/parlay/fw_data.idl  \
645         idl/parlay/fw_if.idl    \
646         idl/parlay/fw_if_access.idl     \
647         idl/parlay/fw_if_app.idl        \
648         idl/parlay/fw_if_entop.idl      \
649         idl/parlay/fw_if_service.idl    \
650         idl/parlay/gcc_data.idl \
651         idl/parlay/gcc_interfaces.idl   \
652         idl/parlay/gms.idl      \
653         idl/parlay/mm.idl       \
654         idl/parlay/mmccs.idl    \
655         idl/parlay/mmm.idl      \
656         idl/parlay/mpcc_data.idl        \
657         idl/parlay/mpcc_interfaces.idl  \
658         idl/parlay/osa.idl      \
659         idl/parlay/pam_data.idl \
660         idl/parlay/pam_interfaces.idl   \
661         idl/parlay/Parlay.idl   \
662         idl/parlay/policy_data.idl      \
663         idl/parlay/policy_interfaces.idl        \
664         idl/parlay/README.parlay        \
665         idl/parlay/termcap.idl  \
666         idl/parlay/ui_data.idl  \
667         idl/parlay/ui_interfaces.idl    \
668         image/capinfos.rc.in    \
669         image/clist_ascend.xpm  \
670         image/clist_descend.xpm \
671         image/dumpcap.rc.in     \
672         image/editcap.rc.in     \
673         image/file_dlg_win32.rc \
674         image/hi16-app-wireshark.png    \
675         image/hi32-app-wireshark.png    \
676         image/hi48-app-wireshark.png    \
677         image/icon_layout_1.xpm \
678         image/icon_layout_2.xpm \
679         image/icon_layout_3.xpm \
680         image/icon_layout_4.xpm \
681         image/icon_layout_5.xpm \
682         image/icon_layout_6.xpm \
683         image/libwireshark.rc.in        \
684         image/libwsutil.rc.in   \
685         image/lo16-app-wireshark.png    \
686         image/lo32-app-wireshark.png    \
687         image/lo48-app-wireshark.png    \
688         image/Makefile.nmake    \
689         image/mergecap.rc.in    \
690         image/nsis-checked.bmp  \
691         image/nsis-unchecked.bmp        \
692         image/rawshark.rc.in    \
693         image/README.image      \
694         image/stock_dialog_error_48.xpm \
695         image/stock_dialog_info_48.xpm  \
696         image/stock_dialog_question_48.xpm      \
697         image/stock_dialog_stop_48.xpm  \
698         image/stock_dialog_warning_48.xpm       \
699         image/text2pcap.rc.in   \
700         image/WiresharkDoc_24.xpm       \
701         image/toolbar/analyze_24.xpm \
702         image/toolbar/audio_player_24.xpm       \
703         image/toolbar/autoscroll_24.xpm \
704         image/toolbar/capture_airpcap_16.xpm \
705         image/toolbar/capture_capture_16.xpm \
706         image/toolbar/capture_details_16.xpm \
707         image/toolbar/capture_details_24.xpm \
708         image/toolbar/capture_ethernet_16.xpm  \
709         image/toolbar/capture_filter_24.xpm     \
710         image/toolbar/capture_interfaces_24.xpm \
711         image/toolbar/capture_options_24.xpm    \
712         image/toolbar/capture_prepare_16.xpm \
713         image/toolbar/capture_restart_24.xpm    \
714         image/toolbar/capture_start_24.xpm      \
715         image/toolbar/capture_stop_24.xpm       \
716         image/toolbar/checkbox_16.xpm   \
717         image/toolbar/colorize_24.xpm   \
718         image/toolbar/conversations_16.xpm      \
719         image/toolbar/decode_24.xpm     \
720         image/toolbar/decode_as_16.xpm  \
721         image/toolbar/display_filter_24.xpm     \
722         image/toolbar/endpoints_16.xpm  \
723         image/toolbar/expert_info_16.xpm        \
724         image/toolbar/file_set_list_16.xpm      \
725         image/toolbar/file_set_next_16.xpm      \
726         image/toolbar/file_set_previous_16.xpm  \
727         image/toolbar/flow_graph_16.xpm \
728         image/toolbar/graphs_16.xpm     \
729         image/toolbar/icon_color_0.xpm  \
730         image/toolbar/icon_color_1.xpm  \
731         image/toolbar/icon_color_2.xpm  \
732         image/toolbar/icon_color_3.xpm  \
733         image/toolbar/icon_color_4.xpm  \
734         image/toolbar/icon_color_5.xpm  \
735         image/toolbar/icon_color_6.xpm  \
736         image/toolbar/icon_color_7.xpm  \
737         image/toolbar/icon_color_8.xpm  \
738         image/toolbar/icon_color_9.xpm  \
739         image/toolbar/internet_24.xpm   \
740         image/toolbar/modem_16.png      \
741         image/toolbar/modem_16.xpm      \
742         image/toolbar/network_bluetooth_16.png  \
743         image/toolbar/network_usb.svg           \
744         image/toolbar/network_usb_16.png        \
745         image/toolbar/network_virtual_16.xpm    \
746         image/toolbar/network_wired_16.png      \
747         image/toolbar/network_wireless_16.png   \
748         image/toolbar/resize_columns_24.xpm     \
749         image/toolbar/telephone_16.xpm  \
750         image/toolbar/telephony_16.xpm  \
751         image/toolbar/time_24.xpm       \
752         image/toolbar/voip_flow_24.xpm  \
753         image/toolbar/web_support_24.xpm        \
754         image/toolbar/wep_closed_24.xpm \
755         image/toolbar/wiki_24.xpm       \
756         image/tshark.rc.in      \
757         image/voip_bg.xpm       \
758         image/voip_select.xpm   \
759         image/wireshark.exe.manifest.in \
760         image/wireshark.ico     \
761         image/wireshark.rc.in   \
762         image/WiresharkDoc-128.png      \
763         image/WiresharkDoc-16.png       \
764         image/WiresharkDoc-24.png       \
765         image/WiresharkDoc-256.png      \
766         image/WiresharkDoc-32.png       \
767         image/WiresharkDoc-48.png       \
768         image/WiresharkDoc-64.png       \
769         image/wiresharkdoc.ico  \
770         image/wiresharkinst.ico \
771         image/wiretap.rc.in     \
772         image/wsicon.svg        \
773         image/wsicon16.png      \
774         image/wsicon16.xpm      \
775         image/wsicon256.png     \
776         image/wsicon32.png      \
777         image/wsicon32.xpm      \
778         image/wsicon48.png      \
779         image/wsicon48.xpm      \
780         image/wsicon64.png      \
781         image/wsicon64.xpm      \
782         image/wsiconcap.svg     \
783         image/wsiconcap16.xpm   \
784         image/wsiconcap256.png  \
785         image/wsiconcap32.xpm   \
786         image/wsiconcap48.xpm   \
787         image/wsiconinst.svg    \
788         image/wsiconinst256.png \
789         image/wslogo.eps        \
790         image/wslogo.svg        \
791         image/wssplash-dev.xpm  \
792         image/wssplash.xpm      \
793         ipmap.html              \
794         make-version.pl         \
795         manuf                   \
796         manuf.tmpl              \
797         mergecap.c              \
798         pdml2html.xsl           \
799         print.ps                \
800         $(diameter_DATA)        \
801         $(dtds_DATA)            \
802         $(radius_DATA)          \
803         $(tpncp_DATA)           \
804         $(wimaxasncp_DATA)      \
805         randpkt.c               \
806         smi_modules             \
807         text2pcap-scanner.l     \
808         text2pcap.c             \
809         text2pcap.h             \
810         services                \
811         wireshark.desktop       \
812         wka.tmpl                \
813         CMakeLists.txt          \
814         cmakeconfig.h.in        \
815         wsutil/CMakeLists.txt   \
816         CMakeOptions.txt        \
817         wiretap/CMakeLists.txt  \
818         README.cmake            \
819         ConfigureChecks.cmake   \
820         cmake/modules/readme.txt                \
821         cmake/modules/FindLYNX.cmake            \
822         cmake/modules/FindYACC.cmake            \
823         cmake/modules/FeatureSummary.cmake      \
824         cmake/modules/FindADNS.cmake            \
825         cmake/modules/FindCAP.cmake             \
826         cmake/modules/UseLemon.cmake            \
827         cmake/modules/FindPCRE.cmake            \
828         cmake/modules/FindZLIB.cmake            \
829         cmake/modules/FindPORTAUDIO.cmake       \
830         cmake/modules/FindPCAP.cmake            \
831         cmake/modules/FindSMI.cmake             \
832         cmake/modules/FindCARES.cmake           \
833         cmake/modules/FindXSLTPROC.cmake        \
834         cmake/modules/FindSH.cmake              \
835         cmake/modules/FindGNUTLS.cmake          \
836         cmake/modules/FindGCRYPT.cmake          \
837         cmake/modules/UseMakeDissectorReg.cmake \
838         cmake/modules/FindLEX.cmake             \
839         cmake/modules/FindPYTHON.cmake          \
840         cmake/modules/FindLUA.cmake             \
841         cmake/modules/FindYAPP.cmake            \
842         cmake/modules/FindGEOIP.cmake           \
843         cmake/modules/FindXMLLINT.cmake         \
844         cmake/modules/FindSED.cmake             \
845         cmake/modules/FindGLIB2.cmake           \
846         cmake/modules/FindGMODULE2.cmake                \
847         cmake/modules/FindGTHREAD2.cmake                \
848         cmake/modules/FindHtmlViewer.cmake      \
849         cmake/modules/FindGTK2.cmake            \
850         cmake/modules/FindFOP.cmake             \
851         cmake/modules/LICENSE.txt               \
852         cmake/modules/CMakeInstallDirs.cmake    \
853         cmake/modules/CheckCLinkerFlag.cmake    \
854         cmake/modules/COPYING-CMAKE-SCRIPTS     \
855         cmake/modules/UseMakeTapReg.cmake       \
856         cmake/modules/FindM.cmake               \
857         cmake/modules/FindKERBEROS.cmake        \
858         cmake/modules/FindPOD.cmake             \
859         win32/Makefile.nmake    \
860         win32/file_dlg_win32.c          \
861         win32/file_dlg_win32.h          \
862         win32/print_win32.c                     \
863         win32/print_win32.h                     \
864         CPackConfig.txt                         \
865         all.vcproj              \
866         dumpcap.vcproj          \
867         packaging.vcproj        \
868         tshark.vcproj           \
869         wireshark.vcproj
870
871 install-exec-hook:
872 if HAVE_DUMPCAP_GROUP
873         -chgrp $(DUMPCAP_GROUP) $(DESTDIR)$(bindir)/dumpcap
874 endif
875 if SETCAP_INSTALL
876         -$(SETCAP) cap_net_raw,cap_net_admin+eip $(DESTDIR)$(bindir)/dumpcap
877         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
878 else
879 if SETUID_INSTALL
880         -chmod o-rws $(DESTDIR)$(bindir)/dumpcap
881         -chmod +s $(DESTDIR)$(bindir)/dumpcap
882 endif
883 endif
884
885
886 DIST_SUBDIRS = asn1 codecs doc epan gtk help packaging plugins tools wiretap wsutil docbook
887
888 if HAVE_PLUGINS
889 SUBDIRS = tools wsutil wiretap epan plugins packaging help @wireshark_SUBDIRS@ . doc
890 else
891 SUBDIRS = tools wsutil wiretap epan packaging help @wireshark_SUBDIRS@ . doc
892 endif
893
894 help/faq.txt: $(srcdir)/help/faq.py
895         (cd help ; \
896         $(MAKE) faq.txt ;)
897
898 libtool: $(LIBTOOL_DEPS)
899         $(SHELL) ./config.status --recheck
900
901 # Used by svr4-package and osx-package
902 # We load top_stagedir with an explicit path so that libtool doesn't freak.
903 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/staging
904 stagedir=$(top_stagedir)/$(PACKAGE).inst
905
906 host_cpu=@host_cpu@
907 host_os=@host_os@
908
909 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
910         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
911                 rm -rf $(stagedir) ; \
912                 $(MAKE) DESTDIR=$(stagedir) install; \
913                 $(srcdir)/packaging/svr4/mkpkg \
914                         $(PACKAGE) \
915                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
916                         $(prefix) \
917                         $(top_stagedir) ; \
918         else \
919                 echo "Error: SVR4 packaging tools not found." ; \
920                 echo "Package build abandoned." ; \
921         fi
922
923 solaris-package: svr4-package
924
925 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
926 rpm-package: dist
927         if test x$(HAVE_RPM) = xyes ; then \
928                 cd $(rpm_topdir) ; \
929                 mkdir -p BUILD RPMS SOURCES ; \
930                 cd SOURCES ; \
931                 ln -s ../../../$(distdir).tar.bz2 ; \
932                 ln -s ../../../wireshark.desktop ; \
933                 ln -s ../../../image/wsicon64.png wireshark.png ; \
934                 cd .. ; \
935                 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/wireshark.spec && \
936                         echo "Package successfully built in `pwd`/RPMS." ; \
937         else \
938                 echo "Error: RPM executable and/or source directory not found." ; \
939         fi
940 srpm-package: dist
941         if test x$(HAVE_RPM) = xyes ; then \
942                 cd $(rpm_topdir) ; \
943                 mkdir -p BUILD SRPMS SOURCES ; \
944                 cd SOURCES ; \
945                 ln -s ../../../$(distdir).tar.bz2 ; \
946                 ln -s ../../../wireshark.desktop ; \
947                 ln -s ../../../image/wsicon64.png wireshark.png ; \
948                 cd .. ; \
949                 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/wireshark.spec && \
950                         echo "Package successfully built in `pwd`/SRPMS." ; \
951         else \
952                 echo "Error: RPM executable and/or source directory not found." ; \
953         fi
954
955 debian-package: debian/rules
956         @if test x$(HAVE_DPKG_BUILDPACKAGE) = xyes ; then \
957                 dpkg-buildpackage -rfakeroot -us -uc ; \
958         else \
959                 echo "Error: Debian packaging tools not found." ; \
960                 echo "Package build abandoned." ; \
961         fi
962
963 # XXX - This assumes we're building from the source directory.
964 osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
965         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
966                 rm -rf $(stagedir) ; \
967                 $(MAKE) DESTDIR=$(stagedir) install; \
968                 cd $(srcdir)/packaging/macosx ;  \
969                 ./osx-app.sh -bp ../staging/$(PACKAGE).inst$(bindir) ; \
970         else \
971                 echo "Error: OS X packaging tools not found." ; \
972                 echo "Package build abandoned." ; \
973         fi
974
975 packaging/macosx/COPYING.txt: COPYING
976         (cd packaging/macosx ; \
977         $(MAKE) COPYING.txt ;)
978
979 osx-package: osx-app packaging/macosx/COPYING.txt
980         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
981                 cd $(srcdir)/packaging/macosx ;  \
982                 ./osx-dmg.sh ; \
983         fi
984
985 osx-install: osx-app
986         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
987                 echo "Copying Wireshark.app to /Applications" ; \
988                 cp -pr $(srcdir)/packaging/macosx/Wireshark.app /Applications ;  \
989         fi
990
991 clean-local:
992         rm -rf $(top_stagedir)
993
994 dumpabi:
995         $(MAKE) -C wiretap dumpabi
996         $(MAKE) -C epan dumpabi
997         $(MAKE) -C wsutil dumpabi
998
999 checkapi_local:
1000         $(PERL) tools/checkAPIs.pl \
1001         $(TSHARK_TAP_SRC)
1002 #       $(wireshark_SOURCES)
1003 #       $(EXTRA_wireshark_SOURCES)
1004
1005 checkapi: checkapi_local
1006         cd wiretap && $(MAKE) checkapi
1007         cd ../codecs && $(MAKE) checkapi
1008 ##      cd ../gtk && $(MAKE) checkapi
1009 ##      cd ../epan && $(MAKE) checkapi
1010 ##      cd ../epan/crypt && $(MAKE) checkapi
1011         cd ../dfilter && $(MAKE) checkapi
1012 ##      cd ../ftypes && $(MAKE) checkapi
1013 ##      cd ../wslua && $(MAKE) checkapi
1014         cd ../dissectors && $(MAKE) checkapi
1015         cd ../../plugins && $(MAKE) checkapi
1016         cd ../wsutil && $(MAKE) checkapi