Fix it to build on Windows.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Oct 2000 07:35:02 +0000 (07:35 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Wed, 11 Oct 2000 07:35:02 +0000 (07:35 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2488 f5534014-38df-0310-8fa8-9805f1628bb7

Makefile.nmake
epan/Makefile.am
epan/Makefile.nmake [new file with mode: 0644]
epan/filesystem.c
gtk/Makefile.nmake
plugins/Makefile.nmake
plugins/gryphon/Makefile.nmake
util.c
util.h

index 4b9789963b393c4e653c2c3da47615f7b9add461..4d10b8c424036744b6b77990a06afb42bc5b1044 100644 (file)
@@ -1,7 +1,7 @@
 ## Makefile for building ethereal.exe with Microsoft C and nmake
 ## Use: nmake -f makefile.nmake
 #
-# $Id: Makefile.nmake,v 1.54 2000/09/11 16:16:01 gram Exp $
+# $Id: Makefile.nmake,v 1.55 2000/10/11 07:35:00 guy Exp $
 
 include config.nmake
 
@@ -13,7 +13,7 @@ LINK= link
 LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
 
 CFLAGS=/MT -DHAVE_CONFIG_H $(LOCAL_CFLAGS) /I$(GLIB_DIR) /I$(GLIB_DIR)\gmodule \
-       /I$(GTK_DIR) /Iwiretap /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
+       /I$(GTK_DIR) /Iepan /Iwiretap /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
        /I$(PCAP_DIR)/include
 
 {$S}.c{$O}.obj::
@@ -31,6 +31,7 @@ DISSECTOR_SOURCES = \
        packet-bootp.c \
        packet-bootparams.c \
        packet-bpdu.c  \
+       packet-bxxp.c \
        packet-cdp.c   \
        packet-cgmp.c  \
        packet-clip.c  \
@@ -45,6 +46,7 @@ DISSECTOR_SOURCES = \
        packet-eth.c   \
        packet-ethertype.c   \
        packet-fddi.c  \
+       packet-frame.c  \
        packet-ftp.c   \
        packet-giop.c  \
        packet-gre.c   \
@@ -123,6 +125,7 @@ DISSECTOR_SOURCES = \
        packet-smb-logon.c \
        packet-smb-mailslot.c \
        packet-smb-pipe.c \
+        packet-smtp.c \
        packet-sna.c   \
        packet-snmp.c   \
        packet-socks.c \
@@ -159,26 +162,14 @@ DISSECTOR_OBJECTS = $(DISSECTOR_SOURCES:.c=.obj)
 ETHEREAL_COMMON_OBJECTS = \
        asn1.obj         \
        column.obj       \
-       conversation.obj \
-       dfilter-grammar.obj \
-       dfilter-scanner.obj \
-       dfilter.obj      \
-       except.obj       \
        follow.obj       \
        getopt.obj       \
        ipproto.obj      \
-       ipv4.obj         \
-       packet.obj       \
-       plugins.obj      \
        prefs.obj        \
        print.obj        \
-       proto.obj        \
        ps.obj           \
        ptvcursor.obj    \
        register.obj     \
-       resolv.obj       \
-       strutil.obj      \
-       tvbuff.obj       \
        util.obj         \
        xdlc.obj         \
 
@@ -202,14 +193,16 @@ EXTRA_OBJECTS = \
        inet_pton.obj     \
        inet_ntop.obj
 
-ethereal_LIBS= wiretap\libwtap.lib gtk\libui.lib wsock32.lib user32.lib \
+ethereal_LIBS= wiretap\libwtap.lib gtk\libui.lib epan\libepan.lib \
+       wsock32.lib user32.lib \
        $(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \
        $(GTK_DIR)\gdk\gdk-$(GTK_VERSION).lib \
        $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
        $(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib \
        $(PCAP_DIR)\lib\libpcap.lib
 
-tethereal_LIBS= wiretap\libwtap.lib wsock32.lib user32.lib \
+tethereal_LIBS= wiretap\libwtap.lib epan\libepan.lib \
+       wsock32.lib user32.lib \
        $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
        $(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib \
        $(PCAP_DIR)\lib\libpcap.lib
@@ -222,7 +215,7 @@ EXECUTABLES=ethereal.exe tethereal.exe editcap.exe
 
 RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res
 
-all: wiretap gtk $(EXECUTABLES) $(RESOURCES)
+all: wiretap gtk epan $(EXECUTABLES) $(RESOURCES)
 
 ethereal.exe   : config.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) image\ethereal.res wiretap\libwtap.lib gtk\libui.lib plugins
        @echo Linking $@
@@ -251,17 +244,9 @@ ps.c       : rdps.exe print.ps
 packet-ncp2222.c : ncp2222.py
        $(PYTHON) ncp2222.py > packet-ncp2222.c
 
-dfilter-scanner.obj : dfilter-scanner.c dfilter-grammar.h
-
-dfilter-scanner.c : dfilter-scanner.l
-       $(LEX) -Pdfilter_ -odfilter-scanner.c dfilter-scanner.l
-
-dfilter-grammar.c dfilter-grammar.h : dfilter-grammar.y
-       $(YACC) $(YACC_OPTS) -d -p dfilter_ dfilter-grammar.y -o dfilter-grammar.c
-
-register.c: packet.c $(DISSECTOR_SOURCES)
+register.c: $(DISSECTOR_SOURCES)
        @echo Making register.c
-       @sh make-reg-dotc . packet.c $(DISSECTOR_SOURCES)
+       @sh make-reg-dotc . $(DISSECTOR_SOURCES)
 
 clean:
        rm -f $(ethereal_OBJECTS) $(EXTRA_OBJECTS) $(EXECUTABLES) \
@@ -271,6 +256,8 @@ clean:
        nmake -f Makefile.nmake clean
        cd ../gtk
        nmake -f Makefile.nmake clean
+       cd ../epan
+       nmake -f Makefile.nmake clean
        cd ../plugins
        nmake -f Makefile.nmake clean
        cd ..
@@ -285,6 +272,11 @@ gtk::
        nmake -f Makefile.nmake
        cd ..
 
+epan::
+       cd epan
+       nmake -f Makefile.nmake
+       cd ..
+
 plugins::
        cd plugins
        nmake -f Makefile.nmake
index 9dca8e08394ce83e634809366a29184b09d0ebe0..911302cf169e5835f7fef7327739bbe5c6b7098f 100644 (file)
@@ -2,7 +2,7 @@
 # Automake file for the EPAN library
 # (Ethereal Protocol ANalyzer Library)
 #
-# $Id: Makefile.am,v 1.6 2000/09/28 03:52:12 gram Exp $
+# $Id: Makefile.am,v 1.7 2000/10/11 07:35:01 guy Exp $
 #
 # Ethereal - Network traffic analyzer
 # By Gerald Combs <gerald@zing.org>
@@ -70,6 +70,9 @@ EXTRA_libepan_a_SOURCES = \
        dfilter-grammar.h \
        dfilter-scanner.c
 
+EXTRA_DIST = \
+       Makefile.nmake
+
 CLEANFILES = \
        libepan.a       \
        *~
@@ -79,4 +82,3 @@ dfilter-scanner.c : dfilter-scanner.l
 
 tvbtest: tvbtest.o tvbuff.o except.o strutil.o
        $(LINK) -o tvbtest tvbtest.o tvbuff.o except.o strutil.o `glib-config --libs`
-
diff --git a/epan/Makefile.nmake b/epan/Makefile.nmake
new file mode 100644 (file)
index 0000000..b222846
--- /dev/null
@@ -0,0 +1,43 @@
+include ..\config.nmake
+
+############### no need to modify below this line #########
+
+CFLAGS=/MT /DHAVE_CONFIG_H /I. /I.. /I../wiretap \
+       /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
+       /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
+       /I$(PCAP_DIR)\include $(LOCAL_CFLAGS)
+
+{$S}.c{$O}.obj::
+   $(CC) $(CFLAGS) -Fd$O\ -c $<
+
+OBJECTS=conversation.obj \
+       dfilter-grammar.obj \
+       dfilter-scanner.obj \
+       dfilter.obj      \
+       epan.obj         \
+       except.obj       \
+       filesystem.obj   \
+       ipv4.obj         \
+       packet.obj       \
+       plugins.obj      \
+       proto.obj        \
+       resolv.obj       \
+       strutil.obj      \
+       tvbuff.obj       \
+
+libepan.lib    : ..\config.h $(OBJECTS)
+       lib /out:libepan.lib $(OBJECTS) 
+
+dfilter-scanner.obj : dfilter-scanner.c dfilter-grammar.h
+
+dfilter-scanner.c : dfilter-scanner.l
+       $(LEX) -Pdfilter_ -odfilter-scanner.c dfilter-scanner.l
+
+dfilter-grammar.c dfilter-grammar.h : dfilter-grammar.y
+       $(YACC) $(YACC_OPTS) -d -p dfilter_ dfilter-grammar.y -o dfilter-grammar.c
+
+..\config.h    : ..\config.h.win32
+       copy ..\config.h.win32 ..\config.h
+
+clean:
+       rm -f $(OBJECTS) libepan.lib
index bd89677f9099fbbf1c5ccd72792aac100dc37b9f..54dc8ffe48a4ce7e70bda3360b3e8ad40326d089 100644 (file)
@@ -1,7 +1,7 @@
 /* filesystem.c
  * Filesystem utility routines
  *
- * $Id: filesystem.c,v 1.1 2000/09/28 03:16:16 gram Exp $
+ * $Id: filesystem.c,v 1.2 2000/10/11 07:35:01 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -28,6 +28,7 @@
 #endif
 
 #include <stdlib.h>
+#include <string.h>
 #include <glib.h>
 
 #ifdef HAVE_UNISTD_H
@@ -39,6 +40,7 @@
 #endif
 
 #include "filesystem.h"
+#include "util.h"
 
 const char*
 get_home_dir(void)
index 9e6617e2e166ace73f62f3ad916d97527bdbbbd2..939b8589b67a32a242bca71c13be8d75ccfeeea6 100644 (file)
@@ -2,7 +2,7 @@ include ..\config.nmake
 
 ############### no need to modify below this line #########
 
-CFLAGS=/MT /DHAVE_CONFIG_H /I.. /I../wiretap \
+CFLAGS=/MT /DHAVE_CONFIG_H /I.. /I../epan /I../wiretap \
        /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
        /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
        /I$(PCAP_DIR)\include $(LOCAL_CFLAGS)
index c1f8d6d6220310d8cd70851973934676a92bb69b..73bddaa39e8010973a1d183fbfcb81791379382f 100644 (file)
@@ -1,12 +1,12 @@
 #
-# $Id: Makefile.nmake,v 1.6 2000/05/20 20:52:27 guy Exp $
+# $Id: Makefile.nmake,v 1.7 2000/10/11 07:35:02 guy Exp $
 #
 
 include ..\config.nmake
 
 ############### no need to modify below this line #########
 
-CFLAGS=/DHAVE_CONFIG_H /I.. /I../wiretap /I. \
+CFLAGS=/DHAVE_CONFIG_H /I.. /I../epan /I../wiretap /I. \
        /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
        /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
        /I$(PCAP_DIR)\include $(LOCAL_CFLAGS)
index 0e9f3a758f0e5b5beefbd66b0666d9e4ea2a56c4..05a414fe096d5a2212e0b352a2b57133228711e5 100644 (file)
@@ -1,12 +1,12 @@
 #
-# $Id: Makefile.nmake,v 1.4 2000/04/12 21:51:53 gram Exp $
+# $Id: Makefile.nmake,v 1.5 2000/10/11 07:35:02 guy Exp $
 #
 
 include ..\..\config.nmake
 
 ############### no need to modify below this line #########
 
-CFLAGS=/DHAVE_CONFIG_H /I../.. /I../wiretap \
+CFLAGS=/DHAVE_CONFIG_H /I../.. /I../../epan /I../../wiretap \
        /I$(GLIB_DIR) /I$(GTK_DIR) /I$(GLIB_DIR)/gmodule \
        /I$(GTK_DIR)\gdk /I$(GTK_DIR)\gdk\win32 \
        /I$(PCAP_DIR)\include $(LOCAL_CFLAGS)
diff --git a/util.c b/util.c
index 8f2add4462a002bc5365d9daf0736075e9cd4d6e..eb85be846efd6269d92859894bf355acd6b99b48 100644 (file)
--- a/util.c
+++ b/util.c
@@ -1,7 +1,7 @@
 /* util.c
  * Utility routines
  *
- * $Id: util.c,v 1.46 2000/09/28 03:16:06 gram Exp $
+ * $Id: util.c,v 1.47 2000/10/11 07:35:00 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -137,7 +137,7 @@ test_for_directory(const char *path)
  * character in the pathname, or NULL if the pathname contains no
  * separators.
  */
-static char *
+char *
 find_last_pathname_separator(char *path)
 {
        char *separator;
diff --git a/util.h b/util.h
index cf62ded1eb41bef007acc7dc375ab0a75fe88ccc..a129387c45604f2d770c7c5a70691adbc6ec7264 100644 (file)
--- a/util.h
+++ b/util.h
@@ -1,7 +1,7 @@
 /* util.h
  * Utility definitions
  *
- * $Id: util.h,v 1.21 2000/09/10 06:44:39 guy Exp $
+ * $Id: util.h,v 1.22 2000/10/11 07:35:00 guy Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@zing.org>
@@ -43,6 +43,13 @@ extern "C" {
  */
 int test_for_directory(const char *);
 
+/*
+ * Given a pathname, return a pointer to the last pathname separator
+ * character in the pathname, or NULL if the pathname contains no
+ * separators.
+ */
+char *find_last_pathname_separator(char *);
+
 /*
  * Given a pathname, return the last component.
  */