Renamed a local variable to avoid name collisions.
[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
29 #
30 # This is a hideous hack.
31 #
32 # Automake needs to know into which sections to install various man
33 # pages; if the names in "man_MANS" have suffixes, it can infer the
34 # sections from the name (e.g., "hello.1" goes in section 1), but if
35 # they don't have suffixes, it can't tell what sections to put them, and
36 # it just gives up and doesn't create any rules to install them (and it
37 # gives up silently, so you have no clue what's wrong).
38 #
39 # Therefore, we can't just set "man_MANS" to a list of variables to be
40 # filled in by the configure script, as those variables don't have man
41 # page section numbers.
42 #
43 # It turns out (although this is not documented anywhere I could find
44 # in the automake Info file) that if you define, instead, variables with
45 # names like "man{section}_MANS", automake will infer that the names in
46 # those variables are the names of man pages to be installed in section
47 # "{section}".
48 #
49 # So, as all our man pages go in section 1, we define "man1_MANS" to
50 # contain all the man page.
51 #
52 # *However*, if "man_MANS" isn't defined at all, automake concludes that
53 # there are no man pages, the fact that, say, "man1_MANS" is defined
54 # nonwithstanding!  (I suspect this is the result of a mistaken attempt
55 # to get people to fix their automake files not to use "MANS"; if "MANS"
56 # is defined, it prints a warning and sets the exit status, but doesn't
57 # exit, and then it just gives up if "man_MANS" isn't defined,
58 # presumably on the theory that the only reason it wouldn't be defined
59 # is because the automake file uses the obsolete "MANS" variable instead
60 # of the shiny new "man_MANS" variable.)
61 #
62 # So we also define "man_MANS", but don't define it as anything;
63 # automake will arrange that the Makefile define it as the union of all
64 # the "man{section}_MANS" variables.
65 #
66 bin_PROGRAMS = \
67         @wireshark_bin@ \
68         @tshark_bin@    \
69         @text2pcap_bin@ \
70         @mergecap_bin@  \
71         @capinfos_bin@  \
72         @editcap_bin@   \
73         @randpkt_bin@   \
74         @dftest_bin@    \
75         @dumpcap_bin@   \
76         @rawshark_bin@
77 bin_SCRIPTS = @idl2wrs_bin@
78
79 man1_MANS = \
80         @wireshark_man@ \
81         @tshark_man@    \
82         @text2pcap_man@ \
83         @mergecap_man@  \
84         @capinfos_man@  \
85         @editcap_man@   \
86         @dumpcap_man@   \
87         @idl2wrs_man@   \
88         @rawshark_man@
89 man4_MANS = @wiresharkfilter_man@
90 man_MANS =
91
92 EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
93         randpkt text2pcap dumpcap rawshark
94 EXTRA_SCRIPTS = idl2wrs
95
96 idl2wrs: tools/idl2wrs.sh Makefile
97         cp tools/idl2wrs.sh idl2wrs
98         chmod +x idl2wrs
99
100 #
101 # Wireshark configuration files are put in $(pkgdatadir).
102 #
103 pkgdata_DATA = AUTHORS-SHORT COPYING manuf services wireshark.html \
104         tshark.html wireshark-filter.html capinfos.html editcap.html \
105         idl2wrs.html mergecap.html text2pcap.html dumpcap.html \
106         rawshark.html ws.css cfilters colorfilters dfilters smi_modules
107
108 #
109 # Install the Diameter DTD and XML files in the "diameter" subdirectory
110 # of that directory.
111 #
112 diameterdir = $(pkgdatadir)/diameter
113 diameter_DATA = \
114         diameter/chargecontrol.xml \
115         diameter/dictionary.dtd \
116         diameter/dictionary.xml \
117         diameter/Ericsson.xml \
118         diameter/etsie2e4.xml \
119         diameter/gqpolicy.xml \
120         diameter/imscxdx.xml \
121         diameter/mobileipv4.xml \
122         diameter/nasreq.xml \
123         diameter/sip.xml \
124         diameter/sunping.xml \
125         diameter/TGPPGmb.xml \
126         diameter/TGPPSh.xml
127
128 #
129 # Install the DTDs directory files in the "dtds" subdirectory
130 # of that directory
131 #
132 dtdsdir = $(pkgdatadir)/dtds
133 dtds_DATA = \
134         dtds/dc.dtd \
135         dtds/itunes.dtd \
136         dtds/mscml.dtd \
137         dtds/pocsettings.dtd \
138         dtds/presence.dtd \
139         dtds/reginfo.dtd \
140         dtds/rlmi.dtd \
141         dtds/rss.dtd \
142         dtds/smil.dtd \
143         dtds/xcap-caps.dtd \
144         dtds/xcap-error.dtd \
145         dtds/watcherinfo.dtd
146
147 #
148 # Install the RADIUS directory files in the "radius" subdirectory
149 # of that directory.
150 #
151 radiusdir = $(pkgdatadir)/radius
152 radius_DATA = \
153         radius/dictionary  \
154         radius/dictionary.3com  \
155         radius/dictionary.3gpp  \
156         radius/dictionary.3gpp2  \
157         radius/dictionary.acc  \
158         radius/dictionary.alcatel  \
159         radius/dictionary.alteon  \
160         radius/dictionary.altiga  \
161         radius/dictionary.aptis  \
162         radius/dictionary.ascend  \
163         radius/dictionary.bay  \
164         radius/dictionary.bintec  \
165         radius/dictionary.bristol  \
166         radius/dictionary.cablelabs  \
167         radius/dictionary.cabletron  \
168         radius/dictionary.cisco  \
169         radius/dictionary.cisco.bbsm  \
170         radius/dictionary.cisco.vpn3000  \
171         radius/dictionary.cisco.vpn5000  \
172         radius/dictionary.colubris  \
173         radius/dictionary.columbia_university  \
174         radius/dictionary.compat  \
175         radius/dictionary.cosine  \
176         radius/dictionary.ericsson  \
177         radius/dictionary.erx  \
178         radius/dictionary.extreme  \
179         radius/dictionary.foundry  \
180         radius/dictionary.freeradius  \
181         radius/dictionary.gandalf  \
182         radius/dictionary.garderos  \
183         radius/dictionary.gemtek  \
184         radius/dictionary.itk  \
185         radius/dictionary.juniper  \
186         radius/dictionary.karlnet  \
187         radius/dictionary.livingston  \
188         radius/dictionary.localweb  \
189         radius/dictionary.merit  \
190         radius/dictionary.microsoft  \
191         radius/dictionary.mikrotik  \
192         radius/dictionary.navini  \
193         radius/dictionary.netscreen  \
194         radius/dictionary.nokia  \
195         radius/dictionary.nomadix  \
196         radius/dictionary.propel  \
197         radius/dictionary.quintum  \
198         radius/dictionary.redback  \
199         radius/dictionary.redcreek  \
200         radius/dictionary.shasta  \
201         radius/dictionary.shiva  \
202         radius/dictionary.sonicwall  \
203         radius/dictionary.springtide  \
204         radius/dictionary.t_systems_nova  \
205         radius/dictionary.telebit  \
206         radius/dictionary.trapeze  \
207         radius/dictionary.tunnel  \
208         radius/dictionary.unisphere  \
209         radius/dictionary.unix  \
210         radius/dictionary.usr  \
211         radius/dictionary.valemount  \
212         radius/dictionary.versanet  \
213         radius/dictionary.wispr  \
214         radius/dictionary.xedia
215
216 #
217 # Install the tpncp directory files in the "tpncp" subdirectory
218 # of that directory
219 #
220 tpncpdir = $(pkgdatadir)/tpncp
221 tpncp_DATA = \
222         tpncp/tpncp.dat
223
224
225 #
226 # Install the wimaxasncp directory files in the "wimaxasncp" subdirectory
227 # of that directory
228 #
229 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
230 wimaxasncp_DATA = \
231         wimaxasncp/dictionary.xml \
232         wimaxasncp/dictionary.dtd
233
234 PLATFORM_SRC = capture-pcap-util-unix.c
235
236 if HAVE_PLUGINS
237
238 plugin_ldadd = \
239         -dlopen plugins/agentx/agentx.la \
240         -dlopen plugins/artnet/artnet.la \
241         -dlopen plugins/asn1/asn1.la \
242         -dlopen plugins/ciscosm/ciscosm.la \
243         -dlopen plugins/docsis/docsis.la \
244         -dlopen plugins/enttec/enttec.la \
245         -dlopen plugins/ethercat/ethercat.la \
246         -dlopen plugins/giop/cosnaming.la \
247         -dlopen plugins/giop/coseventcomm.la \
248         -dlopen plugins/gryphon/gryphon.la \
249         -dlopen plugins/infiniband/infiniband.la \
250         -dlopen plugins/irda/irda.la \
251         -dlopen plugins/lwres/lwres.la \
252         -dlopen plugins/m2m/m2m.la \
253         -dlopen plugins/mate/mate.la \
254         -dlopen plugins/opcua/opcua.la \
255         -dlopen plugins/opsi/opsi.la \
256         -dlopen plugins/pcli/pcli.la \
257         -dlopen plugins/profinet/profinet.la \
258         -dlopen plugins/rlm/rlm.la \
259         -dlopen plugins/rtnet/rtnet.la \
260         -dlopen plugins/rudp/rudp.la \
261         -dlopen plugins/sbus/sbus.la \
262         -dlopen plugins/sercosiii/sercosiii.la \
263         -dlopen plugins/stats_tree/stats_tree.la \
264         -dlopen plugins/unistim/unistim.la \
265         -dlopen plugins/v5ua/v5ua.la \
266         -dlopen plugins/wimax/wimax.la
267
268 WTAP_PLUGIN_SOURCES = \
269        epan/plugins.c \
270        epan/report_err.c \
271        epan/privileges.c \
272        epan/filesystem.c
273
274 else            # HAVE_PLUGINS
275
276 plugin_ldadd =
277 WTAP_PLUGIN_SOURCES =
278
279 endif           # HAVE_PLUGINS
280
281 include Makefile.common
282
283 # Optional objects that I know how to build. These will be
284 # linked into the wireshark executable.
285 # They will also be linked into the tshark executable; if this
286 # list ever grows to include something that can't be linked with
287 # tshark, or if tshark needs something that wireshark doesn't,
288 # we should probably split this into stuff needed both
289 # by wireshark and tshark and stuff needed only by one or the
290 # other.
291 wireshark_optional_objects = @GETOPT_O@ @STRERROR_O@ \
292         @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
293
294 if ENABLE_STATIC
295 wireshark_LDFLAGS = -Wl,-static -all-static
296 else
297 wireshark_LDFLAGS = -export-dynamic
298 endif
299
300 # Libraries and plugin flags with which to link wireshark.
301 #
302 # Note that Wireshark doesn't have to be linked with @GLIB_LIBS@, as
303 # they are included in @GTK_LIBS@, and doesn't have to be linked with
304 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
305 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
306 # applications are X applications).
307 wireshark_LDADD = \
308         $(wireshark_optional_objects)   \
309         gtk/libui.a                     \
310         codecs/libcodec.a               \
311         wiretap/libwiretap.la           \
312         epan/libwireshark.la            \
313         wsutil/libwsutil.la             \
314         @INET_PTON_LO@                  \
315         @SSL_LIBS@                      \
316         $(plugin_ldadd)                 \
317         @PCRE_LIBS@                     \
318         @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ @FRAMEWORKS@ \
319         @LIBICONV@                      \
320         @LIBGCRYPT_LIBS@                \
321         @LIBGNUTLS_LIBS@                \
322         @LIBSMI_LDFLAGS@                \
323         @PORTAUDIO_LIBS@
324
325 if ENABLE_STATIC
326 tshark_LDFLAGS = -Wl,-static -all-static
327 else
328 tshark_LDFLAGS = -export-dynamic
329 endif
330
331 # Libraries and plugin flags with which to link tshark.
332 tshark_LDADD = \
333         $(wireshark_optional_objects)   \
334         wiretap/libwiretap.la           \
335         epan/libwireshark.la            \
336         wsutil/libwsutil.la             \
337         @INET_PTON_LO@                  \
338         @SSL_LIBS@                      \
339         $(plugin_ldadd)                 \
340         @PCRE_LIBS@                     \
341         @GLIB_LIBS@ -lm                 \
342         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@    \
343         @FRAMEWORKS@                    \
344         @LIBICONV@                      \
345         @LIBGCRYPT_LIBS@                \
346         @LIBGNUTLS_LIBS@                \
347         @LIBSMI_LDFLAGS@
348
349 if ENABLE_STATIC
350 rawshark_LDFLAGS = -Wl,-static -all-static
351 else
352 rawshark_LDFLAGS = -export-dynamic
353 endif
354
355 # Libraries and plugin flags with which to link tshark.
356 rawshark_LDADD = \
357         $(wireshark_optional_objects)   \
358         wiretap/libwiretap.la           \
359         epan/libwireshark.la            \
360         wsutil/libwsutil.la             \
361         @INET_PTON_LO@                  \
362         @SSL_LIBS@                      \
363         $(plugin_ldadd)                 \
364         @PCRE_LIBS@                     \
365         @GLIB_LIBS@ -lm                 \
366         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@    \
367         @FRAMEWORKS@                    \
368         @LIBICONV@                      \
369         @LIBGCRYPT_LIBS@                \
370         @LIBGNUTLS_LIBS@                \
371         @LIBSMI_LDFLAGS@
372
373 # Optional objects that I know how to build, and that are needed by
374 # text2pcap.
375 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
376
377 # Libraries with which to link text2pcap.
378 text2pcap_LDADD = \
379         $(text2pcap_optional_objects)   \
380         wiretap/libwiretap.la           \
381         wsutil/libwsutil.la             \
382         @GLIB_LIBS@ -lm
383
384 # Libraries with which to link mergecap.
385 mergecap_LDADD = \
386         wiretap/libwiretap.la           \
387         wsutil/libwsutil.la             \
388         @GLIB_LIBS@
389
390 # Libraries with which to link capinfos.
391 capinfos_LDADD = \
392         wiretap/libwiretap.la           \
393         wsutil/libwsutil.la             \
394         @GLIB_LIBS@
395
396 # Libraries with which to link editcap.
397 editcap_LDADD = \
398         wiretap/libwiretap.la           \
399         wsutil/libwsutil.la             \
400         @GLIB_LIBS@
401
402 # Libraries with which to link randpkt.
403 randpkt_LDADD = \
404         wiretap/libwiretap.la           \
405         wsutil/libwsutil.la             \
406         @GLIB_LIBS@ -lm                 \
407         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
408
409 # Libraries and plugin flags with which to link dftest.
410 dftest_LDADD = \
411         $(wireshark_optional_objects)   \
412         wiretap/libwiretap.la           \
413         wsutil/libwsutil.la             \
414         epan/libwireshark.la            \
415         @SSL_LIBS@                      \
416         $(plugin_ldadd)                 \
417         @PCRE_LIBS@                     \
418         @GLIB_LIBS@ -lm                 \
419         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@ @KRB5_LIBS@ \
420         @LIBICONV@                      \
421         @LIBGCRYPT_LIBS@                \
422         @LIBGNUTLS_LIBS@                \
423         @LIBSMI_LDFLAGS@
424
425 # Libraries with which to link dumpcap.
426 dumpcap_LDADD = \
427         wiretap/libwiretap.la           \
428         wsutil/libwsutil.la             \
429         @INET_NTOP_LO@                  \
430         @GLIB_LIBS@                     \
431         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @FRAMEWORKS@ \
432         @LIBGCRYPT_LIBS@                \
433         @LIBCAP_LIBS@
434
435 # Common headers
436 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
437         $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS)
438
439 #
440 # Build the version string
441 #
442 # FORCE is the portable version of .PHONY
443 FORCE:
444
445 svnversion.h: FORCE
446         LANG=C $(PERL) $(srcdir)/make-version.pl $(srcdir)
447
448 #
449 # Build the short version of the authors file for the about dialog
450 #
451 AUTHORS-SHORT: AUTHORS make-authors-short.pl
452         $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-short.pl < $(srcdir)/AUTHORS > AUTHORS-SHORT
453
454 #
455 # Build the short version of the authors file with formatting codes for the
456 # man page
457 #
458 AUTHORS-SHORT-FORMAT: AUTHORS-SHORT make-authors-format.pl
459         $(PERL) $(srcdir)/perlnoutf.pl $(srcdir)/make-authors-format.pl < AUTHORS-SHORT > AUTHORS-SHORT-FORMAT
460
461 #
462 # Build shell scripts by doing variable substitution.
463 # Taken from autoconf 2.13.
464 #
465 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
466
467 SUFFIXES = .sh
468 .sh:
469         rm -f $@ $@.tmp
470         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
471
472 #
473 # Build "tshark-tap-register.c", which contains a function
474 # "register_all_tap_listeners()"
475 # that calls the register routines for all tshark tap listeners.
476 #
477 # We do this by grepping through sources.
478 #
479 # Formatting conventions:  The name of the tap_listener_register_*
480 # routines must start in column zero, or must be preceded only by
481 # "void " starting in column zero, and must not be inside #if.
482 #
483 # The first argument is the directory in which the source files live.
484 # All subsequent arguments are the files to scan.
485 #
486 tshark-tap-register.c: $(TSHARK_TAP_SRC) $(srcdir)/make-tapreg-dotc
487         @echo Making tshark-tap-register.c
488         @$(srcdir)/make-tapreg-dotc tshark-tap-register.c $(srcdir) $(TSHARK_TAP_SRC)
489
490 ps.c: print.ps rdps
491         ./rdps $(srcdir)/print.ps ps.c
492
493 rdps: rdps.c
494         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
495
496 #
497 # XXX - "svnversion.h" is distributed in the release tarball; should
498 # we be deleting it with "make clean", or should we only do that with
499 # "make maintainer-clean"?
500 #
501 CLEANFILES =            \
502         svnversion.h    \
503         @rdps_bin@      \
504         idl2wrs         \
505         *~              \
506         vgcore.pid*
507
508 #
509 # XXX - "ps.c" is distributed in the source tarballs; why is it in the
510 # list of files removed by "make distclean"?  (It's deliberately
511 # included in that list.)
512 #
513 DISTCLEANFILES = \
514         AUTHORS-SHORT           \
515         AUTHORS-SHORT-FORMAT    \
516         ps.c                    \
517         ws.css
518
519 MAINTAINERCLEANFILES =          \
520         $(GENERATED_FILES)      \
521         Makefile.in             \
522         aclocal.m4              \
523         config.h.in             \
524         configure               \
525         depcomp                 \
526         install-sh              \
527         ltmain.sh               \
528         missing
529
530 EXTRA_DIST = \
531         FAQ                     \
532         INSTALL.configure       \
533         Makefile.am.inc         \
534         Makefile.common         \
535         Makefile.nmake          \
536         Makefile.nmake.inc      \
537         README.aix              \
538         README.bsd              \
539         README.hpux             \
540         README.irix             \
541         README.linux            \
542         README.macos            \
543         README.tru64            \
544         README.vmware           \
545         README.win32            \
546         aclocal-fallback/glib-2.0.m4 \
547         aclocal-fallback/glib.m4 \
548         aclocal-fallback/gtk-2.0.m4 \
549         aclocal-fallback/gtk.m4 \
550         aclocal-fallback/iconv.m4 \
551         aclocal-flags           \
552         adns_dll.dep            \
553         adns_dll.rc             \
554         autogen.sh              \
555         capinfos.c              \
556         capture-wpcap.c         \
557         capture-wpcap.h         \
558         capture_wpcap_packet.c  \
559         capture_wpcap_packet.h  \
560         cfilters                \
561         colorfilters            \
562         config.h.win32          \
563         config.nmake            \
564         debian/changelog        \
565         debian/compat           \
566         debian/control          \
567         debian/copyright        \
568         debian/dirs             \
569         debian/headers-check.c  \
570         debian/patches/00list   \
571         debian/patches/03_preferences.dpatch \
572         debian/postinst         \
573         debian/pycompat         \
574         debian/pyversions       \
575         debian/rules            \
576         debian/tshark.files     \
577         debian/tshark.manpages  \
578         debian/watch            \
579         debian/wireshark-common.files \
580         debian/wireshark-common.manpages \
581         debian/wireshark-common.shlibs \
582         debian/wireshark-dev.docs \
583         debian/wireshark-dev.files \
584         debian/wireshark-dev.header-files \
585         debian/wireshark-dev.manpages \
586         debian/wireshark-dev.prerm \
587         debian/wireshark-root.desktop \
588         debian/wireshark.desktop \
589         debian/wireshark.files \
590         debian/wireshark.manpages \
591         debian/wireshark.menu   \
592         dfilters                \
593         doc/Makefile.am         \
594         doc/Makefile.nmake      \
595         doc/README.binarytrees  \
596         doc/README.capture      \
597         doc/README.design       \
598         doc/README.developer    \
599         doc/README.display_filter       \
600         doc/README.idl2wrs      \
601         doc/README.malloc       \
602         doc/README.packaging    \
603         doc/README.plugins      \
604         doc/README.regression   \
605         doc/README.request_response_tracking    \
606         doc/README.stats_tree   \
607         doc/README.tapping      \
608         doc/README.xml-output   \
609         doc/capinfos.pod                \
610         doc/dfilter2pod.pl      \
611         doc/dumpcap.pod         \
612         doc/editcap.pod         \
613         doc/eproto2sgml         \
614         doc/idl2wrs.pod         \
615         doc/mergecap.pod        \
616         doc/randpkt.txt         \
617         doc/rawshark.pod        \
618         doc/sgml.doc.template   \
619         doc/text2pcap.pod       \
620         doc/tshark.pod          \
621         doc/wireshark-filter.pod.template \
622         doc/wireshark.pod       \
623         docbook/Makefile.auto.am        \
624         docbook/ws.css          \
625         doxygen.cfg.in          \
626         dumpcap.c       \
627         editcap.c               \
628         epan/libwireshark.def   \
629         example_snmp_users_file \
630         wireshark.desktop       \
631         image/capinfos.rc.in    \
632         image/clist_ascend.xpm  \
633         image/clist_descend.xpm \
634         image/dn_arrow.xpm      \
635         image/dumpcap.rc.in     \
636         image/editcap.rc.in     \
637         image/expert_chat.xpm   \
638         image/expert_error.xpm  \
639         image/expert_none.xpm   \
640         image/expert_note.xpm   \
641         image/expert_warn.xpm   \
642         image/file_dlg_win32.rc \
643         image/hi16-app-wireshark.png    \
644         image/hi32-app-wireshark.png    \
645         image/hi48-app-wireshark.png    \
646         image/icon_layout_1.xpm \
647         image/icon_layout_2.xpm \
648         image/icon_layout_3.xpm \
649         image/icon_layout_4.xpm \
650         image/icon_layout_5.xpm \
651         image/icon_layout_6.xpm \
652         image/libwireshark.rc.in        \
653         image/lo16-app-wireshark.png    \
654         image/lo32-app-wireshark.png    \
655         image/lo48-app-wireshark.png    \
656         image/Makefile.nmake    \
657         image/mergecap.rc.in    \
658         image/nsis-checked.bmp  \
659         image/nsis-unchecked.bmp        \
660         image/rawshark.rc.in    \
661         image/README.image      \
662         image/stock_dialog_error_48.xpm \
663         image/stock_dialog_info_48.xpm  \
664         image/stock_dialog_question_48.xpm      \
665         image/stock_dialog_stop_48.xpm  \
666         image/stock_dialog_warning_48.xpm       \
667         image/text2pcap.rc.in   \
668         image/toolbar/autoscroll_24.xpm \
669         image/toolbar/capture_airpcap_16.xpm \
670         image/toolbar/capture_capture_16.xpm \
671         image/toolbar/capture_details_16.xpm \
672         image/toolbar/capture_details_24.xpm \
673         image/toolbar/capture_ethernet_16.xpm  \
674         image/toolbar/capture_filter_24.xpm     \
675         image/toolbar/capture_interfaces_24.xpm \
676         image/toolbar/capture_options_24.xpm    \
677         image/toolbar/capture_prepare_16.xpm \
678         image/toolbar/capture_restart_24.xpm    \
679         image/toolbar/capture_start_24.xpm      \
680         image/toolbar/capture_stop_24.xpm       \
681         image/toolbar/checkbox_16.xpm   \
682         image/toolbar/colorize_24.xpm   \
683         image/toolbar/conversations_16.xpm      \
684         image/toolbar/decode_as_16.xpm  \
685         image/toolbar/display_filter_24.xpm     \
686         image/toolbar/endpoints_16.xpm  \
687         image/toolbar/expert_info_16.xpm        \
688         image/toolbar/file_set_list_16.xpm      \
689         image/toolbar/file_set_next_16.xpm      \
690         image/toolbar/file_set_previous_16.xpm  \
691         image/toolbar/flow_graph_16.xpm \
692         image/toolbar/graphs_16.xpm     \
693         image/toolbar/icon_color_0.xpm  \
694         image/toolbar/icon_color_1.xpm  \
695         image/toolbar/icon_color_2.xpm  \
696         image/toolbar/icon_color_3.xpm  \
697         image/toolbar/icon_color_4.xpm  \
698         image/toolbar/icon_color_5.xpm  \
699         image/toolbar/icon_color_6.xpm  \
700         image/toolbar/icon_color_7.xpm  \
701         image/toolbar/icon_color_8.xpm  \
702         image/toolbar/icon_color_9.xpm  \
703         image/toolbar/internet_24.xpm   \
704         image/toolbar/resize_columns_24.xpm     \
705         image/toolbar/telephony_16.xpm  \
706         image/toolbar/time_24.xpm       \
707         image/toolbar/web_support_24.xpm        \
708         image/toolbar/wep_closed_24.xpm \
709         image/toolbar/wiki_24.xpm       \
710         image/tshark.rc.in      \
711         image/up_arrow.xpm      \
712         image/wiresharkdoc.ico  \
713         image/wireshark.exe.manifest.in \
714         image/wireshark.ico     \
715         image/wiresharkinst.ico \
716         image/wireshark.rc.in   \
717         image/wiretap.rc.in     \
718         image/wsicon16.png      \
719         image/wsicon16.xpm      \
720         image/wsicon256.png     \
721         image/wsicon32.png      \
722         image/wsicon32.xpm      \
723         image/wsicon48.png      \
724         image/wsicon48.xpm      \
725         image/wsicon64.png      \
726         image/wsicon64.xpm      \
727         image/wsiconcap16.xpm   \
728         image/wsiconcap256.png  \
729         image/wsiconcap32.xpm   \
730         image/wsiconcap48.xpm   \
731         image/wsiconcap.svg     \
732         image/wsicondoc256.png  \
733         image/wsicondoc.svg     \
734         image/wsiconinst256.png \
735         image/wsiconinst.svg    \
736         image/wsicon.svg        \
737         image/wslogo.eps        \
738         image/wslogo.svg        \
739         image/wssplash.xpm      \
740         make-authors-format.pl  \
741         make-authors-short.pl   \
742         make-manuf              \
743         make-tapreg-dotc        \
744         make-version.pl         \
745         manuf                   \
746         manuf.tmpl              \
747         mergecap.c              \
748         perlnoutf.pl            \
749         print.ps                \
750         $(diameter_DATA)        \
751         $(dtds_DATA)            \
752         $(radius_DATA)          \
753         $(tpncp_DATA)           \
754         $(wimaxasncp_DATA)      \
755         randpkt.c               \
756         rdps.c                  \
757         smi_modules             \
758         text2pcap-scanner.l     \
759         text2pcap.c             \
760         text2pcap.h             \
761         packaging/makefile.nmake        \
762         packaging/ws-manifest.pl        \
763         packaging/portableapps/win32/Installer.nsi              \
764         packaging/portableapps/win32/WiresharkPortable.ini      \
765         packaging/portableapps/win32/WiresharkPortable.nsi      \
766         packaging/portableapps/win32/appinfo.tmpl               \
767         packaging/portableapps/win32/makefile.nmake             \
768         packaging/portableapps/win32/makenmake.pl               \
769         packaging/portableapps/win32/readme.txt                 \
770         packaging/u3/win32/README.txt           \
771         packaging/u3/win32/makefile.nmake       \
772         packaging/u3/win32/makenmake.pl         \
773         packaging/u3/win32/manifest.tmpl        \
774         packaging/u3/win32/u3util.c             \
775         packaging/u3/win32/wireshark.bat        \
776         packaging/u3/tools/README.txt           \
777         packaging/u3/tools/makefile.nmake       \
778         packaging/u3/tools/sysdep.c             \
779         packaging/u3/tools/sysdep.h             \
780         packaging/u3/tools/utest.c              \
781         packaging/u3/tools/uuid.c               \
782         packaging/u3/tools/uuid.h               \
783         services                \
784         tools/idl2wrs.sh.in     \
785         tools/setuid-root.pl.in \
786         wka.tmpl
787
788 if SETUID_INSTALL
789 install-exec-hook:
790         -chmod +s $(DESTDIR)$(bindir)/dumpcap
791 else
792 install-exec-hook:
793 endif
794
795 DIST_SUBDIRS = asn1 codecs doc epan gtk help packaging plugins tools wiretap wsutil
796
797 if HAVE_PLUGINS
798 SUBDIRS = tools wsutil wiretap doc epan plugins packaging help @wireshark_SUBDIRS@
799 else
800 SUBDIRS = tools wsutil wiretap doc epan packaging help @wireshark_SUBDIRS@
801 endif
802
803 wireshark.1: doc/wireshark.pod AUTHORS-SHORT-FORMAT
804         (cd doc ; \
805         $(MAKE) ../wireshark.1 )
806
807 tshark.1: doc/tshark.pod
808         (cd doc ; \
809         $(MAKE) ../tshark.1 )
810
811 wireshark-filter.4: tshark doc/wireshark-filter.pod.template
812         (cd doc ; \
813         $(MAKE) ../wireshark-filter.4 )
814
815 capinfos.1: doc/capinfos.pod
816         (cd doc ; \
817         $(MAKE) ../capinfos.1 )
818
819 editcap.1: doc/editcap.pod
820         (cd doc ; \
821         $(MAKE) ../editcap.1 )
822
823 idl2wrs.1: doc/idl2wrs.pod
824         (cd doc ; \
825         $(MAKE) ../idl2wrs.1 )
826
827 mergecap.1: doc/mergecap.pod
828         (cd doc ; \
829         $(MAKE) ../mergecap.1 )
830
831 text2pcap.1: doc/text2pcap.pod
832         (cd doc ; \
833         $(MAKE) ../text2pcap.1 )
834
835 dumpcap.1: doc/dumpcap.pod
836         (cd doc ; \
837         $(MAKE) ../dumpcap.1 )
838
839 rawshark.1: doc/rawshark.pod
840         (cd doc ; \
841         $(MAKE) ../rawshark.1 )
842
843 ws.css: $(srcdir)/docbook/ws.css
844         cp $(srcdir)/docbook/ws.css .
845
846 wireshark.html: doc/wireshark.pod AUTHORS-SHORT-FORMAT ws.css
847         (cd doc ; \
848         $(MAKE) ../wireshark.html )
849
850 tshark.html: doc/tshark.pod ws.css
851         (cd doc ; \
852         $(MAKE) ../tshark.html )
853
854 wireshark-filter.html: tshark doc/wireshark-filter.pod.template ws.css
855         (cd doc ; \
856         $(MAKE) ../wireshark-filter.html )
857
858 capinfos.html: doc/capinfos.pod ws.css
859         (cd doc ; \
860         $(MAKE) ../capinfos.html )
861
862 editcap.html: doc/editcap.pod ws.css
863         (cd doc ; \
864         $(MAKE) ../editcap.html )
865
866 idl2wrs.html: doc/idl2wrs.pod ws.css
867         (cd doc ; \
868         $(MAKE) ../idl2wrs.html )
869
870 mergecap.html: doc/mergecap.pod ws.css
871         (cd doc ; \
872         $(MAKE) ../mergecap.html )
873
874 text2pcap.html: doc/text2pcap.pod ws.css
875         (cd doc ; \
876         $(MAKE) ../text2pcap.html )
877
878 dumpcap.html: doc/dumpcap.pod ws.css
879         (cd doc ; \
880         $(MAKE) ../dumpcap.html )
881
882 rawshark.html: doc/rawshark.pod ws.css
883         (cd doc ; \
884         $(MAKE) ../rawshark.html )
885
886 libtool: $(LIBTOOL_DEPS)
887         $(SHELL) ./config.status --recheck
888
889 # Used by svr4-package and osx-package
890 # We load top_stagedir with an explicit path so that libtool doesn't freak.
891 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/staging
892 stagedir=$(top_stagedir)/$(PACKAGE).inst
893
894 host_cpu=@host_cpu@
895 host_os=@host_os@
896
897 svr4-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA)
898         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
899                 rm -rf $(stagedir) ; \
900                 $(MAKE) DESTDIR=$(stagedir) install; \
901                 $(srcdir)/packaging/svr4/mkpkg \
902                         $(PACKAGE) \
903                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
904                         $(prefix) \
905                         $(top_stagedir) ; \
906         else \
907                 echo "Error: SVR4 packaging tools not found." ; \
908                 echo "Package build abandoned." ; \
909         fi
910
911 solaris-package: svr4-package
912
913 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
914 rpm-package: dist
915         if test x$(HAVE_RPM) = xyes ; then \
916                 cd $(rpm_topdir) ; \
917                 mkdir -p BUILD RPMS SOURCES ; \
918                 cd SOURCES ; \
919                 ln -s ../../../$(distdir).tar.gz ; \
920                 ln -s ../../../wireshark.desktop ; \
921                 ln -s ../../../image/wsicon64.png wireshark.png ; \
922                 cd .. ; \
923                 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/wireshark.spec && \
924                         echo "Package successfully built in `pwd`/RPMS." ; \
925         else \
926                 echo "Error: RPM executable and/or source directory not found." ; \
927         fi
928 srpm-package: dist
929         if test x$(HAVE_RPM) = xyes ; then \
930                 cd $(rpm_topdir) ; \
931                 mkdir -p BUILD SRPMS SOURCES ; \
932                 cd SOURCES ; \
933                 ln -s ../../../$(distdir).tar.gz ; \
934                 ln -s ../../../wireshark.desktop ; \
935                 ln -s ../../../image/wsicon64.png wireshark.png ; \
936                 cd .. ; \
937                 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/wireshark.spec && \
938                         echo "Package successfully built in `pwd`/SRPMS." ; \
939         else \
940                 echo "Error: RPM executable and/or source directory not found." ; \
941         fi
942
943 debian-package: debian/rules
944         @if test x$(HAVE_DPKG_BUILDPACKAGE) = xyes ; then \
945                 dpkg-buildpackage -rfakeroot -us -uc ; \
946         else \
947                 echo "Error: Debian packaging tools not found." ; \
948                 echo "Package build abandoned." ; \
949         fi
950
951 # XXX - This assumes we're building from the source directory.
952 osx-package: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
953         @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
954                 rm -rf $(stagedir) ; \
955                 $(MAKE) DESTDIR=$(stagedir) install; \
956                 cd $(srcdir)/packaging/macosx ;  \
957                 ./osx-app.sh -bp ../staging/$(PACKAGE).inst/$(bindir) ; \
958                 ./osx-dmg.sh ; \
959         else \
960                 echo "Error: OS X packaging tools not found." ; \
961                 echo "Package build abandoned." ; \
962         fi
963
964 clean-local:
965         rm -rf $(top_stagedir)
966