Fix a comparison.
[metze/wireshark/wip.git] / Makefile.am
index 2b073cd5be27a1aeb2f649ccac86dd588b8abb79..11443feecec6f4ea5c0a21d7b6e061152ca6a1db 100644 (file)
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+AM_DISTCHECK_CONFIGURE_FLAGS=@GUI_CONFIGURE_FLAGS@
 ACLOCAL_AMFLAGS = `./aclocal-flags`
 
-INCLUDES= @LUA_INCLUDES@
-
 if HAVE_LIBPY
 py_dissectors_dir = -DPYTHON_DIR=\"@pythondir@\"
 else
@@ -37,35 +36,48 @@ AM_CLEAN_CFLAGS = -Werror
 endif
 
 bin_PROGRAMS = \
-       @wireshark_bin@ \
-       @tshark_bin@    \
-       @text2pcap_bin@ \
-       @mergecap_bin@  \
-       @capinfos_bin@  \
-       @editcap_bin@   \
-       @randpkt_bin@   \
-       @dftest_bin@    \
-       @dumpcap_bin@   \
+       @wireshark_bin@         \
+       @tshark_bin@            \
+       @text2pcap_bin@         \
+       @mergecap_bin@          \
+       @capinfos_bin@          \
+       @editcap_bin@           \
+       @randpkt_bin@           \
+       @dftest_bin@            \
+       @dumpcap_bin@           \
        @reordercap_bin@        \
-       @rawshark_bin@
+       @rawshark_bin@          \
+       @echld_test_bin@
 
-EXTRA_PROGRAMS = wireshark tshark capinfos editcap mergecap dftest \
-       randpkt text2pcap dumpcap reordercap rawshark wireshark_cxx
+EXTRA_PROGRAMS = wireshark wireshark-qt tshark capinfos editcap mergecap \
+       dftest randpkt text2pcap dumpcap reordercap rawshark wireshark_cxx \
+       echld_test
 
 #
 # Wireshark configuration files are put in $(pkgdatadir).
 #
-pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
+dist_pkgdata_DATA = COPYING manuf services cfilters colorfilters dfilters \
        smi_modules ipmap.html pdml2html.xsl
 
+#
+# Install global profiles in the "profiles" subdirectory
+#
+profilesdir = $(pkgdatadir)
+nobase_dist_profiles_DATA = \
+       profiles/Bluetooth/colorfilters \
+       profiles/Classic/colorfilters
+
 #
 # Install the Diameter DTD and XML files in the "diameter" subdirectory
 # of that directory.
 #
 diameterdir = $(pkgdatadir)/diameter
-diameter_DATA = \
+include diameter/Custom.make
+dist_diameter_DATA = $(_CUSTOM_diameter_xml_files_) \
        diameter/chargecontrol.xml \
+       diameter/ChinaTelecom.xml \
        diameter/Cisco.xml \
+       diameter/Custom.xml \
        diameter/dictionary.dtd \
        diameter/dictionary.xml \
        diameter/eap.xml \
@@ -81,19 +93,20 @@ diameter_DATA = \
        diameter/TGPPGmb.xml \
        diameter/TGPPRx.xml \
        diameter/TGPPS9.xml \
-       diameter/TGPPSh.xml     \
+       diameter/TGPPSh.xml \
        diameter/Vodafone.xml \
        diameter/AlcatelLucent.xml \
        diameter/Nokia.xml \
        diameter/NokiaSiemensNetworks.xml \
-       diameter/SKT.xml
+       diameter/SKT.xml \
+       diameter/VerizonWireless.xml
 
 #
 # Install the DTDs directory files in the "dtds" subdirectory
 # of that directory
 #
 dtdsdir = $(pkgdatadir)/dtds
-dtds_DATA = \
+dist_dtds_DATA = \
        dtds/dc.dtd \
        dtds/itunes.dtd \
        dtds/mscml.dtd \
@@ -112,8 +125,8 @@ dtds_DATA = \
 # of that directory.
 #
 radiusdir = $(pkgdatadir)/radius
--include radius/Custom.make
-radius_DATA = $(_CUSTOM_radius_dict_) \
+include radius/Custom.make
+dist_radius_DATA = $(_CUSTOM_radius_dict_) \
        radius/README.radius_dictionary  \
        radius/custom.includes  \
        radius/dictionary  \
@@ -265,7 +278,7 @@ radius_DATA = $(_CUSTOM_radius_dict_) \
 # of that directory
 #
 tpncpdir = $(pkgdatadir)/tpncp
-tpncp_DATA = \
+dist_tpncp_DATA = \
        tpncp/tpncp.dat
 
 #
@@ -273,13 +286,12 @@ tpncp_DATA = \
 # of that directory
 #
 wimaxasncpdir = $(pkgdatadir)/wimaxasncp
-wimaxasncp_DATA = \
+dist_wimaxasncp_DATA = \
        wimaxasncp/dictionary.xml \
        wimaxasncp/dictionary.dtd
 
 PLATFORM_SRC = \
-       capture-pcap-util-unix.c \
-       capture_unix_ifnames.c
+       capture-pcap-util-unix.c
 
 if HAVE_PLUGINS
 -include plugins/Custom.make
@@ -300,7 +312,6 @@ plugin_ldadd = $(_CUSTOM_plugin_ldadd_) \
 
 WTAP_PLUGIN_SOURCES = \
        epan/plugins.c \
-       epan/report_err.c \
        epan/filesystem.c
 
 else           # HAVE_PLUGINS
@@ -313,10 +324,20 @@ endif             # HAVE_PLUGINS
 include Makefile.common
 
 if ENABLE_STATIC
+if HAVE_GTK
 wireshark_LDFLAGS = -Wl,-static -all-static
+endif
+if HAVE_Qt
+wireshark_qt_LDFLAGS = -Wl,-static -all-static
+endif
 else
+if HAVE_GTK
 wireshark_LDFLAGS = -export-dynamic
 endif
+if HAVE_Qt
+wireshark_qt_LDFLAGS = -export-dynamic
+endif
+endif
 
 # Libraries and plugin flags with which to link wireshark.
 #
@@ -340,14 +361,7 @@ endif
 # although it's also possible that -lgmodule is in GTK_LIBS but not
 # GLIB_LIBS (that's the case on my machine right now, for example).
 #
-if HAVE_Qt
-wireshark_ui_ldadd = ui/qt/libqtui.a
-else
-wireshark_ui_ldadd = ui/gtk/libgtkui.a
-endif
-
-wireshark_LDADD = \
-       $(wireshark_ui_ldadd)           \
+wireshark_ldadd = \
        ui/libui.a                      \
        ui/libui_dirty.a                \
        codecs/libcodec.a               \
@@ -368,12 +382,29 @@ wireshark_LDADD = \
        @LIBGNUTLS_LIBS@                \
        @LIBSMI_LDFLAGS@                \
        @PORTAUDIO_LIBS@                \
-       @GTK_LIBS@                      \
-       @Qt_LIBS@                       \
        @GLIB_LIBS@                     \
        -lm
 
+if HAVE_Qt
+wireshark_qt_SOURCES = $(WIRESHARK_COMMON_SRC)
+wireshark_qt_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
+wireshark_qt_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
+wireshark_qt_LDADD =  ui/qt/libqtui.a $(wireshark_ldadd) @Qt_LIBS@
+#
+# XXX - this makes wireshark_qt_LDFLAGS not work; we should figure out
+# another way to get wireshark-qt linked as a C++ program, perhaps by
+# having a top-level wireshark-qt.cpp file that contains main() and
+# hthat calls the UI code from ui/qt.
+#
+wireshark_qt_LINK = $(CXXLINK)
+endif
+
+if HAVE_GTK
+wireshark_SOURCES = $(WIRESHARK_COMMON_SRC)
+wireshark_INCLUDES = $(WIRESHARK_COMMON_INCLUDES)
 wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
+wireshark_LDADD = ui/gtk/libgtkui.a $(wireshark_ldadd) @GTK_LIBS@
+endif
 
 # Ideally we could trigger automatic c++ linking here with
 #   nodist_EXTRA_wireshark_SOURCES = dummy.cpp
@@ -383,12 +414,6 @@ wireshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
 nodist_EXTRA_wireshark_cxx_SOURCES = dummy.cpp
 wireshark_cxx_SOURCES =
 
-if HAVE_WIRESHARK_CXX
-wireshark_LINK = $(CXXLINK)
-else
-wireshark_LINK = $(LINK)
-endif
-
 if ENABLE_STATIC
 tshark_LDFLAGS = -Wl,-static -all-static
 else
@@ -520,6 +545,24 @@ dftest_LDADD = \
        @LIBSMI_LDFLAGS@
 dftest_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
 
+echld_test_LDADD = \
+       epan/libwireshark.la \
+       echld/libechld.la \
+       wsutil/libwsutil.la \
+       @GLIB_LIBS@ -lm                 \
+       @PCAP_LIBS@                     \
+       @SOCKET_LIBS@                   \
+       @NSL_LIBS@                      \
+       @C_ARES_LIBS@                   \
+       @ADNS_LIBS@
+
+echld_test_DEPENDENCIES = \
+       echld/libechld.la \
+       epan/libwireshark.la
+
+echld_test_CFLAGS = $(AM_CLEAN_CFLAGS)
+
+
 # Libraries with which to link dumpcap.
 dumpcap_LDADD = \
        wsutil/libwsutil.la             \
@@ -535,7 +578,8 @@ dumpcap_LDFLAGS = $(PIE_LDFLAGS)
 
 # Common headers
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
-       $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS)
+       $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(PY_CFLAGS) \
+       @LUA_INCLUDES@ -DTOP_SRCDIR=\"$(abs_top_srcdir)\"
 
 #
 # Build the version string
@@ -543,8 +587,13 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/wiretap \
 # FORCE is the portable version of .PHONY
 FORCE:
 
+AM_V_PERL = $(am__v_PERL_@AM_V@)
+am__v_PERL_ = $(am__v_PERL_@AM_DEFAULT_V@)
+am__v_PERL_0 = @echo "  PERL    " $@;
+am__v_PERL_1 =
+
 svnversion.h: FORCE
-       $(PERL) $(srcdir)/make-version.pl $(srcdir)
+       $(AM_V_PERL)$(PERL) $(srcdir)/make-version.pl $(srcdir)
 
 #
 # Build shell scripts by doing variable substitution.
@@ -557,14 +606,12 @@ SUFFIXES = .sh
        rm -f $@ $@.tmp
        $(editsh) $< > $@.tmp && chmod +x $@.tmp && mv $@.tmp $@
 
-ps.c: print.ps $(srcdir)/tools/rdps.py
-       $(PYTHON) $(srcdir)/tools/rdps.py $(srcdir)/print.ps ps.c
-
 services:
-       $(PERL) $(srcdir)/tools/make-services.pl
+       $(PYTHON) $(srcdir)/tools/make-services.py
 
 CLEANFILES =           \
        *~              \
+       doxygen-core.tag        \
        vgcore.*
 
 #
@@ -611,8 +658,11 @@ EXTRA_DIST = \
        README.vmware           \
        README.windows          \
        abi-descriptor.template \
+       aclocal-fallback/libsmi.m4 \
+       aclocal-fallback/libgcrypt.m4 \
        aclocal-fallback/glib-2.0.m4 \
        aclocal-fallback/gtk-2.0.m4 \
+       aclocal-fallback/gtk-3.0.m4 \
        aclocal-flags           \
        adns_dll.dep            \
        adns_dll.rc             \
@@ -635,7 +685,6 @@ EXTRA_DIST = \
        debian/dirs             \
        debian/headers-check.c  \
        debian/patches/00list   \
-       debian/patches/03_preferences.dpatch \
        debian/postinst         \
        debian/pycompat         \
        debian/pyversions       \
@@ -661,6 +710,7 @@ EXTRA_DIST = \
        doxygen.cfg.in          \
        dumpcap.c       \
        editcap.c               \
+       epan/print.ps           \
        fix/FIX.xml             \
        fix/FIX40.xml           \
        fix/FIX41.xml           \
@@ -716,9 +766,11 @@ EXTRA_DIST = \
        image/clist_ascend.xpm                  \
        image/clist_descend.xpm                 \
        image/copy-8.png                        \
+       image/dfilter_apply_disabled.png        \
        image/dfilter_apply_hover.png           \
        image/dfilter_apply_normal.png          \
        image/dfilter_apply_pressed.png         \
+       image/dfilter_bookmark_disabled.png     \
        image/dfilter_bookmark_hover.png        \
        image/dfilter_bookmark_normal.png       \
        image/dfilter_bookmark_pressed.png      \
@@ -752,16 +804,17 @@ EXTRA_DIST = \
        image/lo16-app-wireshark.png    \
        image/lo32-app-wireshark.png    \
        image/lo48-app-wireshark.png    \
-       image/make-icons                        \
        image/Makefile.nmake                    \
        image/mergecap.rc.in                    \
        image/minus-8.png                       \
        image/nsis-checked.bmp                  \
        image/nsis-unchecked.bmp                \
+       image/openhand-16.png                   \
        image/plus-8.png                        \
        image/rawshark.rc.in                    \
        image/README.image                      \
        image/reordercap.rc.in                  \
+       image/rubberband-16.png                 \
        image/status.qrc                        \
        image/stock_dialog_error_48.xpm         \
        image/stock_dialog_info_48.xpm          \
@@ -779,12 +832,17 @@ EXTRA_DIST = \
        image/toolbar/capture_details_24.xpm    \
        image/toolbar/capture_ethernet_16.xpm   \
        image/toolbar/capture_filter_24.xpm     \
-       image/toolbar/capture_interfaces_24.xpm \
-       image/toolbar/capture_options_24.xpm    \
+       image/toolbar/capture_interfaces_16.png \
+       image/toolbar/capture_interfaces_24.png \
+       image/toolbar/capture_options_16.png    \
+       image/toolbar/capture_options_24.png    \
        image/toolbar/capture_prepare_16.xpm    \
-       image/toolbar/capture_restart_24.xpm    \
-       image/toolbar/capture_start_24.xpm      \
-       image/toolbar/capture_stop_24.xpm       \
+       image/toolbar/capture_restart_16.png    \
+       image/toolbar/capture_restart_24.png    \
+       image/toolbar/capture_start_16.png      \
+       image/toolbar/capture_start_24.png      \
+       image/toolbar/capture_stop_16.png       \
+       image/toolbar/capture_stop_24.png       \
        image/toolbar/checkbox_16.xpm           \
        image/toolbar/colorize_24.xpm           \
        image/toolbar/conversations_16.xpm      \
@@ -797,6 +855,8 @@ EXTRA_DIST = \
        image/toolbar/file_set_next_16.xpm      \
        image/toolbar/file_set_previous_16.xpm  \
        image/toolbar/flow_graph_16.xpm \
+       image/toolbar/gnome_emblem_web_16.png   \
+       image/toolbar/gnome_emblem_web_24.png   \
        image/toolbar/graphs_16.xpm     \
        image/toolbar/icon_color_0.xpm  \
        image/toolbar/icon_color_1.xpm  \
@@ -830,7 +890,6 @@ EXTRA_DIST = \
        image/toolbar/voip_flow_24.xpm  \
        image/toolbar/web_support_24.xpm        \
        image/toolbar/wep_closed_24.xpm \
-       image/toolbar/wiki_24.xpm       \
        image/tshark.rc.in      \
        image/voip_bg.xpm       \
        image/voip_select.xpm   \
@@ -839,55 +898,49 @@ EXTRA_DIST = \
        image/wireshark.rc.in   \
        image/wiresharkdoc.ico  \
        image/wiresharkinst.ico \
-       image/WiresharkDoc-128.png      \
        image/WiresharkDoc-16.png       \
        image/WiresharkDoc-24.png       \
-       image/WiresharkDoc-256.png      \
        image/WiresharkDoc-32.png       \
        image/WiresharkDoc-48.png       \
        image/WiresharkDoc-64.png       \
+       image/WiresharkDoc-128.png      \
+       image/WiresharkDoc-256.png      \
        image/wiretap.rc.in     \
        image/wsicon.svg        \
        image/wsicon16.png      \
-       image/wsicon16.xpm      \
-       image/wsicon256.png     \
+       image/wsicon24.png      \
        image/wsicon32.png      \
-       image/wsicon32.xpm      \
        image/wsicon48.png      \
-       image/wsicon48.xpm      \
        image/wsicon64.png      \
-       image/wsicon64.xpm      \
+       image/wsicon128.png     \
+       image/wsicon256.png     \
+       image/wsicon512.png     \
+       image/wsicon1024.png    \
        image/wsicon-ask.png    \
        image/wsicon-ask.svg    \
        image/wsiconcap.svg     \
-       image/wsiconcap16.xpm   \
        image/wsiconcap256.png  \
-       image/wsiconcap32.xpm   \
-       image/wsiconcap48.xpm   \
+       image/wsiconcap512.png  \
+       image/wsiconcap1024.png \
        image/wsiconinst.svg    \
        image/wsiconinst256.png \
        image/wslogo-dev.svg    \
        image/wslogo.eps        \
        image/wslogo.svg        \
-       image/wssplash-dev.xpm  \
-       image/wssplash.xpm      \
+       image/wssplash_dev.png  \
+       image/wssplash.png      \
        ipmap.html              \
        macosx-setup.sh         \
+        macosx-support-lib-patches/glib-gconvert.c.patch \
        macosx-support-lib-patches/glib-pkgconfig.patch \
        macosx-support-lib-patches/gnutls-pkgconfig.patch \
        macosx-support-lib-patches/portaudio-pa_mac_core.h.patch \
+       macosx-support-lib-patches/portaudio-pa_mac_core.c.patch \
        make-version.pl         \
        manuf                   \
        manuf.tmpl              \
        mergecap.c              \
        pdml2html.xsl           \
-       print.ps                \
-       $(diameter_DATA)        \
-       $(dtds_DATA)            \
-       $(radius_DATA)          \
-       $(tpncp_DATA)           \
-       $(ui_DATA)              \
-       $(wimaxasncp_DATA)      \
        reordercap.c            \
        smi_modules             \
        text2pcap-scanner.l     \
@@ -929,7 +982,6 @@ EXTRA_DIST = \
        cmake/modules/FindPCAP.cmake            \
        cmake/modules/FindPOD.cmake             \
        cmake/modules/FindPORTAUDIO.cmake       \
-       cmake/modules/FindPYTHON.cmake          \
        cmake/modules/FindSED.cmake             \
        cmake/modules/FindSH.cmake              \
        cmake/modules/FindSMI.cmake             \
@@ -973,16 +1025,16 @@ endif
 endif
 
 
-DIST_SUBDIRS = asn1 codecs doc epan ui ui/cli ui/gtk ui/qt help packaging plugins tools wiretap wsutil docbook
+DIST_SUBDIRS = asn1 codecs doc epan echld ui ui/cli ui/gtk ui/qt help packaging plugins tools wiretap wsutil docbook
 
 if HAVE_PLUGINS
-SUBDIRS = tools wsutil wiretap epan plugins packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
+SUBDIRS = tools wsutil wiretap epan @echld_dir@ plugins packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
 else
-SUBDIRS = tools wsutil wiretap epan packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
+SUBDIRS = tools wsutil wiretap epan @echld_dir@ packaging help ui @wireshark_SUBDIRS@ ui/cli . doc
 endif
 
 help/faq.txt: $(srcdir)/help/faq.py
-       (cd help ; \
+       $(AM_V_GEN)(cd help ; \
        $(MAKE) faq.txt ;)
 
 libtool: $(LIBTOOL_DEPS)
@@ -1009,10 +1061,30 @@ patch-bzip2: distdir
        fi
        $(am__remove_distdir)
 
+# Install some desktop files (for use with GNOME, KDE, or any other freedesktop.org-compliant desktops)
+# No, these do not go into $(datarootdir): the desktop won't look for them there.
+# Yes, that violate's autofoo's principle of relocatability.
+# What we (probably) should do is check `pkg-config --variable=prefix gtk+-2.0` to know where
+# to install this stuff...
+install_desktop_files:
+       mkdir -p $(DESTDIR)/usr/share/{mime/packages,applications}
+       install -m 644 -T wireshark-mime-package.xml $(DESTDIR)/usr/share/mime/packages/wireshark.xml
+       if test x$(DESKTOP_FILE_INSTALL) != x ; then \
+               $(DESKTOP_FILE_INSTALL) --dir $(DESTDIR)/usr/share/applications wireshark.desktop; \
+       else \
+               install -m 644 -T wireshark.desktop $(DESTDIR)/usr/share/applications/wireshark.desktop; \
+       fi
+       for size in 16 24 32 48 64 128 256; \
+       do \
+               mkdir -p $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/{apps,mimetypes} ; \
+               install -m 644 image/wsicon$${size}.png  $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/apps/wireshark.png ; \
+               install -m 644 -T image/WiresharkDoc-$${size}.png  $(DESTDIR)/usr/share/icons/hicolor/$${size}x$${size}/mimetypes/application-wireshark-doc.png ; \
+       done
+       @echo "Don't forget to run \"update-desktop-database\" and \"update-mime-database /usr/share/mime\""
 
 # Used by svr4-package and osx-package
 # We load top_stagedir with an explicit path so that libtool doesn't freak.
-top_stagedir=`cd $(top_srcdir) && pwd`/packaging/staging
+top_stagedir=`cd $(top_builddir) && pwd`/packaging/staging
 stagedir=$(top_stagedir)/$(PACKAGE).inst
 
 host_cpu=@host_cpu@
@@ -1036,50 +1108,18 @@ solaris-package: svr4-package
 
 rpm_topdir=`cd $(top_builddir) && pwd`/packaging/rpm
 rpm-package: dist
-       if test x$(HAVE_RPM) = xyes ; then \
-               cd $(rpm_topdir) ; \
-               mkdir -p BUILD RPMS SOURCES ; \
-               cd SOURCES ; \
-               ln -s ../../../$(distdir).tar.bz2 ; \
-               ln -s ../../../wireshark.desktop ; \
-               ln -s ../../../image/wsicon64.png wireshark.png ; \
-               cd .. ; \
-               rpmbuild --define "_topdir `cd . && pwd`" -bb SPECS/wireshark.spec && \
-                       echo "Package successfully built in `pwd`/RPMS." ; \
-       else \
-               echo "Error: RPM executable and/or source directory not found." ; \
-       fi
-
-# Install some desktop files (for use with GNOME and/or freedesktop.org-compliant desktops?)
-install_desktop_files:
-       mkdir -p $(datarootdir)/{icons/gnome/{16x16,32x32,48x48,256x256}/mimetypes,mime/packages}
-       install -m 644 -T wireshark-mime-package.xml $(datarootdir)/mime/packages/wireshark.xml
-       install -m 644 -T wireshark.desktop $(datarootdir)/applications
-       mkdir -p $(datarootdir)/icons/hicolor/{16x16,32x32,48x48,64x64,256x256}/apps
-       install -m 644 image/wsicon16.png  $(datarootdir)/icons/hicolor/16x16/apps/wireshark.png
-       install -m 644 image/wsicon32.png  $(datarootdir)/icons/hicolor/32x32/apps/wireshark.png
-       install -m 644 image/wsicon48.png  $(datarootdir)/icons/hicolor/48x48/apps/wireshark.png
-       install -m 644 image/wsicon64.png  $(datarootdir)/icons/hicolor/64x64/apps/wireshark.png
-       install -m 644 image/wsicon256.png $(datarootdir)/icons/hicolor/256x256/apps/wireshark.png
-       install -m 644 -T image/WiresharkDoc-16.png  $(datarootdir)/icons/gnome/16x16/mimetypes/application-wireshark-doc.png
-       install -m 644 -T image/WiresharkDoc-32.png  $(datarootdir)/icons/gnome/32x32/mimetypes/application-wireshark-doc.png
-       install -m 644 -T image/WiresharkDoc-48.png  $(datarootdir)/icons/gnome/48x48/mimetypes/application-wireshark-doc.png
-       install -m 644 -T image/WiresharkDoc-256.png $(datarootdir)/icons/gnome/256x256/mimetypes/application-wireshark-doc.png
-       @echo "Don't forget to run \"update-desktop-database\" and \"update-mime-database $(datarootdir)/mime\""
-
-srpm-package: dist
-       if test x$(HAVE_RPM) = xyes ; then \
+       @if test x$(HAVE_RPM) = xyes ; then \
                cd $(rpm_topdir) ; \
-               mkdir -p BUILD SRPMS SOURCES ; \
+               mkdir -p BUILD RPMS SOURCES SRPMS; \
                cd SOURCES ; \
-               ln -s ../../../$(distdir).tar.bz2 ; \
-               ln -s ../../../wireshark.desktop ; \
-               ln -s ../../../image/wsicon64.png wireshark.png ; \
+               ln -sf ../../../$(distdir).tar.bz2 ; \
                cd .. ; \
-               rpmbuild --define "_topdir `cd . && pwd`" -bs SPECS/wireshark.spec && \
-                       echo "Package successfully built in `pwd`/SRPMS." ; \
+               rpmbuild --define "_topdir `cd . && pwd`" --define "_prefix $(prefix)" --clean -ba SPECS/wireshark.spec && \
+                       echo "Package successfully built in `pwd`/RPMS." && \
+                       rm -f SOURCES/$(distdir).tar.bz2 $(distdir).tar.bz2 ; \
        else \
                echo "Error: RPM executable and/or source directory not found." ; \
+               false; \
        fi
 
 debian-package: debian/rules
@@ -1096,7 +1136,7 @@ osx-app: $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) packaging/macosx/Info.plist
                rm -rf $(stagedir) ; \
                $(MAKE) DESTDIR=$(stagedir) install; \
                cd $(srcdir)/packaging/macosx ;  \
-               ./osx-app.sh -bp ../staging/$(PACKAGE).inst$(bindir) ; \
+               ./osx-app.sh @OSX_APP_FLAGS@ -bp ../staging/$(PACKAGE).inst$(bindir) ; \
        else \
                echo "Error: OS X packaging tools not found." ; \
                echo "Package build abandoned." ; \
@@ -1110,7 +1150,7 @@ osx-package: osx-app packaging/macosx/COPYING.txt
        @if test x$(HAVE_OSX_PACKAGING) = xyes ; then \
                cd $(srcdir)/packaging/macosx ;  \
                chmod +x ./osx-dmg.sh ; \
-               ./osx-dmg.sh ; \
+               ./osx-dmg.sh @OSX_DMG_FLAGS@ ; \
        fi
 
 osx-install: osx-app
@@ -1123,9 +1163,9 @@ clean-local:
        rm -rf $(top_stagedir)
 
 dumpabi:
-       $(MAKE) -C wiretap dumpabi
-       $(MAKE) -C epan dumpabi
-       $(MAKE) -C wsutil dumpabi
+       $(MAKE) -C wiretap dumpabi-libwiretap
+       $(MAKE) -C epan dumpabi-libwireshark
+       $(MAKE) -C wsutil dumpabi-libwsutil
 
 checkapi_local:
        $(PERL) tools/checkAPIs.pl -build \
@@ -1146,3 +1186,18 @@ checkapi: checkapi_local
        cd epan/dissectors && $(MAKE) checkapi
        cd plugins && $(MAKE) checkapi
        cd wsutil && $(MAKE) checkapi
+
+wsar_html: doxygen.cfg doxygen_global.cfg FORCE
+if HAVE_DOXYGEN
+       rm -rf wsar_html
+       cd epan && $(MAKE) $@
+       cd ui && $(MAKE) $@
+       (umask 022 ; $(DOXYGEN) doxygen.cfg)
+endif
+
+wsar-zip: wsar_html
+if HAVE_DOXYGEN
+       rm -f wsar_html.zip
+       zip -rq wsar_html.zip wsar_html
+endif
+