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