This note describes how to build ntop on win2k using the MinGW
toolchain (MinGW allows you to build native win32 binaries linked
against the Microsoft runtime and not the cygwin runtime).

Prerequistes:

  1) MinGW      (available from http://www.mingw.org)
     This was tested against MinGW-1.1.tar.gz

  2) GNU Make   (available from http://www.mingw.org)
     This was tested with GNU Make v3.79.1, (comes with MinGW-1.1)

  2) WinPCAP developer's pack (available from
     http://netgroup-serv.polito.it/winpcap/install/bin/WPdpack.zip)
     This was tested with Release 2.2 of WinPcap

  3) gdbm for win32/mingw (from http://sourceforge.net/projects/mingwrep)
     This was tested with gdbm-1.8.0-20010430.zip

  4) ntop  (available from http://www.ntop.org)

Steps

  1) Install all prerequisites

  2) Edit the ntop/Makefile.mingw and fill in the following values:

     INC_GDBM        (where the gdbm header files can be found)
     INC_WPDPACK     (where the winpcap header files can be found)
     LIB_GDBM        (where libgdbm.a is found)
     LIB_WPDPACK     (where libpcap.a is found)

     If you're using a separate gdchart, gd, libpng, or libz, you'll
     also need to change the include and library paths for these as well.

  3) Build the sub-components (starting from the ntop-current directory)

     3a) Build zlib

         cd gdchart0.94c/zlib1.1.3
         make -f Makefile.mingw
         cd ../..

     3b) Build libpng

         cd gdchart0.94c/gd-1.8.3/libpng-1.0.8
         make -f scripts/makefile.mingw
         cd ../../../

     3c) Build gd

         cd gdchart0.94c/gd-1.8.3
         make -f Makefile.mingw
         cd ../..

     3d) Build gdchart

         cd gdchart0.94c
         make -f Makefile.mingw
	 cd ..

  4) Build ntop itself

     cd ntop
     make -f Makefile.mingw


  5) Package ntop and the dependent files

     Into the install directory, copy ntop.exe and the html
     subdirectory hierarchy.

     Ensure that the appropriate DLL's are in your path.  For this
     build, that includes libgdbm-2.dll and wpcap.dll.

     If you have grep installed, the following commandline will tell
     you which files need to be in either the same directory as
     ntop.exe or in the path:

         objdump -p ntop.exe |grep "DLL Name"

  6) Use it

     Execute ntop.exe from the install directory.  You can get command
     line help by running ntop.exe -h

-- 
November 2001 - Scott Renfro <scott@renfro.org>
