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