Author: jfrederic.clere(a)jboss.com
Date: 2010-03-17 13:31:44 -0400 (Wed, 17 Mar 2010)
New Revision: 2634
Added:
trunk/srclib/zlib-1.2.4/
trunk/srclib/zlib-1.2.4/NMAKEmakefile
Log:
Add Makefile for 1.2.4
Added: trunk/srclib/zlib-1.2.4/NMAKEmakefile
===================================================================
--- trunk/srclib/zlib-1.2.4/NMAKEmakefile (rev 0)
+++ trunk/srclib/zlib-1.2.4/NMAKEmakefile 2010-03-17 17:31:44 UTC (rev 2634)
@@ -0,0 +1,151 @@
+# Copyright 2001-2006 The Apache Software Foundation or its licensors, as
+# applicable.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#
http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ====================================================================
+#
+# NMAKEmakefile Master Zlib makefile.
+# Usage:
+# DLL=1 Build DLL version
+# ASM=1 Use Masm
+# DEBUG=1 Build DEBUG version of Zlib
+#
+# Originally contributed by Mladen Turk <mturk jboss.com>
+#
+# ====================================================================
+#
+
+!IF !DEFINED(ZLIB_DECLARE_STATIC) || "$(ZLIB_DECLARE_STATIC)" == ""
+TARGET=DLL
+PROJECT = libzlib-1
+CFLAGS = -DZLIB_DLL -D_CRT_SECURE_NO_DEPRECATE $(CFLAGS)
+!ELSE
+TARGET=LIB
+PROJECT = zlib-1
+CFLAGS = -D_CRT_SECURE_NO_DEPRECATE $(CFLAGS)
+!ENDIF
+
+!IF !DEFINED(SRCDIR) || "$(SRCDIR)" == ""
+SRCDIR = .
+!ENDIF
+
+!include <..\..\NMAKEcommon.inc>
+
+!IF "$(CPU)" != "X86"
+CFLAGS = $(CFLAGS) -GS-
+!ENDIF
+
+!IF "$(TARGET)" != "LIB"
+LFLAGS = $(LFLAGS) /version:1.3
+!ENDIF
+
+INCLUDES = -I$(SRCDIR)
+PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
+OBJECTS = \
+ $(WORKDIR)\adler32.obj \
+ $(WORKDIR)\compress.obj \
+ $(WORKDIR)\crc32.obj \
+ $(WORKDIR)\deflate.obj \
+ $(WORKDIR)\infback.obj \
+ $(WORKDIR)\inffast.obj \
+ $(WORKDIR)\inflate.obj \
+ $(WORKDIR)\inftrees.obj \
+ $(WORKDIR)\trees.obj \
+ $(WORKDIR)\uncompr.obj \
+ $(WORKDIR)\zutil.obj
+
+!IFDEF ZLIB_ASM
+CFLAGS = -DASMV -DASMINF $(CFLAGS)
+!IF "$(CPU)" == "X64"
+ASM_OBJECTS = \
+ $(WORKDIR)\inffas8664.obj \
+ $(WORKDIR)\gvmat64.obj \
+ $(WORKDIR)\inffas64.obj
+
+!ELSE
+ASM_OBJECTS = \
+ $(WORKDIR)\gvmat32c.obj \
+ $(WORKDIR)\gvmat32.obj \
+ $(WORKDIR)\inffas32.obj
+
+!ENDIF
+!ELSE
+ASM_OBJECTS =
+!ENDIF
+
+BUILDINC = $(PREFIX)\include\apr-1
+BUILDLIB = $(PREFIX)\lib
+!IF "$(TARGET)" == "DLL"
+BUILDBIN = $(WORKDIR)\$(PROJECT).dll
+BUILDPDB = $(WORKDIR)\$(PROJECT).pdb
+BUILDRES = $(WORKDIR)\$(PROJECT).res
+BUILDMAN = $(BUILDBIN).manifest
+!ELSE
+BUILDBIN = $(WORKDIR)\$(PROJECT).lib
+!ENDIF
+
+all : $(WORKDIR) $(BUILDBIN)
+
+$(BUILDINC) :
+ @if not exist "$(BUILDINC)\arch\win32\$(NULL)" mkdir
"$(BUILDINC)\arch\win32"
+
+$(BUILDLIB) :
+ @if not exist "$(BUILDLIB)\$(NULL)" mkdir "$(BUILDLIB)"
+
+$(WORKDIR) :
+ @$(MAKEWORKDIR)
+
+{$(SRCDIR)}.c{$(WORKDIR)}.obj:
+ $(CC) $(CFLAGS) $(INCLUDES) $(PDBFLAGS) $<
+
+!IF "$(CPU)" == "X64"
+{$(SRCDIR)/contrib/masmx64}.c{$(WORKDIR)}.obj:
+ $(CC) $(CFLAGS) $(INCLUDES) $(PDBFLAGS) $<
+
+{$(SRCDIR)/contrib/masmx64}.asm{$(WORKDIR)}.obj:
+ $(ML) $(AFLAGS) /Fo$@ $<
+
+!ELSE
+{$(SRCDIR)/contrib/masmx86}.c{$(WORKDIR)}.obj:
+ $(CC) $(CFLAGS) $(INCLUDES) $(PDBFLAGS) $<
+
+{$(SRCDIR)/contrib/masmx86}.asm{$(WORKDIR)}.obj:
+ $(ML) $(AFLAGS) /Fo$@ $<
+
+!ENDIF
+
+
+$(OBJECTS): $(SRCDIR)/*.h
+
+!IFDEF DLL
+$(BUILDRES): win32/zlib1.rc
+ $(RC) $(RCFLAGS) /fo $(BUILDRES) win32/zlib1.rc
+$(BUILDBIN): $(WORKDIR) $(OBJECTS) $(ASM_OBJECTS) $(BUILDRES)
+ $(LINK) $(LFLAGS) $(OBJECTS) $(ASM_OBJECTS) $(BUILDRES) $(LIBS) /def:win32/zlib.def
/pdb:$(BUILDPDB) /out:$(BUILDBIN)
+ IF EXIST $(BUILDMAN) \
+ mt -nologo -manifest $(BUILDMAN) -outputresource:$(BUILDBIN);2
+!ELSE
+$(BUILDBIN): $(WORKDIR) $(OBJECTS) $(ASM_OBJECTS)
+ $(LINK) $(LFLAGS) $(OBJECTS) $(ASM_OBJECTS) /out:$(BUILDBIN)
+!ENDIF
+
+clean:
+ @$(CLEANTARGET)
+
+install: $(BUILDINC) $(BUILDLIB) $(WORKDIR) $(BUILDBIN)
+ @xcopy "$(SRCDIR)\zlib.h" "$(BUILDINC)" /Y /Q
+ @xcopy "$(SRCDIR)\zconf.h" "$(BUILDINC)" /Y /Q
+ @xcopy "$(SRCDIR)\zutil.h" "$(BUILDINC)" /Y /Q
+ @xcopy "$(WORKDIR)\*.lib" "$(BUILDLIB)" /Y /Q
+ @xcopy "$(WORKDIR)\*.dll" "$(BUILDLIB)" /Y /Q 2>NUL