1 # Makefile for zlib -- Microsoft (Visual) C
4 # Cosmin Truta, 11-Mar-2003
5 # Christian Spieler, 19-Mar-2003
8 # Cosmin Truta, 27-Aug-2003
11 # nmake -f win32/Makefile.msc (standard build)
12 # nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
13 # nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code)
16 # optional build flags
30 CFLAGS = -nologo -MD -O2 $(LOC)
32 LDFLAGS = -nologo -release
36 OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
37 inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
42 all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
43 example.exe minigzip.exe example_d.exe minigzip_d.exe
45 $(STATICLIB): $(OBJS) $(OBJA)
46 $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
48 $(IMPLIB): $(SHAREDLIB)
50 $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
51 $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
52 -out:$@ $(OBJS) $(OBJA) zlib1.res
54 example.exe: example.obj $(STATICLIB)
55 $(LD) $(LDFLAGS) example.obj $(STATICLIB)
57 minigzip.exe: minigzip.obj $(STATICLIB)
58 $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
60 example_d.exe: example.obj $(IMPLIB)
61 $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
63 minigzip_d.exe: minigzip.obj $(IMPLIB)
64 $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
70 $(AS) -c $(ASFLAGS) $<
72 adler32.obj: adler32.c zlib.h zconf.h
74 compress.obj: compress.c zlib.h zconf.h
76 crc32.obj: crc32.c zlib.h zconf.h crc32.h
78 deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
80 gzio.obj: gzio.c zutil.h zlib.h zconf.h
82 infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
85 inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
88 inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
91 inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
93 trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
95 uncompr.obj: uncompr.c zlib.h zconf.h
97 zutil.obj: zutil.c zutil.h zlib.h zconf.h
99 example.obj: example.c zlib.h zconf.h
101 minigzip.obj: minigzip.c zlib.h zconf.h
103 zlib1.res: win32/zlib1.rc
104 $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
108 test: example.exe minigzip.exe
110 echo hello world | minigzip | minigzip -d
112 testdll: example_d.exe minigzip_d.exe
114 echo hello world | minigzip_d | minigzip_d -d