summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile-dll.msc76
-rw-r--r--win32/Makefile.bor91
-rw-r--r--win32/Makefile.gcc105
-rw-r--r--win32/Makefile.msc69
-rw-r--r--win32/zlib.def49
5 files changed, 390 insertions, 0 deletions
diff --git a/win32/Makefile-dll.msc b/win32/Makefile-dll.msc
new file mode 100644
index 0000000..516f4cf
--- /dev/null
+++ b/win32/Makefile-dll.msc
@@ -0,0 +1,76 @@
1# Makefile for zlib.dll -- Microsoft (Visual) C.
2# Author: Cosmin Truta, 11-Mar-2003.
3#
4# Usage: nmake -f win32/Makefile-dll.msc
5
6CC = cl
7LD = cl
8CFLAGS = -nologo -MD -O2
9LDFLAGS = -nologo
10
11OBJS = 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
13
14# targets
15all: zlib.dll zlib.lib example.exe minigzip.exe
16
17zlib.lib: $(OBJS)
18 lib -out:$@ $(OBJS)
19
20zlib.dll: $(OBJS) win32/zlib.def
21 link -release -def:win32/zlib.def -dll -out:$@ $(OBJS)
22
23zlib.lib: zlib.dll
24
25example.exe: example.obj zlib.lib
26 $(LD) $(LDFLAGS) example.obj zlib.lib
27
28minigzip.exe: minigzip.obj zlib.lib
29 $(LD) $(LDFLAGS) minigzip.obj zlib.lib
30
31.c.obj:
32 $(CC) -c $(CFLAGS) $*.c
33
34adler32.obj: adler32.c zlib.h zconf.h
35
36compress.obj: compress.c zlib.h zconf.h
37
38crc32.obj: crc32.c zlib.h zconf.h crc32.h
39
40deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
41
42gzio.obj: gzio.c zutil.h zlib.h zconf.h
43
44infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
45 inffast.h inffixed.h
46
47inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
48 inffast.h
49
50inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
51 inffast.h inffixed.h
52
53inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
54
55trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
56
57uncompr.obj: uncompr.c zlib.h zconf.h
58
59zutil.obj: zutil.c zutil.h zlib.h zconf.h
60
61example.obj: example.c zlib.h zconf.h
62
63minigzip.obj: minigzip.c zlib.h zconf.h
64
65# testing
66test: example.exe minigzip.exe
67 example
68 echo hello world | minigzip | minigzip -d
69
70# cleanup
71clean:
72 del *.obj
73 del *.dll
74 del *.lib
75 del *.exp
76 del *.exe
diff --git a/win32/Makefile.bor b/win32/Makefile.bor
new file mode 100644
index 0000000..f1a1c46
--- /dev/null
+++ b/win32/Makefile.bor
@@ -0,0 +1,91 @@
1# Makefile for zlib
2# Borland C++ for Win32
3# Updated for zlib-1.2.x by Cosmin Truta, 11-Mar-2003.
4
5# Usage: "make -f win32/makefile.bor"
6
7# ------------ Borland C++ for Win32 ------------
8
9# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
10# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or added
11# to the declaration of LOC here:
12LOC = $(LOCAL_ZLIB)
13
14CC = bcc32
15LD = bcc32
16AR = tlib
17CFLAGS = -O2 -d -k- $(LOC)
18LDFLAGS = $(LOC)
19
20
21# variables
22ZLIB_LIB = zlib.lib
23
24OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
25OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
26OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
27OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
28
29
30# targets
31all: $(ZLIB_LIB) example.exe minigzip.exe
32
33.c.obj:
34 $(CC) -c $(CFLAGS) $*.c
35
36adler32.obj: adler32.c zlib.h zconf.h
37
38compress.obj: compress.c zlib.h zconf.h
39
40crc32.obj: crc32.c zlib.h zconf.h crc32.h
41
42deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
43
44gzio.obj: gzio.c zutil.h zlib.h zconf.h
45
46infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
47 inffast.h inffixed.h
48
49inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
50 inffast.h
51
52inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
53 inffast.h inffixed.h
54
55inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
56
57trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
58
59uncompr.obj: uncompr.c zlib.h zconf.h
60
61zutil.obj: zutil.c zutil.h zlib.h zconf.h
62
63example.obj: example.c zlib.h zconf.h
64
65minigzip.obj: minigzip.c zlib.h zconf.h
66
67
68# For the sake of the old Borland make,
69# the command line is cut to fit in the MS-DOS 128 byte limit:
70$(ZLIB_LIB): $(OBJ1) $(OBJ2)
71 -del $(ZLIB_LIB)
72 $(AR) $(ZLIB_LIB) $(OBJP1)
73 $(AR) $(ZLIB_LIB) $(OBJP2)
74
75example.exe: example.obj $(ZLIB_LIB)
76 $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
77
78minigzip.exe: minigzip.obj $(ZLIB_LIB)
79 $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
80
81test: example.exe minigzip.exe
82 example
83 echo hello world | minigzip | minigzip -d
84
85clean:
86 -del *.obj
87 -del *.exe
88 -del *.lib
89 -del *.tds
90 -del zlib.bak
91 -del foo.gz
diff --git a/win32/Makefile.gcc b/win32/Makefile.gcc
new file mode 100644
index 0000000..7f9973b
--- /dev/null
+++ b/win32/Makefile.gcc
@@ -0,0 +1,105 @@
1# Makefile for zlib, derived from Makefile.dj2.
2# Modified for mingw32 by C. Spieler, 6/16/98.
3# Updated for zlib-1.2.x by Cosmin Truta, 11-Mar-2003.
4# Tested under Cygwin and MinGW.
5
6# Copyright (C) 1995-1998 Jean-loup Gailly.
7# For conditions of distribution and use, see copyright notice in zlib.h
8
9# To compile, or to compile and test, type:
10#
11# make -fmakefile.gcc; make test -fmakefile.gcc
12#
13# To install libz.a, zconf.h and zlib.h in the system directories, type:
14#
15# make install -fmakefile.gcc
16#
17
18LIB = libz.a
19SHAREDLIB = libz.so
20VER = 1.2.0
21
22CC = gcc
23#CFLAGS = -DDEBUG -MMD -g
24CFLAGS = $(LOC) -O3 -Wall
25
26AS = $(CC)
27ASFLAGS = $(LOC) -Wall
28
29LD = $(CC)
30LDFLAGS = $(LOC) -s
31
32AR = ar
33ARFLAGS = rcs
34
35CP = cp -fp
36# If GNU install is available, replace $(CP) with install.
37INSTALL = $(CP)
38RM = rm -f
39
40prefix = /usr/local
41exec_prefix = $(prefix)
42
43OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
44 inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
45
46# to use the asm code: make OBJA=match.o
47OBJA =
48
49TEST_OBJS = example.o minigzip.o
50
51all: $(LIB) example minigzip
52
53test: all
54 ./example
55 echo hello world | ./minigzip | ./minigzip -d
56
57.c.o:
58 $(CC) $(CFLAGS) -c -o $@ $<
59
60libz.a: $(OBJS)
61 $(AR) $(ARFLAGS) $@ $(OBJS)
62
63example: example.o $(LIB)
64 $(LD) -o $@ $< $(LIB)
65
66minigzip: minigzip.o $(LIB)
67 $(LD) -o $@ $< $(LIB)
68
69
70# INCLUDE_PATH and LIBRARY_PATH were set for [make] in djgpp.env .
71
72.PHONY : uninstall clean
73
74install: zlib.h zconf.h $(LIB)
75 -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
76 -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
77 $(INSTALL) zlib.h $(INCLUDE_PATH)
78 $(INSTALL) zconf.h $(INCLUDE_PATH)
79 $(INSTALL) $(LIB) $(LIBRARY_PATH)
80
81uninstall:
82 $(RM) $(INCLUDE_PATH)/zlib.h
83 $(RM) $(INCLUDE_PATH)/zconf.h
84 $(RM) $(LIBRARY_PATH)/libz.a
85
86clean:
87 $(RM) *.o
88 $(RM) *.exe
89 $(RM) libz.a
90 $(RM) foo.gz
91
92adler32.o: zlib.h zconf.h
93compress.o: zlib.h zconf.h
94crc32.o: crc32.h zlib.h zconf.h
95deflate.o: deflate.h zutil.h zlib.h zconf.h
96example.o: zlib.h zconf.h
97gzio.o: zutil.h zlib.h zconf.h
98inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
99inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
100infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
101inftrees.o: zutil.h zlib.h zconf.h inftrees.h
102minigzip.o: zlib.h zconf.h
103trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
104uncompr.o: zlib.h zconf.h
105zutil.o: zutil.h zlib.h zconf.h
diff --git a/win32/Makefile.msc b/win32/Makefile.msc
new file mode 100644
index 0000000..9760208
--- /dev/null
+++ b/win32/Makefile.msc
@@ -0,0 +1,69 @@
1# Makefile for (static) zlib -- Microsoft (Visual) C.
2# Author: Cosmin Truta, 11-Mar-2003.
3#
4# Usage: nmake -f win32/Makefile.msc
5
6CC = cl
7LD = cl
8CFLAGS = -nologo -MD -O2
9LDFLAGS = -nologo
10
11OBJS = 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
13
14# targets
15all: zlib.lib example.exe minigzip.exe
16
17zlib.lib: $(OBJS)
18 lib -out:$@ $(OBJS)
19
20example.exe: example.obj zlib.lib
21 $(LD) $(LDFLAGS) example.obj zlib.lib
22
23minigzip.exe: minigzip.obj zlib.lib
24 $(LD) $(LDFLAGS) minigzip.obj zlib.lib
25
26.c.obj:
27 $(CC) -c $(CFLAGS) $*.c
28
29adler32.obj: adler32.c zlib.h zconf.h
30
31compress.obj: compress.c zlib.h zconf.h
32
33crc32.obj: crc32.c zlib.h zconf.h crc32.h
34
35deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
36
37gzio.obj: gzio.c zutil.h zlib.h zconf.h
38
39infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
40 inffast.h inffixed.h
41
42inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
43 inffast.h
44
45inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
46 inffast.h inffixed.h
47
48inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
49
50trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
51
52uncompr.obj: uncompr.c zlib.h zconf.h
53
54zutil.obj: zutil.c zutil.h zlib.h zconf.h
55
56example.obj: example.c zlib.h zconf.h
57
58minigzip.obj: minigzip.c zlib.h zconf.h
59
60# testing
61test: example.exe minigzip.exe
62 example
63 echo hello world | minigzip | minigzip -d
64
65# cleanup
66clean:
67 del *.obj
68 del *.lib
69 del *.exe
diff --git a/win32/zlib.def b/win32/zlib.def
new file mode 100644
index 0000000..3b4b05a
--- /dev/null
+++ b/win32/zlib.def
@@ -0,0 +1,49 @@
1LIBRARY zlib.dll
2DESCRIPTION "zlib compression library for Windows"
3
4EXPORTS
5 adler32 @1
6 compress @2
7 crc32 @3
8 deflate @4
9 deflateCopy @5
10 deflateEnd @6
11 deflateInit2_ @7
12 deflateInit_ @8
13 deflateParams @9
14 deflateReset @10
15 deflateSetDictionary @11
16 gzclose @12
17 gzdopen @13
18 gzerror @14
19 gzflush @15
20 gzopen @16
21 gzread @17
22 gzwrite @18
23 inflate @19
24 inflateEnd @20
25 inflateInit2_ @21
26 inflateInit_ @22
27 inflateReset @23
28 inflateSetDictionary @24
29 inflateSync @25
30 uncompress @26
31 zlibVersion @27
32 gzprintf @28
33 gzputc @29
34 gzgetc @30
35 gzseek @31
36 gzrewind @32
37 gztell @33
38 gzeof @34
39 gzsetparams @35
40 zError @36
41 inflateSyncPoint @37
42 get_crc_table @38
43 compress2 @39
44 gzputs @40
45 gzgets @41
46; The following functions exist since zlib-1.2.0
47; deflateBound @42
48; compressBound @43
49; etc.