"ssn_range" needs to be a copy of "global_ssn_range", so that it's not
[obnox/wireshark/wip.git] / Makefile.nmake
index fa076f57876483260384eba9d4b0ea7e76777fd8..db2d240dfd22affe65f85adfa349a46779b5630c 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
 #
-# $Id: Makefile.nmake,v 1.411 2004/04/08 20:36:09 gerald Exp $
+# $Id$
 
 include config.nmake
 include <win32.mak>
@@ -29,21 +29,16 @@ include Makefile.common
 
 include epan\Makefile.common
 
-DISSECTOR_SRC = $(DISSECTOR_SRC:../=)
-DISSECTOR_OBJECTS = $(DISSECTOR_SRC:.c=.obj)
+BUILT_SOURCES =        $(BUILT_SOURCES) \
+       svnversion.h
 
 DISSECTOR_SUPPORT_SRC = $(DISSECTOR_SUPPORT_SRC:../=)
 DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_SRC:.c=.obj)
+#DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_OBJECTS:../=)
 
-# remove register.obj from "DISSECTOR_SUPPORT_OBJECTS". 
-# creation and compilation of register.c has been moved to epan.  
-DISSECTOR_SUPPORT_OBJECTS = $(DISSECTOR_SUPPORT_OBJECTS:register.obj=)
-
-ethereal_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(ethereal_SOURCES:.c=.obj)
-
-tethereal_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(tethereal_SOURCES:.c=.obj)
-
-dftest_OBJECTS = $(DISSECTOR_OBJECTS) $(DISSECTOR_SUPPORT_OBJECTS) $(dftest_SOURCES:.c=.obj)
+ethereal_OBJECTS = $(ethereal_SOURCES:.c=.obj)
+tethereal_OBJECTS = $(tethereal_SOURCES:.c=.obj)
+dftest_OBJECTS = $(dftest_SOURCES:.c=.obj)
 
 randpkt_OBJECTS = $(randpkt_SOURCES:.c=.obj)
 
@@ -54,24 +49,38 @@ EXTRA_OBJECTS = \
        strptime.obj
 
 ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
+       wsock32.lib user32.lib shell32.lib \
+       $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+       epan\libethereal.lib \
+!ELSE
+       epan\dissectors\dissectors.lib \
        epan\ethereal.lib \
        epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
-       wsock32.lib user32.lib \
        $(ADNS_LIBS) \
        $(PCRE_LIBS) \
-       $(ZLIB_LIBS) \
-       $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+       $(ZLIB_LIBS)
+!ENDIF
 #      $(PCAP_DIR)\lib\wpcap.lib
 
 tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
-       epan\ethereal.lib \
-       epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
        wsock32.lib user32.lib \
        $(GLIB_LIBS) \
+       $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+       epan\libethereal.lib \
+!ELSE
+       epan\dissectors\dissectors.lib \
+       epan\ethereal.lib \
+       epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
        $(ADNS_LIBS) \
        $(PCRE_LIBS) \
-       $(ZLIB_LIBS) \
-       $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+       $(ZLIB_LIBS)
+!ENDIF
+
+capinfo_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
+       wsock32.lib user32.lib \
+       $(GLIB_LIBS)
 
 editcap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        wsock32.lib user32.lib \
@@ -81,26 +90,34 @@ mergecap_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        wsock32.lib user32.lib \
        $(GLIB_LIBS)
 
-dftest_LIBS=  wiretap\wiretap-$(WTAP_VERSION).lib epan\ethereal.lib \
-       epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
+dftest_LIBS=  wiretap\wiretap-$(WTAP_VERSION).lib \
        wsock32.lib user32.lib \
-       wiretap\wiretap-$(WTAP_VERSION).lib \
        $(GLIB_LIBS) \
+       $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \
+!IFDEF ENABLE_LIBETHEREAL
+       epan\libethereal.lib \
+!ELSE
+       epan\dissectors\dissectors.lib \
+       epan\ethereal.lib \
+       epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
        $(ADNS_LIBS) \
        $(PCRE_LIBS) \
-       $(ZLIB_LIBS) \
-       $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+       $(ZLIB_LIBS)    
+!ENDIF
 
 randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
        user32.lib \
        $(GLIB_LIBS) \
-       $(NET_SNMP_DIR)\win32\lib\netsnmp.lib
+       $(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib
 
-EXECUTABLES=ethereal.exe ethereal-gtk2.exe tethereal.exe editcap.exe mergecap.exe text2pcap.exe
+EXECUTABLES=ethereal.exe ethereal-gtk2.exe tethereal.exe \
+       capinfo.exe editcap.exe mergecap.exe text2pcap.exe
 
-RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res image\mergecap.res image\text2pcap.res
+RESOURCES=image\ethereal.res image\libethereal.res image\tethereal.res \
+       image\capinfo.res image\editcap.res image\mergecap.res \
+       image\text2pcap.res image\wiretap.res
 
-all: tools wiretap epan image $(EXECUTABLES) $(RESOURCES) doc
+all: config.h tools image wiretap epan $(EXECUTABLES) $(RESOURCES) doc
 
 packaging: all
        cd packaging
@@ -109,7 +126,7 @@ packaging: all
        cd ..
        cd ..
 
-seperate_packaging: all
+separate_packaging: all
        cd packaging
        cd nsis
 !IFDEF GTK1_DIR
@@ -128,27 +145,33 @@ wiretap\wiretap-$(WTAP_VERSION).lib: wiretap
 !IFNDEF GTK1_DIR
 ethereal.exe   : 
 !ELSE
-ethereal.exe   : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib plugins
+ethereal.exe   : config.h svnversion.h $(ethereal_OBJECTS) epan gtk image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk\libui.lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:ethereal.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK1_LIBS) gtk\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
+               /OUT:ethereal.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK1_LIBS) gtk\libui.lib $(ethereal_OBJECTS) image\ethereal.res
 <<
 !ENDIF
 
 !IFNDEF GTK2_DIR
 ethereal-gtk2.exe      : 
 !ELSE
-ethereal-gtk2.exe      : config.h cvsversion.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) epan gtk2 image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk2.tmp\libui.lib plugins
+ethereal-gtk2.exe      : config.h svnversion.h $(ethereal_OBJECTS) epan gtk2 image\ethereal.res wiretap\wiretap-$(WTAP_VERSION).lib gtk2.tmp\libui.lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:ethereal-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK2_LIBS) gtk2.tmp\libui.lib $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res
+               /OUT:ethereal-gtk2.exe $(guiflags) $(guilibsdll) $(LDFLAGS) /SUBSYSTEM:windows $(ethereal_LIBS) $(GTK2_LIBS) gtk2.tmp\libui.lib $(ethereal_OBJECTS) image\ethereal.res
 <<
 !ENDIF
 
-tethereal.exe  : config.h cvsversion.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
+tethereal.exe  : config.h svnversion.h $(tethereal_OBJECTS) epan image\tethereal.res wiretap\wiretap-$(WTAP_VERSION).lib plugins
        @echo Linking $@
        $(LINK) @<<
-               /OUT:tethereal.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) image\tethereal.res
+               /OUT:tethereal.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(tethereal_LIBS) $(tethereal_OBJECTS) image\tethereal.res
+<<
+
+capinfo.exe    : config.h capinfo.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\capinfo.res
+       @echo Linking $@
+       $(LINK) @<<
+               /OUT:capinfo.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console capinfo.obj getopt.obj $(capinfo_LIBS) image\capinfo.res
 <<
 
 editcap.exe    : config.h editcap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\editcap.res
@@ -157,10 +180,10 @@ editcap.exe       : config.h editcap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).li
                /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res
 <<
 
-mergecap.exe   : config.h cvsversion.h mergecap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
+mergecap.exe   : config.h svnversion.h mergecap.obj merge.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).lib image\mergecap.res
        @echo Linking $@
        $(LINK) @<<
-               /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
+               /OUT:mergecap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console mergecap.obj merge.obj getopt.obj $(mergecap_LIBS) image\mergecap.res
 <<
 
 text2pcap.exe  : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
@@ -169,12 +192,12 @@ text2pcap.exe     : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj strptime
                /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj strptime.obj image\text2pcap.res
 <<
 
-dftest.exe     : $(dftest_OBJECTS) $(EXTRA_OBJECTS)
+dftest.exe     : $(dftest_OBJECTS) epan
        $(LINK) @<<
-               /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS)
+               /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS)
 <<
 
-randpkt.exe    : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
+randpkt.exe    : $(randpkt_OBJECTS)
        $(LINK) @<<
                /OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
 <<
@@ -183,9 +206,13 @@ config.h   : config.h.win32 config.nmake
        sed -e s/@VERSION@/$(VERSION)/ \
            -e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
            -e "s/@HAVE_PCRE@/$(PCRE_CONFIG)/" \
+           -e "s/@HAVE_NETTLE@/$(NETTLE_CONFIG)/" \
            -e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
            -e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
            -e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
+           -e "s/@HAVE_PCAP_DATALINK_NAME_TO_VAL@/$(PCAP_DATALINK_NAME_TO_VAL_CONFIG)/" \
+           -e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
+           -e "s/@HAVE_LIBETHEREALDLL@/$(LIBETHEREAL_CONFIG)/" \
            -e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
            < config.h.win32 > $@
 
@@ -196,32 +223,15 @@ ps.c      : rdps.exe print.ps
 #
 # Build the version string
 #
-cvsversion.h:
+svnversion.h:
        $(PERL) make-version.pl
 
 #
-# The header files listed here are built from x11-fields using Perl;
-# we declare a dependency here so that they get built.
-#
-packet-x11.obj : packet-x11.c x11-declarations.h x11-register-info.h
-
-#
-# Build various header files for the X11 dissector.
+# Build the short version of the authors file for the about dialog
 #
-x11-declarations.h x11-register-info.h: x11-fields process-x11-fields.pl
-       $(PERL) process-x11-fields.pl <x11-fields
+AUTHORS-SHORT: AUTHORS make-authors-short.pl make-authors-short2.pl
+       $(PERL) make-authors-short.pl < AUTHORS > AUTHORS-SHORT
 
-packet-ncp2222.c : ncp2222.py
-!IFDEF PYTHON
-       @echo Making packet-ncp2222.c
-       $(PYTHON) ncp2222.py -o packet-ncp2222.c
-!ELSE
-       @echo Faking packet-ncp2222.c...
-       @echo Python is required to build the NCP disector
-       @echo Hiding packet-ncp.c...
-       mv packet-ncp.c packet-ncp.c.save
-       touch packet-ncp.c $@
-!ENDIF
 
 #
 # Build "tethereal-tap-register.c", which contains a function 
@@ -252,10 +262,10 @@ gtk2_distclean:
 clean: gtk2_distclean
        rm -f $(ethereal_OBJECTS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS) \
                $(EXECUTABLES) $(PDB_FILE) \
-               editcap.obj mergecap.obj text2pcap.obj getopt.obj\
+               capinfo.obj editcap.obj mergecap.obj text2pcap.obj getopt.obj\
                text2pcap-scanner.obj text2pcap-scanner.c rdps.obj \
-               rdps.pdb config.h ps.c \
-               rdps.exe rdps.ilk dftest.obj dftest.exe randpkt.obj randpkt.ext \
+               rdps.pdb rdps.exe rdps.ilk config.h ps.c AUTHORS-SHORT \
+               dftest.obj dftest.exe randpkt.obj randpkt.ext doxygen.cfg \
                $(RESOURCES)
        cd wiretap
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
@@ -281,7 +291,7 @@ clean: gtk2_distclean
 # Be sure to have python and perl installed to regenerate them.
 distclean: clean gtk2_distclean
        rm -f $(BUILT_SOURCES) \
-               packet-ncp2222.c tethereal-tap-register.c 
+               tethereal-tap-register.c 
        cd wiretap
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake distclean
        cd ../gtk
@@ -317,13 +327,13 @@ wiretap::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
-gtk:: help config.h cvsversion.h
+gtk:: help config.h svnversion.h AUTHORS-SHORT doxygen
        cd gtk
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK1_CFLAGS)" GTK_LIBS="$(GTK1_LIBS)" libui.lib
        cd ..
 
 # copy all required files to gtk2.tmp (but only when newer than existing) and compile in that dir
-gtk2:: help config.h cvsversion.h
+gtk2:: help config.h svnversion.h AUTHORS-SHORT
        if not exist gtk2.tmp mkdir gtk2.tmp
        cd gtk
        cp --update --preserve Makefile.* *.c *.h ..\gtk2.tmp
@@ -331,7 +341,7 @@ gtk2:: help config.h cvsversion.h
        $(MAKE) /$(MAKEFLAGS) /f Makefile.nmake GTK_CFLAGS="$(GTK2_CFLAGS)" GTK_LIBS="$(GTK2_LIBS)" libui.lib
        cd ..
 
-epan:: packet-ncp2222.c x11-declarations.h x11-register-info.h
+epan:: $(DISSECTOR_SUPPORT_OBJECTS) $(EXTRA_OBJECTS) $(RESOURCES) $(BUILT_SOURCES) doxygen
        cd epan
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
@@ -351,53 +361,127 @@ help::
        $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake
        cd ..
 
-REQUIRED_APPS=\
-       bison   \
-       flex    \
+doxygen.cfg: config.nmake doxygen.cfg.in
+       sed -e s/@VERSION@/$(VERSION)/ \
+           < doxygen.cfg.in > $@
+
+doxygen-run:
+!IFDEF DOXYGEN
+       $(DOXYGEN) doxygen.cfg
+!ENDIF
+
+doxygen: doxygen.cfg doxygen-run
+
+REQUIRED_TOOLS=\
+       $(SH)   \
+       $(YACC) \
+       $(LEX)  \
        grep    \
-       perl    \
-       python  \
+       $(PERL) \
+       $(PYTHON)       \
        sed     \
        unzip   \
        wget
 
-setup:
-       @$(SH) tools\win32-setup.sh --appverify $(REQUIRED_APPS)
+verify_tools:
+       @$(SH) tools\win32-setup.sh --appverify $(REQUIRED_TOOLS)
+
+# Download and install all the required libraries into ETHEREAL_LIBS.
+# If you used this setup target before, consider doing a clean_setup.
+setup: verify_tools
+!IF "$(GTK2_INST_VERSION)" == "2.4"
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               glib gtk2.4/glib-2.4.7.zip
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               glib gtk2.4/glib-dev-2.4.7.zip
+!ELSE
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                glib glib-2.2.3-20040116.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                glib glib-dev-2.2.3-20040116.zip
+!ENDIF
+!IFDEF GTK1_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                gtk+ gtk+-1.3.0-20030717.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                gtk+ gtk+-dev-1.3.0-20030115.zip
+!ENDIF
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                libiconv-1.9.1.bin.woe32 libiconv-1.9.1.bin.woe32.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                gettext-runtime-0.13.1 gettext-runtime-0.13.1.zip
+!IFDEF NET_SNMP_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               . net-snmp-5.1.zip
+               . net-snmp-5.1.2.zip
+!ENDIF
+!IFDEF PCAP_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                . wpdpack_3_0.zip
+!ENDIF
+!IFDEF ADNS_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               . adns-1.0-win32-03.zip
+               . adns-1.0-win32-04.zip
+!ENDIF
+!IFDEF PCRE_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                . pcre-4.4.zip
+!ENDIF
+!IFDEF ZLIB_DIR
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                zlib121-dll zlib121-dll.zip
+!ENDIF
+!IFDEF GTK2_DIR
+!IF "$(GTK2_INST_VERSION)" == "2.4"
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               gtk2 gtk2/gtk+-2.2.4-20040124.zip
+               gtk2 gtk2.4/gtk+-2.4.10-20041001.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               gtk2 gtk2/gtk+-dev-2.2.4-20040124.zip
+               gtk2 gtk2.4/gtk+-dev-2.4.10.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               gtk2 gtk2/pango-1.2.5-20040124.zip
+               gtk2 gtk2.4/atk-1.6.0.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               gtk2 gtk2/pango-dev-1.2.5-20040124.zip
+               gtk2 gtk2.4/atk-dev-1.6.0.zip
+!ELSE
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk2 gtk2/gtk+-2.2.4-20040124.zip
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk2 gtk2/gtk+-dev-2.2.4-20040124.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                gtk2 gtk2/atk-1.4.0.zip
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
                gtk2 gtk2/atk-dev-1.4.0.zip
+!ENDIF
+!IF "$(PANGO_INST_VERSION)" == "1.4"
        @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
-               gtk-wimp gtk2/gtk-wimp-0.5.3-bin.zip
-       @echo ""
+               gtk2 gtk2.4/pango-1.4.1.zip
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk2 gtk2.4/pango-dev-1.4.1.zip
+!ELSE
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk2 gtk2/pango-1.2.5-20040124.zip
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk2 gtk2/pango-dev-1.2.5-20040124.zip
+!ENDIF
+!ENDIF
+!IFDEF GTK_WIMP_DIR
+       @$(SH) tools\win32-setup.sh --download "$(ETHEREAL_LIBS)" \
+               gtk-wimp gtk-wimp/gtk-wimp-0.6.2-bin.zip
+!ENDIF
+       @echo.
        @echo Ethereal is ready to build.
+
+# Cleanup files installed by the setup target. It will not remove the 
+# downloaded zip files.
+clean_setup:
+    rm -r -f $(ETHEREAL_LIBS)/glib
+    rm -r -f $(ETHEREAL_LIBS)/gtk+
+    rm -r -f $(ETHEREAL_LIBS)/libiconv-1.9.1.bin.woe32
+    rm -r -f $(ETHEREAL_LIBS)/gettext-runtime-0.13.1
+    rm -r -f $(ETHEREAL_LIBS)/zlib121-dll
+    rm -r -f $(ETHEREAL_LIBS)/gtk2
+    rm -r -f $(ETHEREAL_LIBS)/gtk-wimp
+
+update_plugin_api: config.h
+       cd plugins
+       $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake xyzzy
+       cd ..
+