Add support for building randpkt under Windows.

svn path=/trunk/; revision=6433
This commit is contained in:
Gerald Combs 2002-10-16 14:45:27 +00:00
parent 103fafbb74
commit e0cf132365
2 changed files with 21 additions and 3 deletions

View File

@ -1,7 +1,7 @@
## Makefile for building ethereal.exe with Microsoft C and nmake
## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
#
# $Id: Makefile.nmake,v 1.241 2002/10/09 03:07:26 gerald Exp $
# $Id: Makefile.nmake,v 1.242 2002/10/16 14:45:27 gerald Exp $
include config.nmake
include <win32.mak>
@ -364,6 +364,9 @@ dftest_OBJECTS = \
$(ETHEREAL_COMMON_OBJECTS) \
dftest.obj
randpkt_OBJECTS = \
randpkt.obj
EXTRA_OBJECTS = \
# snprintf.obj \
# strerror.obj \
@ -406,6 +409,11 @@ dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib epan\ethereal.lib \
$(GLIB_DIR)\glib-$(GLIB_VERSION).lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
user32.lib \
$(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib \
$(NET_SNMP_DIR)\win32\lib\libsnmp.lib
EXECUTABLES=ethereal.exe tethereal.exe editcap.exe mergecap.exe text2pcap.exe
RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res image\mergecap.res image\text2pcap.res
@ -451,6 +459,11 @@ dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS)
/OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS)
<<
randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
$(LINK) @<<
/OUT:randpkt.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(randpkt_LIBS) $(randpkt_OBJECTS)
<<
config.h : config.h.win32
sed -e s/@VERSION@/$(VERSION)/ < config.h.win32 > $@
@ -498,7 +511,8 @@ clean:
tethereal.obj editcap.obj mergecap.obj text2pcap.obj \
text2pcap-scanner.obj text2pcap-scanner.c register.c \
rdps.obj rdps.pdb config.h ps.c \
rdps.exe rdps.ilk dftest.obj dftest.exe $(RESOURCES)
rdps.exe rdps.ilk dftest.obj dftest.exe randpkt.obj randpkt.ext \
$(RESOURCES)
cd wiretap
$(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean
cd ../gtk

View File

@ -4,7 +4,7 @@
* Creates random packet traces. Useful for debugging sniffers by testing
* assumptions about the veracity of the data found in the packet.
*
* $Id: randpkt.c,v 1.16 2002/10/15 02:29:54 gerald Exp $
* $Id: randpkt.c,v 1.17 2002/10/16 14:45:27 gerald Exp $
*
* Copyright (C) 1999 by Gilbert Ramirez <gram@alumni.rice.edu>
*
@ -27,6 +27,10 @@
#include "config.h"
#endif
#ifdef NEED_GETOPT_H
#include "getopt.h"
#endif
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif