Build tethereal and editcap on Win32.

Add RCS ID tags to Makefile.nmake's.

svn path=/trunk/; revision=1836
This commit is contained in:
Gilbert Ramirez 2000-04-12 21:52:11 +00:00
parent c3459da28b
commit ed237c129d
7 changed files with 78 additions and 14 deletions

View File

@ -1,5 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: nmake -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.24 2000/04/12 21:51:27 gram Exp $
include config.nmake
@ -9,7 +11,7 @@ CC = cl
LINK= link
LDFLAGS = /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /MACHINE:I386 \
$(LOCAL_LDFLAGS) /OUT:ethereal.exe
$(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 \
@ -90,6 +92,7 @@ DISSECTOR_OBJECTS = \
packet-raw.obj \
packet-rip.obj \
packet-ripng.obj \
packet-rlogin.obj \
packet-rpc.obj \
packet-rsvp.obj \
packet-rtsp.obj \
@ -159,7 +162,12 @@ ethereal_OBJECTS = \
file.obj \
summary.obj \
EXTRA_ethereal_OBJECTS = \
tethereal_OBJECTS = \
$(DISSECTOR_OBJECTS) \
$(ETHEREAL_COMMON_OBJECTS) \
tethereal.obj
EXTRA_OBJECTS = \
snprintf.obj \
strerror.obj \
mkstemp.obj \
@ -167,18 +175,39 @@ EXTRA_ethereal_OBJECTS = \
inet_pton.obj \
inet_ntop.obj
LIBS= wiretap\libwtap.lib gtk\libui.lib wsock32.lib user32.lib \
ethereal_LIBS= wiretap\libwtap.lib gtk\libui.lib wsock32.lib user32.lib \
$(GTK_DIR)\gtk\gtk-$(GTK_VERSION).lib \
$(GTK_DIR)\gdk\win32\gdk-$(GTK_VERSION).lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib \
$(PCAP_DIR)\lib\libpcap.lib
all: ethereal.exe
tethereal_LIBS= wiretap\libwtap.lib wsock32.lib user32.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib \
$(PCAP_DIR)\lib\libpcap.lib
ethereal.exe : config.h $(ethereal_OBJECTS) $(EXTRA_ethereal_OBJECTS) wiretap gtk plugins
editcap_LIBS= wiretap\libwtap.lib wsock32.lib user32.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule-$(GLIB_VERSION).lib
EXECUTABLES=ethereal.exe tethereal.exe editcap.exe
all: $(EXECUTABLES)
ethereal.exe : config.h $(ethereal_OBJECTS) $(EXTRA_OBJECTS) wiretap gtk plugins
$(LINK) @<<
$(LDFLAGS) $(LIBS) $(ethereal_OBJECTS) $(EXTRA_ethereal_OBJECTS)
/OUT:ethereal.exe $(LDFLAGS) $(ethereal_LIBS) $(ethereal_OBJECTS) $(EXTRA_OBJECTS)
<<
tethereal.exe : config.h $(tethereal_OBJECTS) $(EXTRA_OBJECTS) wiretap plugins
$(LINK) @<<
/OUT:tethereal.exe $(LDFLAGS) $(tethereal_LIBS) $(tethereal_OBJECTS) $(EXTRA_OBJECTS)
<<
editcap.exe : config.h editcap.obj getopt.obj wiretap
$(LINK) @<<
/OUT:editcap.exe $(LDFLAGS) editcap.obj getopt.obj $(editcap_LIBS)
<<
config.h : config.h.win32
@ -195,8 +224,12 @@ dfilter-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
#
# TODO: Create register.c
#
clean:
rm -f $(ethereal_OBJECTS) $(EXTRA_ethereal_OBJECTS) ethereal.exe
rm -f $(ethereal_OBJECTS) $(EXTRA_OBJECTS) $(EXECUTABLES) tethereal.obj editcap.obj
cd wiretap
nmake -f Makefile.nmake clean
cd ../gtk

View File

@ -5,7 +5,7 @@ GLIB_VERSION=1.3
GLIB_DIR=T:\w32-ix86\ethereal\glib
GTK_DIR=T:\w32-ix86\ethereal\gtk+
PCAP_DIR=T:\w32-ix86\ethereal\WDdpack
PCAP_DIR=T:\w32-ix86\ethereal\WPdpack
LOCAL_CFLAGS=-Zi
LOCAL_LDFLAGS=/DEBUG

View File

@ -1,21 +1,40 @@
/* Edit capture files. We can delete records, or simply convert from one
* format to another format.
*
* $Id: editcap.c,v 1.6 2000/01/17 20:21:40 guy Exp $
* $Id: editcap.c,v 1.7 2000/04/12 21:51:27 gram Exp $
*
* Originally written by Richard Sharpe.
* Improved by Guy Harris.
* Further improved by Richard Sharpe.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <glib.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#ifdef HAVE_WINSOCK_H
#include <winsock.h>
#endif
#include <string.h>
#include "wtap.h"
#ifdef NEED_GETOPT_H
#include "getopt.h"
#endif
/*
* Some globals so we can pass things to various routines
*/

View File

@ -1,4 +1,7 @@
/* Getopt for GNU.
$Id: getopt.c,v 1.2 2000/04/12 21:51:28 gram Exp $
NOTE: getopt is now part of the C library, so if you don't know what
"Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
before changing it!
@ -19,12 +22,10 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
/* We use <config.h> instead of "config.h" so that a compilation
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
(which it would do because getopt.c was found in $srcdir). */
#include <config.h>
#include "config.h"
#endif
#ifndef __STDC__

View File

@ -1,3 +1,7 @@
#
# $Id: Makefile.nmake,v 1.4 2000/04/12 21:51:39 gram Exp $
#
include ..\config.nmake
############### no need to modify below this line #########

View File

@ -1,3 +1,7 @@
#
# $Id: Makefile.nmake,v 1.4 2000/04/12 21:51:53 gram Exp $
#
include ..\..\config.nmake
############### no need to modify below this line #########

View File

@ -1,3 +1,6 @@
#
# $Id: Makefile.nmake,v 1.11 2000/04/12 21:52:11 gram Exp $
#
include ..\config.nmake