aboutsummaryrefslogtreecommitdiff
path: root/zlib/win32/Makefile.msc
diff options
context:
space:
mode:
Diffstat (limited to 'zlib/win32/Makefile.msc')
-rw-r--r--zlib/win32/Makefile.msc82
1 files changed, 58 insertions, 24 deletions
diff --git a/zlib/win32/Makefile.msc b/zlib/win32/Makefile.msc
index 528ecaaf2..59bb0dae5 100644
--- a/zlib/win32/Makefile.msc
+++ b/zlib/win32/Makefile.msc
@@ -1,22 +1,17 @@
-# Makefile for zlib -- Microsoft (Visual) C
-#
-# Authors:
-# Cosmin Truta, 11-Mar-2003
-# Christian Spieler, 19-Mar-2003
-#
-# Last updated:
-# Cosmin Truta, 27-Aug-2003
+# Makefile for zlib using Microsoft (Visual) C
+# zlib is copyright (C) 1995-2006 Jean-loup Gailly and Mark Adler
#
# Usage:
-# nmake -f win32/Makefile.msc (standard build)
-# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
-# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code)
-
+# nmake -f win32/Makefile.msc (standard build)
+# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
+# nmake -f win32/Makefile.msc LOC="-DASMV -DASMINF" \
+# OBJA="inffas32.obj match686.obj" (use ASM code, x86)
+# nmake -f win32/Makefile.msc AS=ml64 LOC="-DASMV -DASMINF -I." \
+# OBJA="inffasx64.obj gvmat64.obj inffas8664.obj" (use ASM code, x64)
# optional build flags
LOC =
-
# variables
STATICLIB = zlib.lib
SHAREDLIB = zlib1.dll
@@ -27,14 +22,15 @@ AS = ml
LD = link
AR = lib
RC = rc
-CFLAGS = -nologo -MD -O2 $(LOC)
-ASFLAGS = -coff
-LDFLAGS = -nologo -release
+CFLAGS = -nologo -MD -W3 -O2 -Oy- -Zi -Fd"zlib" $(LOC)
+WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
+ASFLAGS = -coff -Zi $(LOC)
+LDFLAGS = -nologo -debug -incremental:no -opt:ref
ARFLAGS = -nologo
RCFLAGS = /dWIN32 /r
-OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
- inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
+OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzclose.obj gzlib.obj gzread.obj \
+ gzwrite.obj infback.obj inflate.obj inftrees.obj inffast.obj trees.obj uncompr.obj zutil.obj
OBJA =
@@ -49,24 +45,43 @@ $(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
$(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
- -out:$@ $(OBJS) $(OBJA) zlib1.res
+ -out:$@ -base:0x5A4C0000 $(OBJS) $(OBJA) zlib1.res
+ if exist $@.manifest \
+ mt -nologo -manifest $@.manifest -outputresource:$@;2
example.exe: example.obj $(STATICLIB)
$(LD) $(LDFLAGS) example.obj $(STATICLIB)
+ if exist $@.manifest \
+ mt -nologo -manifest $@.manifest -outputresource:$@;1
minigzip.exe: minigzip.obj $(STATICLIB)
$(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
+ if exist $@.manifest \
+ mt -nologo -manifest $@.manifest -outputresource:$@;1
example_d.exe: example.obj $(IMPLIB)
$(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
+ if exist $@.manifest \
+ mt -nologo -manifest $@.manifest -outputresource:$@;1
minigzip_d.exe: minigzip.obj $(IMPLIB)
$(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
+ if exist $@.manifest \
+ mt -nologo -manifest $@.manifest -outputresource:$@;1
.c.obj:
- $(CC) -c $(CFLAGS) $<
+ $(CC) -c $(WFLAGS) $(CFLAGS) $<
+
+{test}.c.obj:
+ $(CC) -c -I. $(WFLAGS) $(CFLAGS) $<
+
+{contrib/masmx64}.c.obj:
+ $(CC) -c $(WFLAGS) $(CFLAGS) $<
+
+{contrib/masmx64}.asm.obj:
+ $(AS) -c $(ASFLAGS) $<
-.asm.obj:
+{contrib/masmx86}.asm.obj:
$(AS) -c $(ASFLAGS) $<
adler32.obj: adler32.c zlib.h zconf.h
@@ -77,7 +92,13 @@ crc32.obj: crc32.c zlib.h zconf.h crc32.h
deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
+gzclose.obj: gzclose.c zlib.h zconf.h gzguts.h
+
+gzlib.obj: gzlib.c zlib.h zconf.h gzguts.h
+
+gzread.obj: gzread.c zlib.h zconf.h gzguts.h
+
+gzwrite.obj: gzwrite.c zlib.h zconf.h gzguts.h
infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
inffast.h inffixed.h
@@ -96,9 +117,20 @@ uncompr.obj: uncompr.c zlib.h zconf.h
zutil.obj: zutil.c zutil.h zlib.h zconf.h
-example.obj: example.c zlib.h zconf.h
+gvmat64.obj: contrib\masmx64\gvmat64.asm
+
+inffasx64.obj: contrib\masmx64\inffasx64.asm
+
+inffas8664.obj: contrib\masmx64\inffas8664.c zutil.h zlib.h zconf.h \
+ inftrees.h inflate.h inffast.h
+
+inffas32.obj: contrib\masmx86\inffas32.asm
+
+match686.obj: contrib\masmx86\match686.asm
+
+example.obj: test/example.c zlib.h zconf.h
-minigzip.obj: minigzip.c zlib.h zconf.h
+minigzip.obj: test/minigzip.c zlib.h zconf.h
zlib1.res: win32/zlib1.rc
$(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
@@ -123,4 +155,6 @@ clean:
-del *.res
-del *.exp
-del *.exe
+ -del *.pdb
+ -del *.manifest
-del foo.gz