Skip to content

Commit

Permalink
Let people configure whether to build with Zlib or not solely by
Browse files Browse the repository at this point in the history
controlling whether ZLIB_DIR is defined or not in config.nmake.

svn path=/trunk/; revision=8911
  • Loading branch information
guyharris committed Nov 7, 2003
1 parent ed66a06 commit 4192ad9
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
5 changes: 3 additions & 2 deletions Makefile.nmake
Original file line number Diff line number Diff line change
@@ -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.356 2003/11/07 05:26:27 sahlberg Exp $
# $Id: Makefile.nmake,v 1.357 2003/11/07 23:27:07 guy Exp $

include config.nmake
include <win32.mak>
Expand All @@ -14,7 +14,7 @@ LINK= link
LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)

CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GTK_CFLAGS) /I. /Iwiretap \
/I$(ZLIB_DIR) /I$(PCAP_DIR)\include \
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
$(ADNS_CFLAGS) -D_U_=""

Expand Down Expand Up @@ -581,6 +581,7 @@ randpkt.exe : $(randpkt_OBJECTS) $(EXTRA_OBJECTS)
config.h : config.h.win32 config.nmake
sed -e s/@VERSION@/$(VERSION)/ \
-e "s/@HAVE_GNU_ADNS@/$(ADNS_CONFIG)/" \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
-e "s/@HAVE_LIBPCAP@/$(WINPCAP_CONFIG)/" \
-e "s/@HAVE_PCAP_FINDALLDEVS@/$(PCAP_FINDALLDEVS_CONFIG)/" \
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
Expand Down
4 changes: 2 additions & 2 deletions config.h.win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: config.h.win32,v 1.41 2003/10/10 09:48:54 guy Exp $ */
/* $Id: config.h.win32,v 1.42 2003/11/07 23:27:07 guy Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
Expand Down Expand Up @@ -109,7 +109,7 @@
/* #define HAVE_UNISTD_H 1 */

/* Define if you have the z library (-lz). */
#define HAVE_LIBZ 1
@HAVE_LIBZ@

/* Define to use GNU ADNS library */
@HAVE_GNU_ADNS@
Expand Down
21 changes: 20 additions & 1 deletion config.nmake
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# $Id: config.nmake,v 1.61 2003/11/02 23:36:01 gerald Exp $
# $Id: config.nmake,v 1.62 2003/11/07 23:27:08 guy Exp $

VERSION=0.9.16
#
Expand Down Expand Up @@ -36,7 +36,15 @@ GLIB_VERSION=2.0
GLIB_DIR=C:\ethereal-win32-libs\glib
GTK_DIR=C:\ethereal-win32-libs\gtk+

#
# If you have Zlib, set this to the pathname of the directory in
# which the Zlib headers and .lib file are stored.
#
# If you don't have Zlib, comment this line out, so that Zlib isn't
# defined.
#
ZLIB_DIR=C:\ethereal-win32-libs\zlib-114

PCAP_DIR=C:\ethereal-win32-libs\WPdpack
NET_SNMP_DIR=C:\ethereal-win32-libs\net-snmp-5.0.6

Expand Down Expand Up @@ -141,6 +149,17 @@ PCAP_FINDALLDEVS_CONFIG=
WPCAP_CONSTIFIED=
!ENDIF

!IFDEF ZLIB_DIR
ZLIB_CFLAGS=/I$(ZLIB_DIR)
ZLIB_LIBS=$(ZLIB_DIR)\zlib.lib
# Nmake uses carets to escape special characters
ZLIB_CONFIG=^#define HAVE_LIBZ 1
!else
ZLIB_CFLAGS=
ZLIB_LIBS=
ZLIB_CONFIG=
!ENDIF

!IFDEF ADNS_DIR
ADNS_CFLAGS=/I$(ADNS_DIR)\src /I$(ADNS_DIR)\adns_win32
ADNS_LIBS=$(ADNS_DIR)\adns_win32\lib\adns_dll.lib
Expand Down
12 changes: 7 additions & 5 deletions wiretap/Makefile.nmake
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#
# $Id: Makefile.nmake,v 1.37 2003/10/31 00:43:21 guy Exp $
# $Id: Makefile.nmake,v 1.38 2003/11/07 23:27:13 guy Exp $
#

include ..\config.nmake
include <win32.mak>

############### no need to modify below this line #########

CFLAGS=-DHAVE_CONFIG_H $(GLIB_CFLAGS) /I$(ZLIB_DIR) /I$(PCAP_DIR)/include \
CFLAGS=-DHAVE_CONFIG_H $(GLIB_CFLAGS) $(ZLIB_CFLAGS) /I$(PCAP_DIR)/include \
-D_U_="" $(LOCAL_CFLAGS)

.c.obj::
Expand Down Expand Up @@ -47,7 +47,7 @@ OBJECTS=ascend-grammar.obj \

wiretap_LIBS = \
$(GLIB_LIBS) \
$(ZLIB_DIR)\zlib.lib
$(ZLIB_LIBS)

all: wiretap-$(WTAP_VERSION).dll

Expand All @@ -72,8 +72,10 @@ ascend-scanner.c : ascend-scanner.l
$(LEX) -Pascend -oascend-scanner.c ascend-scanner.l


config.h : config.h.win32
sed -e s/@VERSION@/$(WTAP_VERSION)/ < config.h.win32 > $@
config.h : config.h.win32 ..\config.nmake
sed -e s/@VERSION@/$(WTAP_VERSION)/ \
-e "s/@HAVE_LIBZ@/$(ZLIB_CONFIG)/" \
< config.h.win32 > $@

clean :
rm -f $(OBJECTS) \
Expand Down
4 changes: 2 additions & 2 deletions wiretap/config.h.win32
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: config.h.win32,v 1.10 2002/06/23 10:32:36 guy Exp $ */
/* $Id: config.h.win32,v 1.11 2003/11/07 23:27:13 guy Exp $ */
/* config.h.win32 Generated manually. :-) */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
Expand Down Expand Up @@ -27,7 +27,7 @@
/* #define HAVE_UNISTD_H */

/* Define if you have the z library (-lz). */
#define HAVE_LIBZ
@HAVE_LIBZ@

/* Define if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1
Expand Down

0 comments on commit 4192ad9

Please sign in to comment.