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