Finally got the win32 ethereal to link properly with MSVC.
authorgram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jul 1999 17:40:42 +0000 (17:40 +0000)
committergram <gram@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 21 Jul 1999 17:40:42 +0000 (17:40 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@374 f5534014-38df-0310-8fa8-9805f1628bb7

Makefile.nmake
README.win32
rdps.c
wiretap/Makefile.nmake

index 7716d70dfd3b1f0eab45b172520bf9e86eac0a32..57e90f7f222c74f088ecd0eb2ecc2c8ea38fc9c0 100644 (file)
@@ -2,17 +2,20 @@
 ## Use: nmake -f makefile.nmake
 
 GTK_VERSION=1.3
-GLIB_VERSION=1.3
+GLIB_VERSION=1.2
 
-GLIB_DIR=d:\prj\w\src\glib
-GTK_DIR=d:\prj\w\src\gtk+
+GLIB_DIR=d:\prj\src\glib-1.2
+GTK_DIR=d:\prj\src\gtk-plus
 
 LOCAL_CFLAGS=/Ic:\tools\msdev\include
 
 ############### no need to modify below this line #########
 
 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 \
        /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-smb.obj packet-snmp.obj packet-tcp.obj packet-telnet.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
 
-LIBS=wiretap\libwtap.lib \
+LIBS= wiretap\libwtap.lib wsock32.lib \
        $(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \
-       $(GTK_DIR)\gdk\win32\gdk-$(GTK_VERSION).lib \
-       $(GLIB_DIR)\glib-$(GTK_VERSION).lib \
-       $(GLIB_DIR)\gmodule-$(GTK_VERSION).lib
+       $(GTK_DIR)\gdk\gdk-$(GTK_VERSION).lib \
+       $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
+       $(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib
 
 
-ethereal.exe   : config.h $(OBJECTS) $(LIBS)
-       $(CC) $(CFLAGS) -Feethereal.exe $(OBJECTS) $(LIBS) $(LDFLAGS)
+ethereal.exe   : config.h $(OBJECTS) 
+       $(LINK) @<<
+               $(LDFLAGS) $(LIBS) $(OBJECTS)
+<<
 
 config.h       : config.h.win32
        copy config.h.win32 $@
index 5fa7648ceb2ab5b80e9e6dedfc5e6cdb72a6aff1..89e05d34f4b4dd7bfcd45bb25ff6922ab20dc6b8 100644 (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
 needed, however.
 
 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.
+Download them and unpack them.
 
 I have seen mention of a UCD SNMP library for win32 on the cygwin
 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
 ----------------------------
-Download and install the glib-dev and gtk-dev packages. Modify
-the top lines of Makefile.nmake and wiretap/Makefile.nmake accordingly.
+Modify the top lines of Makefile.nmake and wiretap/Makefile.nmake to
+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"
 Then in the ethereal directory, type "nmake -f makefile.nmake"
 
 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
 -----------------------
diff --git a/rdps.c b/rdps.c
index c910a6d5ba067cb4fd49af02a650c8d0f9dd0a5a..6df44a932456438422641c2df02263ec34a5ccaa 100644 (file)
--- a/rdps.c
+++ b/rdps.c
@@ -1,7 +1,7 @@
 /* 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
  * By Gerald Combs <gerald@zing.org>
  * 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"
           "#include <stdio.h>\n\n"
-          "#include <ps.h>\n\n");
+          "#include \"ps.h\"\n\n");
 
        while (fgets(buf, BUFFER_SIZE - 1, input)) {
 
index 7920b9cfe242d8ca06bdd0e57c011a5fcd715bb2..524c21cbb9cbd9988306b88d6cadec5ad716adde 100644 (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
 
 #################3