Give the code that computes protocol statistics a progress dialog box,
[obnox/wireshark/wip.git] / Makefile.am
index 50e175079a24bd625a6ca01bc5fdeb5906258f74..ae71558054b472b8835698345cb96a08965fcb02 100644 (file)
@@ -1,7 +1,7 @@
 # Makefile.am
 # Automake file for Ethereal
 #
-# $Id: Makefile.am,v 1.207 2000/07/05 09:40:37 guy Exp $
+# $Id: Makefile.am,v 1.296 2001/03/24 02:07:20 guy Exp $
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@zing.org>
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
-EXTRA_PROGRAMS = ethereal_static
-bin_PROGRAMS = ethereal editcap tethereal
+ACLOCAL_AMFLAGS = `./aclocal-flags`
 
-man_MANS = ethereal.1 editcap.1 tethereal.1
+#
+# This is a hideous hack.
+#
+# Automake needs to know into which sections to install various man
+# pages; if the names in "man_MANS" have suffixes, it can infer the
+# sections from the name (e.g., "hello.1" goes in section 1), but if
+# they don't have suffixes, it can't tell what sections to put them, and
+# it just gives up and doesn't create any rules to install them (and it
+# gives up silently, so you have no clue what's wrong).
+#
+# Therefore, we can't just set "man_MANS" to a list of variables to be
+# filled in by the configure script, as those variables don't have man
+# page section numbers.
+#
+# It turns out (although this is not documented anywhere I could find
+# in the automake Info file) that if you define, instead, variables with
+# names like "man{section}_MANS", automake will infer that the names in
+# those variables are the names of man pages to be installed in section
+# "{section}".
+#
+# So, as all our man pages go in section 1, we define "man1_MANS" to
+# contain all the man page.
+#
+# *However*, if "man_MANS" isn't defined at all, automake concludes that
+# there are no man pages, the fact that, say, "man1_MANS" is defined
+# nonwithstanding!  (I suspect this is the result of a mistaken attempt
+# to get people to fix their automake files not to use "MANS"; if "MANS"
+# is defined, it prints a warning and sets the exit status, but doesn't
+# exit, and then it just gives up if "man_MANS" isn't defined,
+# presumably on the theory that the only reason it wouldn't be defined
+# is because the automake file uses the obsolete "MANS" variable instead
+# of the shiny new "man_MANS" variable.)
+#
+# So we also define "man_MANS", but don't define it as anything;
+# automake will arrange that the Makefile define it as the union of all
+# the "man{section}_MANS" variables.
+#
+bin_PROGRAMS = @ethereal_bin@ @editcap_bin@ @tethereal_bin@ @dftest_bin@ @randpkt_bin@
+man1_MANS = @ethereal_man@ @editcap_man@ @tethereal_man@
+man_MANS = 
 
-sysconf_DATA = manuf
+EXTRA_PROGRAMS = ethereal ethereal_static tethereal tethereal_static editcap dftest
 
-# Any POSIX-compatible YACC should honor the -p flag
-YFLAGS=-d -p dfilter_
+sysconf_DATA = manuf
 
 DISSECTOR_SOURCES = \
        packet-aarp.c  \
        packet-afs.c   \
+       packet-aim.c   \
        packet-arp.c   \
        packet-ascend.c\
        packet-atalk.c \
@@ -44,28 +82,40 @@ DISSECTOR_SOURCES = \
        packet-bootp.c \
        packet-bootparams.c \
        packet-bpdu.c  \
+       packet-bxxp.c \
        packet-cdp.c   \
        packet-cgmp.c  \
+       packet-chdlc.c  \
        packet-clip.c  \
        packet-clnp.c  \
        packet-cops.c  \
+       packet-cups.c  \
        packet-data.c  \
+       packet-dcerpc.c  \
        packet-ddtp.c  \
+       packet-dec-bpdu.c \
+       packet-diameter.c \
        packet-dns.c   \
        packet-eigrp.c \
        packet-esis.c  \
        packet-eth.c   \
        packet-ethertype.c   \
        packet-fddi.c  \
+       packet-fr.c    \
+       packet-frame.c  \
        packet-ftp.c   \
        packet-giop.c  \
        packet-gre.c   \
+       packet-gvrp.c  \
        packet-h1.c    \
+       packet-h261.c  \
+       packet-hclnfsd.c  \
        packet-hsrp.c  \
        packet-http.c  \
        packet-icmpv6.c\
        packet-icp.c   \
        packet-icq.c   \
+       packet-igrp.c  \
        packet-imap.c   \
        packet-ip.c    \
        packet-ipp.c   \
@@ -73,6 +123,8 @@ DISSECTOR_SOURCES = \
        packet-ipv6.c  \
        packet-ipx.c   \
        packet-irc.c   \
+       packet-ieee80211.c \
+       packet-ieee8023.c \
        packet-isakmp.c\
        packet-isis.c  \
        packet-isis-clv.c \
@@ -80,12 +132,18 @@ DISSECTOR_SOURCES = \
        packet-isis-lsp.c \
        packet-isis-snp.c \
        packet-isl.c   \
+       packet-iua.c   \
+       packet-kerberos.c \
        packet-l2tp.c  \
        packet-lapb.c  \
+       packet-lapbether.c \
        packet-lapd.c  \
        packet-ldap.c  \
+       packet-ldp.c   \
        packet-llc.c   \
+       packet-lmi.c   \
        packet-lpd.c   \
+       packet-m3ua.c  \
        packet-mapi.c  \
        packet-mip.c  \
        packet-mount.c \
@@ -94,6 +152,7 @@ DISSECTOR_SOURCES = \
        packet-nbipx.c \
        packet-nbns.c  \
        packet-ncp.c   \
+       packet-ncp2222.c   \
        packet-netbios.c \
        packet-nfs.c   \
        packet-nlm.c   \
@@ -111,31 +170,40 @@ DISSECTOR_SOURCES = \
        packet-pptp.c  \
        packet-q2931.c \
        packet-q931.c  \
+       packet-quake.c \
        packet-radius.c\
        packet-raw.c   \
        packet-rip.c   \
        packet-ripng.c \
        packet-rlogin.c \
        packet-rpc.c   \
+       packet-rquota.c \
+       packet-rsh.c   \
        packet-rsvp.c  \
        packet-rtcp.c  \
        packet-rtp.c   \
        packet-rtsp.c  \
        packet-rx.c  \
        packet-sap.c   \
+       packet-sctp.c   \
        packet-sdp.c   \
+       packet-sip.c   \
+       packet-sll.c   \
        packet-smb.c   \
        packet-smb-browse.c \
        packet-smb-common.c \
        packet-smb-logon.c \
        packet-smb-mailslot.c \
        packet-smb-pipe.c \
+       packet-smtp.c \
        packet-sna.c   \
        packet-snmp.c   \
        packet-socks.c \
        packet-srvloc.c \
        packet-sscop.c \
        packet-stat.c   \
+       packet-stat-notify.c \
+       packet-sual.c   \
        packet-syslog.c \
        packet-tacacs.c \
        packet-tcp.c   \
@@ -143,6 +211,7 @@ DISSECTOR_SOURCES = \
        packet-tftp.c  \
        packet-time.c  \
        packet-tns.c \
+       packet-tpkt.c  \
        packet-tr.c    \
        packet-trmac.c \
        packet-udp.c   \
@@ -152,35 +221,46 @@ DISSECTOR_SOURCES = \
        packet-vrrp.c \
        packet-vtp.c  \
        packet-wccp.c \
+       packet-wcp.c \
        packet-who.c  \
+       packet-wap.c \
+       packet-wtls.c \
+       packet-wsp.c \
+       packet-wtp.c \
        packet-x11.c   \
        packet-x25.c   \
+       packet-xot.c   \
        packet-yhoo.c  \
        packet-ypbind.c \
        packet-ypserv.c \
-       packet-ypxfr.c
+       packet-ypxfr.c \
+       packet-zebra.c
 
 noinst_HEADERS = \
        packet-afs.h   \
+       packet-afs-macros.h \
+       packet-afs-register-info.h \
+       packet-afs-defs.h \
        packet-arp.h   \
-       packet-ascend.h\
        packet-atalk.h \
-       packet-atm.h   \
        packet-bgp.h   \
        packet-bootparams.h \
-       packet-bpdu.h  \
-       packet-cdp.h   \
-       packet-cgmp.h  \
+       packet-chdlc.h \
        packet-clip.h  \
-       packet-clnp.h  \
        packet-ddtp.h  \
+       packet-diameter-defs.h \
        packet-dns.h   \
        packet-esis.h  \
        packet-eth.h   \
        packet-fddi.h  \
+       packet-frame.h  \
+       packet-gvrp.h  \
+       packet-h261.h  \
+       packet-hclnfsd.h  \
        packet-http.h  \
+       packet-ieee80211.h \
+       packet-ieee8023.h \
        packet-ip.h    \
-       packet-ipp.h   \
        packet-ipsec.h \
        packet-ipv6.h  \
        packet-ipx.h   \
@@ -190,12 +270,10 @@ noinst_HEADERS = \
        packet-isis-lsp.h \
        packet-isis-snp.h \
        packet-isl.h   \
-       packet-lapb.h  \
-       packet-lapd.h  \
        packet-ldap.h  \
        packet-llc.h   \
        packet-mount.h \
-       packet-nbipx.h \
+       packet-ncp-int.h \
        packet-netbios.h \
        packet-nfs.h   \
        packet-nlm.h   \
@@ -203,92 +281,82 @@ noinst_HEADERS = \
        packet-null.h  \
        packet-osi.h   \
        packet-osi-options.h \
-       packet-ospf.h  \
        packet-portmap.h   \
        packet-ppp.h   \
        packet-q2931.h \
        packet-q931.h  \
        packet-raw.h   \
-       packet-rip.h   \
        packet-ripng.h \
        packet-rpc.h   \
+       packet-rquota.h \
        packet-rtcp.h  \
        packet-rtp.h   \
        packet-rx.h  \
-       packet-sdp.h   \
+       packet-sll.h   \
        packet-smb.h   \
+       packet-smb-browse.h \
        packet-smb-common.h \
+       packet-smb-logon.h \
+       packet-smb-mailslot.h \
+       packet-smb-pipe.h \
        packet-sna.h   \
        packet-snmp.h   \
        packet-sscop.h \
        packet-stat.h   \
+       packet-stat-notify.h \
        packet-tcp.h   \
-       packet-tftp.h  \
        packet-tns.h \
+       packet-tpkt.h  \
        packet-tr.h    \
-       packet-trmac.h \
        packet-udp.h   \
-       packet-v120.h \
        packet-vines.h \
        packet-vlan.h \
-       packet-vtp.h  \
+       packet-wccp.h \
+       packet-wap.h \
+       packet-wtls.h \
+       packet-wtp.h \
+       packet-wsp.h \
        packet-x11-declarations.h       \
        packet-x11-register-info.h      \
        packet-x11-keysym.h     \
-       packet-x25.h   \
        packet-yhoo.h  \
        packet-ypbind.h \
        packet-ypserv.h \
        packet-ypxfr.h 
 
 ETHEREAL_COMMON_SOURCES = \
+       aftypes.h      \
        alignment.h    \
        asn1.c         \
        asn1.h         \
+       bridged_pids.h \
        column.c       \
        column.h       \
-       conversation.c \
-       conversation.h \
-       dfilter-int.h  \
-       dfilter-grammar.y \
-       dfilter-scanner.l \
-       dfilter.c      \
-       dfilter.h      \
+       color.h        \
        etypes.h       \
-       except.c        \
-       except.h        \
-       exceptions.h    \
        follow.c       \
        follow.h       \
-       inet_v6defs.h  \
+       greproto.h     \
+       in_cksum.c     \
+       in_cksum.h     \
        ipproto.c      \
-       ipv4.c         \
-       ipv4.h         \
        llcsaps.h      \
        nlpid.h        \
        oui.h          \
-       packet.c       \
-       packet.h       \
-       plugins.c      \
-       plugins.h      \
        ppptypes.h     \
        prefs.c        \
        prefs.h        \
        prefs-int.h    \
        print.c        \
        print.h        \
-       proto.c        \
-       proto.h        \
        ps.c           \
        ps.h           \
+       ptvcursor.c     \
+       ptvcursor.h     \
        register.c     \
        register.h     \
-       resolv.c       \
-       resolv.h       \
        smb.h          \
        timestamp.h    \
-       tvbuff.c        \
-       tvbuff.h        \
        util.c         \
        util.h         \
        xdlc.c         \
@@ -301,8 +369,13 @@ ethereal_SOURCES = \
        capture.h      \
        file.c         \
        file.h         \
+       filters.c      \
+       filters.h      \
        globals.h      \
        menu.h         \
+       progress_dlg.h \
+       proto_hier_stats.h      \
+       proto_hier_stats.c      \
        simple_dialog.h \
        summary.c      \
        summary.h      \
@@ -312,20 +385,15 @@ ethereal_static_SOURCES = \
        $(ethereal_SOURCES)
 
 EXTRA_ethereal_SOURCES = \
-       dfilter-grammar.c \
-       dfilter-grammar.h \
-       dfilter-scanner.c \
        snprintf.c      \
        snprintf.h      \
        snprintf-imp.h  \
        strerror.c      \
        strerror.h      \
+       strcasecmp.c    \
        strncasecmp.c   \
        mkstemp.c       \
-       mkstemp.h       \
-       inet_aton.c     \
-       inet_pton.c     \
-       inet_ntop.c
+       mkstemp.h
 
 # Optional objects that I know how to build. These will be
 # linked into the ethereal executable.
@@ -336,18 +404,23 @@ EXTRA_ethereal_SOURCES = \
 # by ethereal and tethereal and stuff needed only by one or the
 # other.
 ethereal_optional_objects = @SNPRINTF_O@ @STRERROR_O@ \
-       @STRNCASECMP_O@ @MKSTEMP_O@ \
-       @INET_ATON_O@ @INET_PTON_O@ @INET_NTOP_O@ 
+       @STRCASECMP_O@ @STRNCASECMP_O@ @MKSTEMP_O@
 
 # Additional libs that I know how to build. These will be
 # linked into the ethereal executable.
-ethereal_additional_libs = wiretap/libwiretap.a gtk/libui.a
+ethereal_additional_libs = \
+       wiretap/libwiretap.a    \
+       gtk/libui.a             \
+       epan/libethereal.a      \
+       epan/ftypes/libftypes.a \
+       epan/dfilter/libdfilter.a
 
 # This is the automake dependency variable for the executable
 ethereal_DEPENDENCIES = \
        $(ethereal_optional_objects)    \
        $(ethereal_additional_libs)     \
-       plugins/gryphon/gryphon.la
+       plugins/gryphon/gryphon.la \
+       plugins/mgcp/mgcp.la
 
 ethereal_static_DEPENDENCIES = \
        $(ethereal_optional_objects)    \
@@ -363,14 +436,15 @@ ethereal_static_DEPENDENCIES = \
 ethereal_LDADD = \
        $(ethereal_optional_objects)    \
        $(ethereal_additional_libs)     \
-       @SNMP_LIBS@                     \
+       @SNMP_LIBS@ @SSL_LIBS@          \
        "-dlopen" self  \
-       "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@
+       "-dlopen" plugins/gryphon/gryphon.la @PCAP_LIBS@ @GTK_LIBS@ \
+       "-dlopen" plugins/mgcp/mgcp.la @PCAP_LIBS@ @GTK_LIBS@
 
 ethereal_static_LDADD = \
        $(ethereal_optional_objects)    \
-       $(ethereal_additional_libs) \
-       @SNMP_LIBS@                     \
+       $(ethereal_additional_libs)     \
+       @SNMP_LIBS@ @SSL_LIBS@          \
        @PCAP_LIBS@ @GTK_LIBS@
 
 ethereal_LDFLAGS = -export-dynamic
@@ -381,26 +455,47 @@ tethereal_SOURCES = \
        $(ETHEREAL_COMMON_SOURCES) \
        tethereal.c
 
+tethereal_static_SOURCES = \
+       $(tethereal_SOURCES)
+
 # Additional libs that I know how to build. These will be
 # linked into the tethereal executable.
-tethereal_additional_libs = wiretap/libwiretap.a
+tethereal_additional_libs =            \
+       wiretap/libwiretap.a            \
+       epan/libethereal.a              \
+       epan/ftypes/libftypes.a         \
+       epan/dfilter/libdfilter.a
 
 # This is the automake dependency variable for the executable
 tethereal_DEPENDENCIES = \
        $(ethereal_optional_objects)    \
        $(tethereal_additional_libs)    \
-       plugins/gryphon/gryphon.la
+       plugins/gryphon/gryphon.la      \
+       plugins/mgcp/mgcp.la
+
+tethereal_static_DEPENDENCIES = \
+       $(ethereal_optional_objects)    \
+       $(tethereal_additional_libs)    
 
 # This automake variable adds to the link-line for the executable
 tethereal_LDADD = wiretap/libwiretap.a \
        $(ethereal_optional_objects)    \
        $(tethereal_additional_libs)    \
-       @SNMP_LIBS@                     \
+       @SNMP_LIBS@ @SSL_LIBS@          \
        "-dlopen" self  \
        "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
+       "-dlopen" plugins/mgcp/mgcp.la @GLIB_LIBS@ -lm \
+       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
+
+tethereal_static_LDADD = wiretap/libwiretap.a  \
+       $(ethereal_optional_objects)    \
+       $(tethereal_additional_libs)    \
+       @SNMP_LIBS@ @SSL_LIBS@          \
+       @GLIB_LIBS@ -lm \
        @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
 
 tethereal_LDFLAGS = -export-dynamic
+tethereal_static_LDFLAGS = -Wl,-static
 
 editcap_SOURCES = editcap.c
 
@@ -422,8 +517,7 @@ editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
 # start in column zero, or must be preceded only by "void " starting in
 # column zero, and must not be inside #if.
 #
-# We assume that all dissector routines are in "packet-XXX.c" files,
-# or in "packet.c".
+# We assume that all dissector routines are in "packet-XXX.c" files.
 #
 # For some unknown reason, having a big "for" loop in the Makefile
 # to scan all the "packet-XXX.c" files doesn't work with some "make"s;
@@ -435,9 +529,9 @@ editcap_LDADD = wiretap/libwiretap.a @GLIB_LIBS@
 # The first argument is the directory in which the source files live.
 # All subsequent arguments are the files to scan.
 #
-register.c: packet.c $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
+register.c: $(DISSECTOR_SOURCES) $(srcdir)/make-reg-dotc
        @echo Making register.c
-       @$(srcdir)/make-reg-dotc $(srcdir) packet.c $(DISSECTOR_SOURCES)
+       @$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SOURCES)
 
 ps.c: print.ps rdps
        ./rdps $(srcdir)/print.ps ps.c
@@ -451,8 +545,34 @@ randpkt.o: randpkt.c
 randpkt: randpkt.o wiretap/libwiretap.a
        $(LINK) -o randpkt randpkt.o wiretap/libwiretap.a `glib-config --libs` -lz
 
-tvbtest: tvbtest.o tvbuff.o except.o
-       $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o `glib-config --libs`
+
+dftest_SOURCES = \
+       $(DISSECTOR_SOURCES) \
+       $(ETHEREAL_COMMON_SOURCES) \
+       dftest.c
+
+dftest_additional_libs =               \
+       epan/libethereal.a              \
+       epan/ftypes/libftypes.a         \
+       epan/dfilter/libdfilter.a
+
+dftest_DEPENDENCIES = \
+       $(ethereal_optional_objects)    \
+       $(dftest_additional_libs)       \
+       plugins/gryphon/gryphon.la \
+       plugins/mgcp/mgcp.la
+
+# This automake variable adds to the link-line for the executable
+dftest_LDADD = \
+       $(ethereal_optional_objects)    \
+       $(dftest_additional_libs)       \
+       @SNMP_LIBS@ @SSL_LIBS@          \
+       "-dlopen" self  \
+       "-dlopen" plugins/gryphon/gryphon.la @GLIB_LIBS@ -lm \
+       "-dlopen" plugins/mgcp/mgcp.la @GLIB_LIBS@ -lm \
+       @PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
+
+dftest_LDFLAGS = -export-dynamic
 
 DISTCLEANFILES =       \
        register.c      \
@@ -461,6 +581,7 @@ DISTCLEANFILES =    \
        *~
 
 EXTRA_DIST = \
+       aclocal-flags           \
        config.h.win32          \
        config.nmake            \
        debian/README.debian    \
@@ -478,13 +599,12 @@ EXTRA_DIST = \
        doc/Makefile.am         \
        doc/README.regression   \
        doc/README.tvbuff       \
-       doc/dfilter2pod.in      \
+       doc/dfilter2pod.pl      \
        doc/editcap.pod         \
        doc/ethereal.pod.template \
        doc/randpkt.txt         \
        doc/tethereal.pod.template \
        editcap.c               \
-       ethereal.spec.in         \
        getopt.c                \
        getopt.h                \
        ieee-float.h            \
@@ -497,9 +617,15 @@ EXTRA_DIST = \
        image/icon-ethereal.xpm \
        image/tethereal.rc      \
        INSTALL.configure       \
+       libpcap-0.4.HPUX.HPUXPAC.patch \
+       libpcap-0.4.HPUX.LBL.patch \
+       libpcap-0.5.HPUX.tcpdump.org.patch \
        Makefile.nmake          \
        make-reg-dotc           \
+       make-reg-dotc.py        \
        manuf                   \
+       ncp2222.py              \
+       packet-ncp2222.inc      \
        print.ps                \
        README.aix              \
        README.bsd              \
@@ -511,7 +637,6 @@ EXTRA_DIST = \
        README.win32            \
        randpkt.c               \
        rdps.c                  \
-       tvbtest.c               \
        TODO
 
 if SETUID_INSTALL
@@ -541,7 +666,7 @@ endif
 #dist-hook:
 #      @rm -f $(distdir)/register.c
 
-SUBDIRS = wiretap gtk plugins @ethereal_SUBDIRS@
+SUBDIRS = tools wiretap epan plugins packaging @ethereal_SUBDIRS@
 
 ethereal.1: ethereal doc/ethereal.pod.template
        (cd doc ; \
@@ -555,8 +680,56 @@ editcap.1: doc/editcap.pod
        (cd doc ; \
        $(MAKE) ../editcap.1 )
 
-dfilter-scanner.c : dfilter-scanner.l
-       $(LEX) -Pdfilter_ -odfilter-scanner.c $(srcdir)/dfilter-scanner.l
+packet-ncp2222.c : ncp2222.py
+       $(PYTHON) $(srcdir)/ncp2222.py > $@
 
 libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
+
+# We load top_stagedir with an explicit path so that libtool doesn't freak.
+top_stagedir=`cd $(top_srcdir) && pwd`/packaging/svr4.stage
+stagedir=$(top_stagedir)/$(PACKAGE).stage
+host_cpu=@host_cpu@
+host_os=@host_os@
+
+svr4-package: $(bin_SCRIPTS) $(lib_LTLIBRARIES)
+       if test x$(HAVE_SVR4_PACKAGING) = xyes ; then \
+               rm -rf $(stagedir) ; \
+               $(MAKE) DESTDIR=$(stagedir) install-strip; \
+               $(srcdir)/packaging/svr4/mkpkg \
+                       $(PACKAGE) \
+                       $(PACKAGE)-$(VERSION)-$(host_os)-$(host_cpu)-local \
+                       $(prefix) \
+                       $(top_stagedir) ; \
+       else \
+               echo "Error: SVR4 packaging tools not found." ; \
+               echo "Package build abandoned." ; \
+       fi
+
+solaris-package: svr4-package
+
+specfile=$(top_srcdir)/packaging/rpm/ethereal.spec
+
+rpm-package: dist
+       if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
+               cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
+               rpm -bb --clean --rmsource $(specfile) ; \
+       else \
+               echo "Error: RPM executable and/or source directory not found." ; \
+               echo "Package build abandoned." ; \
+       fi
+
+srpm-package: dist
+       if test x$(HAVE_RPM_PACKAGING) = xyes ; then \
+               cp $(top_srcdir)/$(distdir).tar.gz $(RPM_SOURCEDIR) ; \
+               rpm -bs --clean --rmsource $(specfile) ; \
+       else \
+               echo "Error: RPM executable and/or source directory not found." ; \
+               echo "Package build abandoned." ; \
+       fi
+
+debian-package: debian/rules
+       dpkg-buildpackage -rfakeroot -us -uc
+
+clean-local:
+       rm -rf $(top_stagedir)