summaryrefslogtreecommitdiff
path: root/win32/Makefile.msc
diff options
context:
space:
mode:
Diffstat (limited to 'win32/Makefile.msc')
-rw-r--r--win32/Makefile.msc29
1 files changed, 18 insertions, 11 deletions
diff --git a/win32/Makefile.msc b/win32/Makefile.msc
index 528ecaa..5900d66 100644
--- a/win32/Makefile.msc
+++ b/win32/Makefile.msc
@@ -1,11 +1,5 @@
-# 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)
@@ -27,9 +21,10 @@ AS = ml
LD = link
AR = lib
RC = rc
-CFLAGS = -nologo -MD -O2 $(LOC)
+CFLAGS = -nologo -MD -O2 -Oy- $(LOC)
+WFLAGS = -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE
ASFLAGS = -coff
-LDFLAGS = -nologo -release
+LDFLAGS = -nologo -debug -release
ARFLAGS = -nologo
RCFLAGS = /dWIN32 /r
@@ -50,21 +45,31 @@ $(IMPLIB): $(SHAREDLIB)
$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
$(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
-out:$@ $(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) $<
.asm.obj:
$(AS) -c $(ASFLAGS) $<
@@ -123,4 +128,6 @@ clean:
-del *.res
-del *.exp
-del *.exe
+ -del *.pdb
+ -del *.manifest
-del foo.gz