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