summaryrefslogtreecommitdiff
path: root/win32/Makefile.msc
diff options
context:
space:
mode:
Diffstat (limited to 'win32/Makefile.msc')
-rw-r--r--win32/Makefile.msc33
1 files changed, 28 insertions, 5 deletions
diff --git a/win32/Makefile.msc b/win32/Makefile.msc
index 9760208..4dc8819 100644
--- a/win32/Makefile.msc
+++ b/win32/Makefile.msc
@@ -1,10 +1,13 @@
1# Makefile for (static) zlib -- Microsoft (Visual) C. 1# Makefile for Win32 zlib.dll and the static library zlibstat.lib
2# Author: Cosmin Truta, 11-Mar-2003. 2# -- Microsoft (Visual) C.
3# Author: Cosmin Truta, 11-Mar-2003
4# Christian Spieler, 19-Mar-2003
3# 5#
4# Usage: nmake -f win32/Makefile.msc 6# Usage: nmake -f win32/Makefile.msc
5 7
6CC = cl 8CC = cl
7LD = cl 9LD = cl
10RC = rc
8CFLAGS = -nologo -MD -O2 11CFLAGS = -nologo -MD -O2
9LDFLAGS = -nologo 12LDFLAGS = -nologo
10 13
@@ -12,19 +15,33 @@ OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
12 inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj 15 inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
13 16
14# targets 17# targets
15all: zlib.lib example.exe minigzip.exe 18all: zlib.dll zlibstat.lib example.exe minigzip.exe exampl_s.exe minigz_s.exe
16 19
17zlib.lib: $(OBJS) 20zlibstat.lib: $(OBJS)
18 lib -out:$@ $(OBJS) 21 lib -out:$@ $(OBJS)
19 22
23zlib.dll: $(OBJS) zlib.res win32/zlib.def
24 link -release -def:win32/zlib.def -dll -out:$@ $(OBJS) zlib.res
25
26zlib.lib: zlib.dll
27
20example.exe: example.obj zlib.lib 28example.exe: example.obj zlib.lib
21 $(LD) $(LDFLAGS) example.obj zlib.lib 29 $(LD) $(LDFLAGS) example.obj zlib.lib
22 30
23minigzip.exe: minigzip.obj zlib.lib 31minigzip.exe: minigzip.obj zlib.lib
24 $(LD) $(LDFLAGS) minigzip.obj zlib.lib 32 $(LD) $(LDFLAGS) minigzip.obj zlib.lib
25 33
34exampl_s.exe: example.obj zlibstat.lib
35 $(LD) $(LDFLAGS) -o $@ example.obj zlibstat.lib
36
37minigz_s.exe: minigzip.obj zlibstat.lib
38 $(LD) $(LDFLAGS) -o $@ minigzip.obj zlibstat.lib
39
26.c.obj: 40.c.obj:
27 $(CC) -c $(CFLAGS) $*.c 41 $(CC) -c $(CFLAGS) $<
42
43zlib.res: win32/zlib.rc
44 $(RC) /l 0x409 /fo$@ /d WIN32 win32/zlib.rc
28 45
29adler32.obj: adler32.c zlib.h zconf.h 46adler32.obj: adler32.c zlib.h zconf.h
30 47
@@ -62,8 +79,14 @@ test: example.exe minigzip.exe
62 example 79 example
63 echo hello world | minigzip | minigzip -d 80 echo hello world | minigzip | minigzip -d
64 81
82teststat: exampl_s.exe minigz_s.exe
83 exampl_s
84 echo hello world | minigz_s | minigz_s -d
85
65# cleanup 86# cleanup
66clean: 87clean:
67 del *.obj 88 del *.obj
89 del *.dll
68 del *.lib 90 del *.lib
91 del *.exp
69 del *.exe 92 del *.exe