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