From b8c69c8579053bc4aa1d8634453611fdd27fcba2 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Thu, 18 Nov 2004 10:09:07 +0000 Subject: =?UTF-8?q?Win32=20build=20update=20from=20Branko=20=C4=8Cibej:?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change the Win32 build to compile ZLib from sources, and change the ZLib versin requirement. This doesn't change neon.mak's external interface. * neon.mak: Add parameters and targets for building ZLib from source. * INSTALL.win32: Update the documentation, and note that the ZLib version must be at least 1.2.1. --- INSTALL.win32 | 16 ++++++--------- neon.mak | 62 ++++++++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/INSTALL.win32 b/INSTALL.win32 index 4b10550..27530b3 100644 --- a/INSTALL.win32 +++ b/INSTALL.win32 @@ -85,20 +85,16 @@ ______________________________________________ If you want to build Neon with the capability to decompress compressed content, then you need to compile against the Zlib library. -Currently, the Neon's neon.mak file expects to compile and link a self -compiled version of Zlib. You need Zlib 1.1.4 or greater. Zlib 1.1.3 -and older has a serious security issue. +Neon's neon.mak file will compile and link the Zlib sources. You need +Zlib 1.2.1 or later, as previous versions do not include build scripts +for Win32. -Here's how to compile Zlib. +Here's how to compile in Zlib support. 1) Get one of the Zlib source file packages in Zip format from - http://www.gzip.org/zlib/ + http://www.gzip.org/zlib/; for example, + http://www.gzip.org/zlib/zlib121.zip 2) Unzip it. - 3) Get the package - http://www.gzip.org/zlib/contrib/zlib113-win32.zip - 4) Unzip it and copy the Makefile from this package to the Zlib - 1.1.4 or greater package. - 5) Run nmake in the Zlib 1.1.4 or greater directory. Now add the ZLIB_SRC parameter to Neon's neon.mak pointing to your newly compiled zlib. diff --git a/neon.mak b/neon.mak index bd432f8..f93891e 100644 --- a/neon.mak +++ b/neon.mak @@ -8,6 +8,18 @@ NULL= NULL=nul !ENDIF +######## +# Debug vs. Release build +!IF "$(DEBUG_BUILD)" == "" +INTDIR = Release +CFLAGS = /MD /W3 /GX /O2 /D "NDEBUG" +TARGET = .\libneon.lib +!ELSE +INTDIR = Debug +CFLAGS = /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" +TARGET = .\libneonD.lib +!ENDIF + ######## # Support for Expat integration # @@ -39,7 +51,6 @@ BUILD_EXPAT = EXPAT_FLAGS = /I "$(EXPAT_INC)" /D HAVE_EXPAT /D HAVE_EXPAT_H !ENDIF - ######## # Support for OpenSSL integration !IF "$(OPENSSL_SRC)" == "" @@ -53,13 +64,26 @@ OPENSSL_FLAGS = /I "$(OPENSSL_SRC)\inc32" /D NEON_SSL !IF "$(ZLIB_SRC)" == "" ZLIB_FLAGS = ZLIB_LIBS = +ZLIB_CLEAN = +!ELSE +ZLIB_CLEAN = ZLIB_CLEAN +!IF "$(DEBUG_BUILD)" == "" +ZLIB_STATICLIB = zlib.lib +ZLIB_SHAREDLIB = zlib1.dll +ZLIB_IMPLIB = zdll.lib +ZLIB_LDFLAGS = /nologo /release !ELSE +ZLIB_STATICLIB = zlib_d.lib +ZLIB_SHAREDLIB = zlib1_d.dll +ZLIB_IMPLIB = zdll_d.lib +ZLIB_LDFLAGS = /nologo /debug +!ENDIF ZLIB_FLAGS = /I "$(ZLIB_SRC)" /D NEON_ZLIB !IF "$(ZLIB_DLL)" == "" -ZLIB_LIBS = "$(ZLIB_SRC)\zlibstat.lib" +ZLIB_LIBS = "$(ZLIB_SRC)\$(ZLIB_STATICLIB)" !ELSE ZLIB_FLAGS = $(ZLIB_FLAGS) /D ZLIB_DLL -ZLIB_LIBS = "$(ZLIB_SRC)\zlibdll.lib" +ZLIB_LIBS = "$(ZLIB_SRC)\$(ZLIB_IMPLIB)" !ENDIF !ENDIF @@ -69,15 +93,6 @@ ZLIB_LIBS = "$(ZLIB_SRC)\zlibdll.lib" IPV6_FLAGS = /D USE_GETADDRINFO !ENDIF -!IF "$(DEBUG_BUILD)" == "" -INTDIR = Release -CFLAGS = /MD /W3 /GX /O2 /D "NDEBUG" -TARGET = .\libneon.lib -!ELSE -INTDIR = Debug -CFLAGS = /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" -TARGET = .\libneonD.lib -!ENDIF # Exclude stuff we don't need from the Win32 headers WIN32_DEFS = /D WIN32_LEAN_AND_MEAN /D NOUSER /D NOGDI /D NONLS /D NOCRYPT @@ -135,7 +150,7 @@ LIB32_OBJS = $(LIB32_OBJS) $(ZLIB_LIBS) ALL: ".\src\config.h" "$(TARGET)" -CLEAN: +CLEAN: $(ZLIB_CLEAN) -@erase "$(INTDIR)\ne_207.obj" -@erase "$(INTDIR)\ne_alloc.obj" -@erase "$(INTDIR)\ne_acl.obj" @@ -203,3 +218,24 @@ CLEAN: "$(INTDIR)\ne_uri.obj": .\src\ne_uri.c "$(INTDIR)\ne_utils.obj": .\src\ne_utils.c "$(INTDIR)\ne_xml.obj": .\src\ne_xml.c + +"$(ZLIB_SRC)\$(ZLIB_STATICLIB)": + <