Finally got the win32 ethereal to link properly with MSVC.

svn path=/trunk/; revision=374
This commit is contained in:
Gilbert Ramirez 1999-07-21 17:40:42 +00:00
parent 92bbbec464
commit 7e9230a0bd
4 changed files with 31 additions and 17 deletions

View File

@ -2,17 +2,20 @@
## Use: nmake -f makefile.nmake ## Use: nmake -f makefile.nmake
GTK_VERSION=1.3 GTK_VERSION=1.3
GLIB_VERSION=1.3 GLIB_VERSION=1.2
GLIB_DIR=d:\prj\w\src\glib GLIB_DIR=d:\prj\src\glib-1.2
GTK_DIR=d:\prj\w\src\gtk+ GTK_DIR=d:\prj\src\gtk-plus
LOCAL_CFLAGS=/Ic:\tools\msdev\include LOCAL_CFLAGS=/Ic:\tools\msdev\include
############### no need to modify below this line ######### ############### no need to modify below this line #########
CC = cl CC = cl
LDFLAGS = /link LINK= link
LDFLAGS = /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /MACHINE:I386 \
/OUT:ethereal.exe
CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) /I$(GLIB_DIR) /I$(GTK_DIR) /Iwiretap \ CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) /I$(GLIB_DIR) /I$(GTK_DIR) /Iwiretap \
/I$(GTK_DIR)\gdk\win32 /I$(GTK_DIR)\gdk\win32
@ -32,18 +35,20 @@ OBJECTS=capture.obj column.obj dfilter-grammar.obj dfilter.obj \
packet-rip.obj packet-rsvp.obj packet-rtsp.obj packet-sdp.obj \ packet-rip.obj packet-rsvp.obj packet-rtsp.obj packet-sdp.obj \
packet-smb.obj packet-snmp.obj packet-tcp.obj packet-telnet.obj \ packet-smb.obj packet-snmp.obj packet-tcp.obj packet-telnet.obj \
packet-tftp.obj packet-tr.obj packet-trmac.obj packet-udp.obj \ packet-tftp.obj packet-tr.obj packet-trmac.obj packet-udp.obj \
packet-vines.obj packet.obj prefs.obj print.obj proto.obj \ packet-vines.obj packet.obj prefs.obj print.obj proto.obj ps.obj \
resolv.obj snprintf.obj strerror.obj summary.obj util.obj resolv.obj snprintf.obj strerror.obj summary.obj util.obj
LIBS=wiretap\libwtap.lib \ LIBS= wiretap\libwtap.lib wsock32.lib \
$(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \ $(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \
$(GTK_DIR)\gdk\win32\gdk-$(GTK_VERSION).lib \ $(GTK_DIR)\gdk\gdk-$(GTK_VERSION).lib \
$(GLIB_DIR)\glib-$(GTK_VERSION).lib \ $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule-$(GTK_VERSION).lib $(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib
ethereal.exe : config.h $(OBJECTS) $(LIBS) ethereal.exe : config.h $(OBJECTS)
$(CC) $(CFLAGS) -Feethereal.exe $(OBJECTS) $(LIBS) $(LDFLAGS) $(LINK) @<<
$(LDFLAGS) $(LIBS) $(OBJECTS)
<<
config.h : config.h.win32 config.h : config.h.win32
copy config.h.win32 $@ copy config.h.win32 $@

View File

@ -1,10 +1,11 @@
$Id: README.win32,v 1.1 1999/07/13 02:52:46 gram Exp $ $Id: README.win32,v 1.2 1999/07/21 17:40:34 gram Exp $
Ethereal can be compiled on Win32 platforms. Some libraries are Ethereal can be compiled on Win32 platforms. Some libraries are
needed, however. needed, however.
The glib, gtk, glib-dev, and gtk-dev packages for win32 can be found The glib, gtk, glib-dev, and gtk-dev packages for win32 can be found
at http://www.gimp.org/~tml/gimp/win32 You will definitely need these. at http://www.gimp.org/~tml/gimp/win32 You will definitely need these.
Download them and unpack them.
I have seen mention of a UCD SNMP library for win32 on the cygwin I have seen mention of a UCD SNMP library for win32 on the cygwin
home page, but I have not tried it with ethereal. home page, but I have not tried it with ethereal.
@ -14,13 +15,21 @@ There is no open-source libpcap for win32 yet.
Instructions for MS Visual C Instructions for MS Visual C
---------------------------- ----------------------------
Download and install the glib-dev and gtk-dev packages. Modify Modify the top lines of Makefile.nmake and wiretap/Makefile.nmake to
the top lines of Makefile.nmake and wiretap/Makefile.nmake accordingly. point to the glib and gtk directories.
Be sure to set your %lib% environment variable to point to the msvc
lib directory. Example:
set lib=c:/tools/msdev/lib
In the wiretap directory, type "nmake -f makefile.nmake" In the wiretap directory, type "nmake -f makefile.nmake"
Then in the ethereal directory, type "nmake -f makefile.nmake" Then in the ethereal directory, type "nmake -f makefile.nmake"
You must set your HOME environment variable for ethereal to work. You must set your HOME environment variable for ethereal to work.
Make sure the glib and gtk DLL's are in your path when you run
ethereal.
Instructions for cygwin Instructions for cygwin
----------------------- -----------------------

4
rdps.c
View File

@ -1,7 +1,7 @@
/* rdps.c /* rdps.c
* *
* *
* $Id: rdps.c,v 1.2 1998/09/16 03:22:17 gerald Exp $ * $Id: rdps.c,v 1.3 1999/07/21 17:40:34 gram Exp $
* Ethereal - Network traffic analyzer * Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org> * By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs * Copyright 1998 Gerald Combs
@ -73,7 +73,7 @@ int main(int argc, char **argv)
fprintf(output, "/* Created by rdps.c. Do not edit! */\n\n" fprintf(output, "/* Created by rdps.c. Do not edit! */\n\n"
"#include <stdio.h>\n\n" "#include <stdio.h>\n\n"
"#include <ps.h>\n\n"); "#include \"ps.h\"\n\n");
while (fgets(buf, BUFFER_SIZE - 1, input)) { while (fgets(buf, BUFFER_SIZE - 1, input)) {

View File

@ -1,4 +1,4 @@
GLIB_DIR=d:\prj\w\src\glib GLIB_DIR=d:\prj\src\glib-1.2
LOCAL_CFLAGS=/Ic:\tools\msdev\include LOCAL_CFLAGS=/Ic:\tools\msdev\include
#################3 #################3