Let people configure whether to build with Zlib or not solely by

controlling whether ZLIB_DIR is defined or not in config.nmake.

svn path=/trunk/; revision=8911
This commit is contained in:
Guy Harris 2003-11-07 23:27:13 +00:00
parent ed66a067f5
commit 4192ad9770
5 changed files with 34 additions and 12 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.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>
@ -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_=""
@ -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)/" \

View File

@ -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. */
@ -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@

View File

@ -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
#
@ -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
@ -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

View File

@ -1,5 +1,5 @@
#
# $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
@ -7,7 +7,7 @@ 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::
@ -47,7 +47,7 @@ OBJECTS=ascend-grammar.obj \
wiretap_LIBS = \
$(GLIB_LIBS) \
$(ZLIB_DIR)\zlib.lib
$(ZLIB_LIBS)
all: wiretap-$(WTAP_VERSION).dll
@ -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) \

View File

@ -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. */
@ -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