diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-05-21 03:17:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-05-21 03:17:14 +0000 |
commit | 1caea2c3612be3438670bf2214a8f3136c47bff2 (patch) | |
tree | 78070673438eab81362f2a6319d0b7292b94f256 /Makefile.nmake | |
parent | eee7f58e2d51f8e6befd325ebe51f062e33c51f3 (diff) | |
download | wireshark-1caea2c3612be3438670bf2214a8f3136c47bff2.tar.gz wireshark-1caea2c3612be3438670bf2214a8f3136c47bff2.tar.bz2 wireshark-1caea2c3612be3438670bf2214a8f3136c47bff2.zip |
Build text2pcap on Windows.
Fix text2pcap.c so that it can be compiled with Microsoft Visual C++
6.0:
protect some includes with #ifdefs, as not all the header files
in question exist in the MSVC++ build environment;
include <winsock.h> if we have it, to declare "ntohs()" and the
like;
include "getopt.h" if we need it, to declare stuff for
"getopt()";
include "config.h" if we have it, so we know whether the header
files in question exist or are needed;
rename "BYTE" to "READ_BYTE", as <winsock.h> defines BYTE as
well, and that definition causes a conflict;
get rid of references to "__FUNCTION__", as MSVC++ doesn't
define it (I suspect at least some UNIX compilers don't define
it, either).
svn path=/trunk/; revision=3428
Diffstat (limited to 'Makefile.nmake')
-rw-r--r-- | Makefile.nmake | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Makefile.nmake b/Makefile.nmake index 45aa1144f0..bb5a90f93d 100644 --- a/Makefile.nmake +++ b/Makefile.nmake @@ -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.106 2001/05/20 22:20:33 guy Exp $ +# $Id: Makefile.nmake,v 1.107 2001/05/21 03:17:14 guy Exp $ include config.nmake include <win32.mak> @@ -271,7 +271,7 @@ dftest_LIBS= epan\ethereal.lib \ $(GLIB_DIR)\glib-$(GLIB_VERSION).lib \ $(GLIB_DIR)\gmodule\gmodule-$(GLIB_VERSION).lib -EXECUTABLES=ethereal.exe tethereal.exe editcap.exe +EXECUTABLES=ethereal.exe tethereal.exe editcap.exe text2pcap.exe RESOURCES=image\ethereal.res image\tethereal.res image\editcap.res @@ -295,6 +295,12 @@ editcap.exe : config.h editcap.obj getopt.obj wiretap\wiretap-$(WTAP_VERSION).li /OUT:editcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console editcap.obj getopt.obj $(editcap_LIBS) image\editcap.res << +text2pcap.exe : config.h text2pcap.obj text2pcap-scanner.obj getopt.obj + @echo Linking $@ + $(LINK) @<< + /OUT:text2pcap.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console text2pcap.obj text2pcap-scanner.obj getopt.obj +<< + dftest.exe : $(dftest_OBJECTS) $(EXTRA_OBJECTS) $(LINK) @<< /OUT:dftest.exe $(conflags) $(conlibsdll) $(LDFLAGS) /SUBSYSTEM:console $(dftest_LIBS) $(dftest_OBJECTS) $(EXTRA_OBJECTS) @@ -329,9 +335,13 @@ register.c: $(DISSECTOR_SRC) # to use python if PYTHON is defined, otherwise try to use shell. # @sh make-reg-dotc . $(DISSECTOR_SRC) +text2pcap-scanner.c : text2pcap-scanner.l + $(LEX) -otext2pcap-scanner.c text2pcap-scanner.l + clean: rm -f $(ethereal_OBJECTS) $(EXTRA_OBJECTS) $(EXECUTABLES) \ - tethereal.obj editcap.obj register.c rdps.obj config.h \ + tethereal.obj editcap.obj text2pcap.obj \ + text2pcap-scanner.c register.c rdps.obj config.h \ ps.c packet-ncp2222.c register.c cd wiretap $(MAKE) /$(MAKEFLAGS) -f Makefile.nmake clean |