source: trunk/minix/lib/zlib-1.2.3/win32/Makefile.msc@ 10

Last change on this file since 10 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 2.7 KB
Line 
1# Makefile for zlib -- Microsoft (Visual) C
2#
3# Authors:
4# Cosmin Truta, 11-Mar-2003
5# Christian Spieler, 19-Mar-2003
6#
7# Last updated:
8# Cosmin Truta, 27-Aug-2003
9#
10# Usage:
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)
14
15
16# optional build flags
17LOC =
18
19
20# variables
21STATICLIB = zlib.lib
22SHAREDLIB = zlib1.dll
23IMPLIB = zdll.lib
24
25CC = cl
26AS = ml
27LD = link
28AR = lib
29RC = rc
30CFLAGS = -nologo -MD -O2 $(LOC)
31ASFLAGS = -coff
32LDFLAGS = -nologo -release
33ARFLAGS = -nologo
34RCFLAGS = /dWIN32 /r
35
36OBJS = 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
38OBJA =
39
40
41# targets
42all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
43 example.exe minigzip.exe example_d.exe minigzip_d.exe
44
45$(STATICLIB): $(OBJS) $(OBJA)
46 $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
47
48$(IMPLIB): $(SHAREDLIB)
49
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
53
54example.exe: example.obj $(STATICLIB)
55 $(LD) $(LDFLAGS) example.obj $(STATICLIB)
56
57minigzip.exe: minigzip.obj $(STATICLIB)
58 $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
59
60example_d.exe: example.obj $(IMPLIB)
61 $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
62
63minigzip_d.exe: minigzip.obj $(IMPLIB)
64 $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
65
66.c.obj:
67 $(CC) -c $(CFLAGS) $<
68
69.asm.obj:
70 $(AS) -c $(ASFLAGS) $<
71
72adler32.obj: adler32.c zlib.h zconf.h
73
74compress.obj: compress.c zlib.h zconf.h
75
76crc32.obj: crc32.c zlib.h zconf.h crc32.h
77
78deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
79
80gzio.obj: gzio.c zutil.h zlib.h zconf.h
81
82infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
83 inffast.h inffixed.h
84
85inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
86 inffast.h
87
88inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
89 inffast.h inffixed.h
90
91inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
92
93trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
94
95uncompr.obj: uncompr.c zlib.h zconf.h
96
97zutil.obj: zutil.c zutil.h zlib.h zconf.h
98
99example.obj: example.c zlib.h zconf.h
100
101minigzip.obj: minigzip.c zlib.h zconf.h
102
103zlib1.res: win32/zlib1.rc
104 $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
105
106
107# testing
108test: example.exe minigzip.exe
109 example
110 echo hello world | minigzip | minigzip -d
111
112testdll: example_d.exe minigzip_d.exe
113 example_d
114 echo hello world | minigzip_d | minigzip_d -d
115
116
117# cleanup
118clean:
119 -del $(STATICLIB)
120 -del $(SHAREDLIB)
121 -del $(IMPLIB)
122 -del *.obj
123 -del *.res
124 -del *.exp
125 -del *.exe
126 -del foo.gz
Note: See TracBrowser for help on using the repository browser.