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