Return of the .PHONY target (aka cvsversion.h)
[obnox/wireshark/wip.git] / Makefile.am
1 # Makefile.am
2 # Automake file for Ethereal
3 #
4 # $Id: Makefile.am,v 1.716 2004/03/03 00:18:21 jmayer Exp $
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@ @editcap_bin@ @mergecap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@ @text2pcap_bin@
64 bin_SCRIPTS = @idl2eth_bin@
65 man1_MANS = @ethereal_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 editcap mergecap dftest randpkt text2pcap
70 EXTRA_SCRIPTS = idl2eth
71
72 #
73 # Ethereal configuration files are put in $(pkgdatadir).  It currently
74 # contains the "manuf" file and a "diameter" directory.
75 #
76 pkgdata_DATA = manuf
77
78 #
79 # Install the Diameter DTD and XML files in the "diameter" subdirectory
80 # of that directory.
81 #
82 diameterdir = $(pkgdatadir)/diameter
83 diameter_DATA = dictionary.dtd dictionary.xml mobileipv4.xml \
84         nasreq.xml sunping.xml
85
86 PLATFORM_SRC = pcap-util-unix.c
87
88 include Makefile.common
89
90 if HAVE_PLUGINS
91 plugin_libs = \
92         plugins/acn/acn.la \
93         plugins/artnet/artnet.la \
94         plugins/asn1/asn1.la \
95         plugins/docsis/docsis.la \
96         plugins/enttec/enttec.la \
97         plugins/giop/cosnaming.la \
98         plugins/giop/coseventcomm.la \
99         plugins/gryphon/gryphon.la \
100         plugins/irda/irda.la \
101         plugins/lwres/lwres.la \
102         plugins/megaco/megaco.la \
103         plugins/mgcp/mgcp.la \
104         plugins/pcli/pcli.la \
105         plugins/rdm/rdm.la \
106         plugins/rtnet/rtnet.la \
107         plugins/v5ua/v5ua.la
108
109 if ENABLE_STATIC
110 plugin_ldadd = \
111         plugins/acn/packet-acn.o \
112         plugins/artnet/packet-artnet.o \
113         plugins/asn1/packet-asn1.o \
114         plugins/docsis/packet-bpkmattr.o \
115         plugins/docsis/packet-bpkmreq.o \
116         plugins/docsis/packet-bpkmrsp.o \
117         plugins/docsis/packet-docsis.o \
118         plugins/docsis/packet-dsaack.o \
119         plugins/docsis/packet-dsareq.o \
120         plugins/docsis/packet-dsarsp.o \
121         plugins/docsis/packet-dscack.o \
122         plugins/docsis/packet-dscreq.o \
123         plugins/docsis/packet-dscrsp.o \
124         plugins/docsis/packet-dsdreq.o \
125         plugins/docsis/packet-dsdrsp.o \
126         plugins/docsis/packet-macmgmt.o \
127         plugins/docsis/packet-map.o \
128         plugins/docsis/packet-regack.o \
129         plugins/docsis/packet-regreq.o \
130         plugins/docsis/packet-regrsp.o \
131         plugins/docsis/packet-rngreq.o \
132         plugins/docsis/packet-rngrsp.o \
133         plugins/docsis/packet-tlv.o \
134         plugins/docsis/packet-uccreq.o \
135         plugins/docsis/packet-uccrsp.o \
136         plugins/docsis/packet-ucd.o \
137         plugins/enttec/packet-enttec.o \
138         plugins/giop/packet-cosnaming.o \
139         plugins/giop/packet-coseventcomm.o \
140         plugins/gryphon/packet-gryphon.o \
141         plugins/irda/packet-irda.o \
142         plugins/lwres/packet-lwres.o \
143         plugins/megaco/packet-megaco.o \
144         plugins/mgcp/packet-mgcp.o \
145         plugins/pcli/packet-pcli.o \
146         plugins/rdm/packet-rdm.o \
147         plugins/rtnet/packet-rtnet.o \
148         plugins/v5ua/packet-v5ua.o
149
150 else            # ENABLE_STATIC
151 plugin_ldadd = \
152         "-dlopen" self  \
153         "-dlopen" plugins/acn/acn.la \
154         "-dlopen" plugins/artnet/artnet.la \
155         "-dlopen" plugins/asn1/asn1.la \
156         "-dlopen" plugins/docsis/docsis.la \
157         "-dlopen" plugins/enttec/enttec.la \
158         "-dlopen" plugins/giop/cosnaming.la \
159         "-dlopen" plugins/giop/coseventcomm.la \
160         "-dlopen" plugins/gryphon/gryphon.la \
161         "-dlopen" plugins/irda/irda.la \
162         "-dlopen" plugins/lwres/lwres.la \
163         "-dlopen" plugins/megaco/megaco.la \
164         "-dlopen" plugins/mgcp/mgcp.la \
165         "-dlopen" plugins/pcli/pcli.la \
166         "-dlopen" plugins/rdm/rdm.la \
167         "-dlopen" plugins/rtnet/rtnet.la \
168         "-dlopen" plugins/v5ua/v5ua.la
169
170 endif           # ENABLE_STATIC
171
172 else            # HAVE_PLUGINS
173 plugin_libs =
174
175 plugin_ldadd =
176 endif           # HAVE_PLUGINS
177
178 # Optional objects that I know how to build. These will be
179 # linked into the ethereal executable.
180 # They will also be linked into the tethereal executable; if this
181 # list ever grows to include something that can't be linked with
182 # tethereal, or if tethereal needs something that ethereal doesn't,
183 # we should probably split this into stuff needed both
184 # by ethereal and tethereal and stuff needed only by one or the
185 # other.
186 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
187         @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@ @STRPTIME_O@
188
189 # Additional libs that I know how to build. These will be
190 # linked into the ethereal executable.
191 ethereal_additional_libs = \
192         wiretap/libwiretap.a    \
193         gtk/libui.a             \
194         epan/libethereal.a      \
195         epan/ftypes/libftypes.a \
196         epan/dfilter/libdfilter.a
197
198 # This is the automake dependency variable for the executable
199 ethereal_DEPENDENCIES = \
200         $(ethereal_optional_objects)    \
201         $(ethereal_additional_libs)     \
202         $(plugin_libs)
203
204 # This automake variable adds to the link-line for the executable.
205 #
206 # Note that Ethereal doesn't have to be linked with @GLIB_LIBS@, as
207 # they are included in @GTK_LIBS@, and doesn't have to be linked with
208 # @SOCKET_LIBS@ or @NSL_LIBS@, as those should also be included in
209 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
210 # applications are X applications).
211
212 if ENABLE_STATIC
213 ethereal_LDFLAGS = -Wl,-static -all-static
214 else
215 ethereal_LDFLAGS = -export-dynamic
216 endif
217
218 ethereal_LDADD = \
219         $(ethereal_optional_objects)    \
220         $(ethereal_additional_libs)     \
221         @SNMP_LIBS@ @SSL_LIBS@          \
222         $(plugin_ldadd)                 \
223         @PCRE_LIBS@ \
224         @PCAP_LIBS@ @GTK_LIBS@ @ADNS_LIBS@
225
226 # Additional libs that I know how to build. These will be
227 # linked into the tethereal executable.
228 tethereal_additional_libs =             \
229         wiretap/libwiretap.a            \
230         epan/libethereal.a              \
231         epan/ftypes/libftypes.a         \
232         epan/dfilter/libdfilter.a
233
234 # This is the automake dependency variable for the executable
235 tethereal_DEPENDENCIES = \
236         $(ethereal_optional_objects)    \
237         $(tethereal_additional_libs)    \
238         $(plugin_libs)
239
240 # This automake variable adds to the link-line for the executable
241 tethereal_LDADD = \
242         $(ethereal_optional_objects)    \
243         $(tethereal_additional_libs)    \
244         @SNMP_LIBS@ @SSL_LIBS@          \
245         $(plugin_ldadd)                 \
246         @PCRE_LIBS@ \
247         @GLIB_LIBS@ -lm                 \
248         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
249
250 if ENABLE_STATIC
251 tethereal_LDFLAGS = -Wl,-static -all-static
252 else
253 tethereal_LDFLAGS = -export-dynamic
254 endif
255
256 # Optional objects that I know how to build, and that are needed by
257 # text2pcap.
258 text2pcap_optional_objects = @STRERROR_O@ @STRPTIME_O@
259
260 text2pcap_DEPENDENCIES = text2pcap.h
261
262 # This automake variable adds to the link-line for the executable
263 text2pcap_LDADD = $(text2pcap_optional_objects) \
264         @GLIB_LIBS@ -lm
265
266 mergecap_DEPENDENCIES = wiretap/libwiretap.a
267
268 # This is the automake dependency variable for the executable
269 editcap_DEPENDENCIES = wiretap/libwiretap.a
270
271 # This automake variable adds to the link-line for the executable
272 editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
273 mergecap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
274
275 # Common headers
276 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap
277
278 .PHONY: cvsversion.h
279
280 #
281 # Build the version string
282 #
283 cvsversion.h:
284         $(PERL) $(srcdir)/make-version.pl
285
286 #
287 # Build various header files for the X11 dissector.
288 #
289 x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
290         $(PERL) $(srcdir)/process-x11-fields.pl <$(srcdir)/x11-fields
291
292 #
293 # Build shell scripts by doing variable substitution.
294 # Taken from autoconf 2.13.
295 #
296 editsh = sed -e 's,@''SHELL''@,$(SHELL),g'
297
298 SUFFIXES = .sh
299 .sh:
300         rm -f $@ $@.tmp
301         $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
302
303 #
304 # Build "register.c", which contains a function "register_all_protocols()"
305 # that calls the register routines for all protocols.
306 #
307 # We do this by grepping through sources.  If that turns out to be too slow,
308 # maybe we could just require every .o file to have an register routine
309 # of a given name (packet-aarp.o -> proto_register_aarp, etc.).
310 #
311 # Formatting conventions:  The name of the proto_register_* routines must
312 # start in column zero, or must be preceded only by "void " starting in
313 # column zero, and must not be inside #if.
314 #
315 # We assume that all dissector routines are in "packet-XXX.c" files.
316 #
317 # For some unknown reason, having a big "for" loop in the Makefile
318 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
319 # they seem to pass only the first few names in the list to the shell,
320 # for some reason.
321 #
322 # Therefore, we have a script to generate the "register.c" file.
323 #
324 # The first argument is the name of the file to write.
325 # The second argument is the directory in which the source files live.
326 # All subsequent arguments are the files to scan.
327 #
328 register.c: $(plugin_src) $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
329         @if test -n $(PYTHON); then \
330                 echo Making register.c with python ; \
331                 $(PYTHON) $(srcdir)/make-reg-dotc.py $(srcdir) $(DISSECTOR_SRC) ; \
332         else \
333                 echo Making register.c with shell script ; \
334                 $(srcdir)/make-reg-dotc register.c $(srcdir) \
335                         $(plugin_src) $(DISSECTOR_SRC) ; \
336         fi
337
338 #
339 # Build "tethereal-tap-register.c", which contains a function 
340 # "register_all_tap_listeners()"
341 # that calls the register routines for all tehtereal tap listeners.
342 #
343 # We do this by grepping through sources.
344 #
345 # Formatting conventions:  The name of the tap_listener_register_* 
346 # routines must start in column zero, or must be preceded only by 
347 # "void " starting in column zero, and must not be inside #if.
348 #
349 # The first argument is the directory in which the source files live.
350 # All subsequent arguments are the files to scan.
351 #
352 tethereal-tap-register.c: $(TETHEREAL_TAP_SRC) $(srcdir)/make-tapreg-dotc
353         @echo Making tethereal-tap-register.c
354         @$(srcdir)/make-tapreg-dotc tethereal-tap-register.c $(srcdir) $(TETHEREAL_TAP_SRC)
355
356 ps.c: print.ps rdps
357         ./rdps $(srcdir)/print.ps ps.c
358
359 rdps: rdps.c
360         $(CC) $(CFLAGS) -o rdps $(srcdir)/rdps.c
361
362 randpkt_additional_libs = wiretap/libwiretap.a
363
364 randpkt_DEPENDENCIES = \
365         $(randpkt_additional_libs)
366
367 randpkt_LDADD = \
368         $(randpkt_additional_libs) \
369         @GLIB_LIBS@ -lm \
370         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
371
372 dftest_additional_libs =                \
373         wiretap/libwiretap.a            \
374         epan/libethereal.a              \
375         epan/ftypes/libftypes.a         \
376         epan/dfilter/libdfilter.a
377
378 dftest_DEPENDENCIES = \
379         $(ethereal_optional_objects)    \
380         $(dftest_additional_libs)       \
381         $(plugin_libs)
382
383 # This automake variable adds to the link-line for the executable
384 dftest_LDADD = \
385         $(ethereal_optional_objects)    \
386         $(dftest_additional_libs)       \
387         @SNMP_LIBS@ @SSL_LIBS@          \
388         $(plugin_ldadd)                 \
389         @PCRE_LIBS@ \
390         @GLIB_LIBS@ -lm \
391         @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@ @ADNS_LIBS@
392
393 dftest_LDFLAGS = -export-dynamic
394
395 CLEANFILES =    \
396         @rdps_bin@ \
397         idl2eth
398
399 DISTCLEANFILES = \
400         aclocal-missing/*.m4 \
401         ps.c \
402         *~
403
404 MAINTAINERCLEANFILES =          \
405         ps.c
406
407 EXTRA_DIST = \
408         Ethereal.desktop        \
409         FAQ                     \
410         INSTALL.configure       \
411         Makefile.common         \
412         Makefile.nmake          \
413         README.aix              \
414         README.bsd              \
415         README.hpux             \
416         README.irix             \
417         README.linux            \
418         README.tru64            \
419         README.vmware           \
420         README.win32            \
421         TODO                    \
422         aclocal-fallback/glib-2.0.m4 \
423         aclocal-fallback/glib.m4 \
424         aclocal-fallback/gtk-2.0.m4 \
425         aclocal-fallback/gtk.m4 \
426         aclocal-flags           \
427         aclocal-missing/dummy   \
428         autogen.sh              \
429         capture-wpcap.c         \
430         capture-wpcap.h         \
431         cleanbld.bat            \
432         config.h.win32          \
433         config.nmake            \
434         debian/README.debian    \
435         debian/changelog        \
436         debian/control          \
437         debian/copyright        \
438         debian/dirs             \
439         debian/docs             \
440         debian/menu             \
441         debian/postinst         \
442         debian/prerm            \
443         debian/rules            \
444         dictionary.dtd          \
445         dictionary.xml          \
446         doc/Makefile.am         \
447         doc/Makefile.nmake      \
448         doc/README.capture      \
449         doc/README.design       \
450         doc/README.developer    \
451         doc/README.idl2eth      \
452         doc/README.plugins      \
453         doc/README.regression   \
454         doc/README.tapping      \
455         doc/README.tvbuff       \
456         doc/README.xml-output   \
457         doc/dfilter2pod.pl      \
458         doc/editcap.pod         \
459         doc/ethereal-filter.pod.template \
460         doc/ethereal.pod        \
461         doc/idl2eth.pod         \
462         doc/mergecap.pod        \
463         doc/randpkt.txt         \
464         doc/tethereal.pod       \
465         doc/text2pcap.pod       \
466         editcap.c               \
467         ethereal_be.py          \
468         ethereal_gen.py         \
469         getopt.c                \
470         getopt.h                \
471         idl2eth.sh              \
472         image/Ethereal.icns     \
473         image/Makefile.nmake    \
474         image/README.image      \
475         image/clist_ascend.xpm  \
476         image/clist_descend.xpm \
477         image/dn_arrow.xpm      \
478         image/editcap.rc.in     \
479         image/eexcl3d64.xpm     \
480         image/eicon3d16.xpm     \
481         image/eicon3d32.xpm     \
482         image/eicon3d48.xpm     \
483         image/eicon3d64.xpm     \
484         image/elogo3d48x48.png  \
485         image/ethereal.ico      \
486         image/ethereal.rc.in    \
487         image/ethereal48x48-trans.png  \
488         image/ethereal48x48.png \
489         image/hi16-app-ethereal.png     \
490         image/hi32-app-ethereal.png     \
491         image/hi48-app-ethereal.png     \
492         image/icon-ethereal.xpm \
493         image/icon-excl.xpm     \
494         image/lo16-app-ethereal.png     \
495         image/lo32-app-ethereal.png     \
496         image/lo48-app-ethereal.png     \
497         image/mergecap.rc.in    \
498         image/nsis-checked.bmp  \
499         image/nsis-unchecked.bmp        \
500         image/stock_dialog_error_48.xpm \
501         image/stock_dialog_warning_48.xpm       \
502         image/stock_dialog_question_48.xpm      \
503         image/stock_dialog_info_48.xpm  \
504         image/tethereal.rc.in   \
505         image/text2pcap.rc.in   \
506         image/toolbar/capture_24.xpm    \
507         image/toolbar/cfilter_24.xpm    \
508         image/toolbar/dfilter_24.xpm    \
509         image/toolbar/stock_add_24.xpm  \
510         image/toolbar/stock_bottom_24.xpm \
511         image/toolbar/stock_close_24.xpm        \
512         image/toolbar/stock_colorselector_24.xpm        \
513         image/toolbar/stock_help_24.xpm \
514         image/toolbar/stock_jump_to_24.xpm      \
515         image/toolbar/stock_left_arrow_24.xpm \
516         image/toolbar/stock_ok_20.xpm   \
517         image/toolbar/stock_open_24.xpm \
518         image/toolbar/stock_preferences_24.xpm  \
519         image/toolbar/stock_print_24.xpm        \
520         image/toolbar/stock_properties_24.xpm   \
521         image/toolbar/stock_refresh_24.xpm      \
522         image/toolbar/stock_right_arrow_24.xpm  \
523         image/toolbar/stock_save_24.xpm \
524         image/toolbar/stock_save_as_24.xpm \
525         image/toolbar/stock_search_24.xpm       \
526         image/toolbar/stock_stop_24.xpm \
527         image/toolbar/stock_top_24.xpm \
528         image/toolbar/stock_zoom_1_24.xpm \
529         image/toolbar/stock_zoom_in_24.xpm \
530         image/toolbar/stock_zoom_out_24.xpm \
531         image/up_arrow.xpm      \
532         make-manuf              \
533         make-reg-dotc           \
534         make-reg-dotc.py        \
535         make-tapreg-dotc        \
536         make-version.pl         \
537         manuf                   \
538         manuf.tmpl              \
539         mergecap.c              \
540         mobileipv4.xml          \
541         nasreq.xml              \
542         ncp2222.py              \
543         packet-ncp2222.inc      \
544         print.ps                \
545         process-x11-fields.pl   \
546         randpkt.c               \
547         rdps.c                  \
548         sunping.xml             \
549         text2pcap-scanner.l     \
550         text2pcap.c             \
551         text2pcap.h             \
552         wka.tmpl                \
553         x11-fields
554
555 if SETUID_INSTALL
556 install-exec-hook:
557         -chmod +s $(DESTDIR)$(bindir)/ethereal
558         -chmod +s $(DESTDIR)$(bindir)/tethereal
559 else
560 install-exec-hook:
561 endif
562
563 #
564 # Currently register.c can be included in the distribution because
565 # we always build all protocol dissectors. We used to have to check
566 # whether or not to build the snmp dissector. If we again need to
567 # variably build something, making register.c non-portable, uncomment
568 # the dist-hook line below.
569 #
570 # Oh, yuk.  We don't want to include "register.c" in the distribution, as
571 # its contents depend on the configuration, and therefore we want it
572 # to be built when the first "make" is done; however, Automake insists
573 # on putting *all* source into the distribution.
574 #
575 # We work around this by having a "dist-hook" rule that deletes
576 # "register.c", so that "dist" won't pick it up.
577 #
578 #dist-hook:
579 #       @rm -f $(distdir)/register.c
580
581 DIST_SUBDIRS = tools wiretap doc epan plugins packaging gtk help
582
583 if HAVE_PLUGINS
584 SUBDIRS = tools wiretap doc epan plugins packaging help @ethereal_SUBDIRS@
585 else
586 SUBDIRS = tools wiretap doc epan packaging help @ethereal_SUBDIRS@
587 endif
588
589 ethereal.1: ethereal doc/ethereal.pod
590         (cd doc ; \
591         $(MAKE) ../ethereal.1 )
592
593 tethereal.1: tethereal doc/tethereal.pod
594         (cd doc ; \
595         $(MAKE) ../tethereal.1 )
596
597 ethereal-filter.4: tethereal doc/ethereal-filter.pod.template
598         (cd doc ; \
599         $(MAKE) ../ethereal-filter.4 )
600
601 editcap.1: doc/editcap.pod
602         (cd doc ; \
603         $(MAKE) ../editcap.1 )
604
605 idl2eth.1: doc/idl2eth.pod
606         (cd doc ; \
607         $(MAKE) ../idl2eth.1 )
608
609 mergecap.1: doc/mergecap.pod
610         (cd doc ; \
611         $(MAKE) ../mergecap.1 )
612
613 text2pcap.1: doc/text2pcap.pod
614         (cd doc ; \
615         $(MAKE) ../text2pcap.1 )
616
617 libtool: $(LIBTOOL_DEPS)
618         $(SHELL) ./config.status --recheck
619
620 # We load top_stagedir with an explicit path so that libtool doesn't freak.
621 top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
622 stagedir=$(top_stagedir)/$(PACKAGE).stage
623 host_cpu=@host_cpu@
624 host_os=@host_os@
625
626 svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
627         @if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
628                 rm -rf $(stagedir) ; \
629                 $(MAKE) DESTDIR=$(stagedir) install; \
630                 $(srcdir)/packaging/svr4/mkpkg \
631                         $(PACKAGE) \
632                         $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
633                         $(prefix) \
634                         $(top_stagedir) ; \
635         else \
636                 echo "Error: SVR4 packaging tools not found." ; \
637                 echo "Package build abandoned." ; \
638         fi
639
640 solaris-package: svr4-package
641
642 rpm_topdir=`cd $(top_srcdir) && pwd`/packaging/rpm
643 rpm-package: dist
644         if test x$(HAVE_RPM) = xyes ; then \
645                 cd $(rpm_topdir) ; \
646                 mkdir -p BUILD RPMS SOURCES ; \
647                 cd SOURCES ; \
648                 ln -s ../../../$(distdir).tar.gz ; \
649                 cd .. ; \
650                 rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/ethereal.spec && \
651                         echo "Package successfully built in `pwd`/RPMS." ; \
652         else \
653                 echo "Error: RPM executable and/or source directory not found." ; \
654         fi
655 srpm-package: dist
656         if test x$(HAVE_RPM) = xyes ; then \
657                 cd $(rpm_topdir) ; \
658                 mkdir -p BUILD SRPMS SOURCES ; \
659                 cd SOURCES ; \
660                 ln -s ../../../$(distdir).tar.gz ; \
661                 cd .. ; \
662                 rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/ethereal.spec && \
663                         echo "Package successfully built in `pwd`/SRPMS." ; \
664         else \
665                 echo "Error: RPM executable and/or source directory not found." ; \
666         fi
667
668 debian-package: debian/rules
669         dpkg-buildpackage -rfakeroot -us -uc
670
671 clean-local:
672         rm -rf $(top_stagedir)
673
674 test-splint: $(ethereal_SOURCES)
675         splint \
676                 -gnu-extensions -D_U_=""        \
677                 -I. `glib-config --cflags` \
678                 -I./epan \
679                 -I./tools/lemon \
680                 -I./wiretap     \
681                 $(ethereal_SOURCES)