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