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