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