summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile21
-rw-r--r--Makefile.bor9
-rw-r--r--Makefile.msc8
-rw-r--r--Makefile.qnx75
-rw-r--r--Makefile.tc17
5 files changed, 106 insertions, 24 deletions
diff --git a/Makefile b/Makefile
index 2d0cdc7..d9e11c5 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ CFLAGS=-O
7#use -O3 for gcc to take advantage of inlining 7#use -O3 for gcc to take advantage of inlining
8#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" 8#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
9#CFLAGS=-g -DDEBUG 9#CFLAGS=-g -DDEBUG
10LDFLAGS=-L. -lgz 10LDFLAGS=-L. -lz
11 11
12RANLIB=ranlib 12RANLIB=ranlib
13 13
@@ -24,33 +24,34 @@ test: all
24 ./example 24 ./example
25 echo hello world | ./minigzip | ./minigzip -d 25 echo hello world | ./minigzip | ./minigzip -d
26 26
27install: libgz.a 27install: libz.a
28 -@mkdir $(prefix)/include 28 -@mkdir $(prefix)/include
29 -@mkdir $(prefix)/lib 29 -@mkdir $(prefix)/lib
30 cp zlib.h zconf.h $(prefix)/include 30 cp zlib.h zconf.h $(prefix)/include
31 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h 31 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
32 cp libgz.a $(prefix)/lib 32 cp libz.a $(prefix)/lib
33 chmod 644 $(prefix)/lib/libgz.a 33 chmod 644 $(prefix)/lib/libz.a
34 34
35libgz.a: $(OBJS) 35libz.a: $(OBJS)
36 ar rc $@ $(OBJS) 36 ar rc $@ $(OBJS)
37 $(RANLIB) $@ 37 $(RANLIB) $@
38 38
39example: example.o libgz.a 39example: example.o libz.a
40 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) 40 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
41 41
42minigzip: minigzip.o libgz.a 42minigzip: minigzip.o libz.a
43 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 43 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
44 44
45clean: 45clean:
46 rm -f *.o example minigzip libgz.a foo.gz 46 rm -f *.o example minigzip libz.a foo.gz
47 47
48zip: 48zip:
49 zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch] 49 zip -ul9 zlib README ChangeLog Makefile Make????.??? Makefile.?? \
50 descrip.mms *.[ch]
50 51
51tgz: 52tgz:
52 cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ 53 cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
53 zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch] 54 zlib/Make????.??? zlib/Makefile.?? zlib/descrip.mms zlib/*.[ch]
54 55
55# DO NOT DELETE THIS LINE -- make depend depends on it. 56# DO NOT DELETE THIS LINE -- make depend depends on it.
56 57
diff --git a/Makefile.bor b/Makefile.bor
index 732ea5d..3a823d0 100644
--- a/Makefile.bor
+++ b/Makefile.bor
@@ -4,9 +4,11 @@
4# To use, do "make -fmakefile.bor" 4# To use, do "make -fmakefile.bor"
5 5
6# WARNING: the small model is supported but only for small values of 6# WARNING: the small model is supported but only for small values of
7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory 7# MAX_WBITS and MAX_MEM_LEVEL. For example:
8# requirements (default 256K for big objects plus a few K), you can add 8# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 9# If you wish to reduce the memory requirements (default 256K for big
10# objects plus a few K), you can add to CFLAGS below:
11# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements. 12# See zconf.h for details about the memory requirements.
11 13
12# ------------- Turbo C++, Borland C++ ------------- 14# ------------- Turbo C++, Borland C++ -------------
@@ -83,6 +85,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h
83 85
84# we must cut the command line to fit in the MS/DOS 128 byte limit: 86# we must cut the command line to fit in the MS/DOS 128 byte limit:
85zlib.lib: $(OBJ1) $(OBJ2) 87zlib.lib: $(OBJ1) $(OBJ2)
88 del zlib.lib
86 $(LIB) zlib +$(OBJP1) 89 $(LIB) zlib +$(OBJP1)
87 $(LIB) zlib +$(OBJP2) 90 $(LIB) zlib +$(OBJP2)
88 91
diff --git a/Makefile.msc b/Makefile.msc
index d6899d8..335a4e1 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -3,10 +3,9 @@
3 3
4# To use, do "make makefile.msc" 4# To use, do "make makefile.msc"
5 5
6# WARNING: the small model is supported but only for small values of 6# If you wish to reduce the memory requirements (default 256K for big
7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory 7# objects plus a few K), you can add to CFLAGS below:
8# requirements (default 256K for big objects plus a few K), you can add 8# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements. 9# See zconf.h for details about the memory requirements.
11 10
12# ------------- Microsoft C 5.1 and later ------------- 11# ------------- Microsoft C 5.1 and later -------------
@@ -80,6 +79,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h
80 79
81# we must cut the command line to fit in the MS/DOS 128 byte limit: 80# we must cut the command line to fit in the MS/DOS 128 byte limit:
82zlib.lib: $(OBJ1) $(OBJ2) 81zlib.lib: $(OBJ1) $(OBJ2)
82 del zlib.lib
83 lib zlib $(OBJ1); 83 lib zlib $(OBJ1);
84 lib zlib $(OBJ2); 84 lib zlib $(OBJ2);
85 85
diff --git a/Makefile.qnx b/Makefile.qnx
new file mode 100644
index 0000000..22b1a23
--- /dev/null
+++ b/Makefile.qnx
@@ -0,0 +1,75 @@
1# Makefile for zlib
2# Copyright (C) 1995 Jean-loup Gailly.
3# For conditions of distribution and use, see copyright notice in zlib.h
4
5# Modified slightly for QNX by Chris Herborth (chrish@qnx.com)
6
7CC=cc
8CFLAGS=-4 -O -Q
9#use -O3 for gcc to take advantage of inlining
10#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
11#CFLAGS=-g -DDEBUG
12LDFLAGS=-L. -lz
13
14#RANLIB=ranlib
15
16prefix=/usr/local
17
18OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
19 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
20
21TEST_OBJS = example.o minigzip.o
22
23all: example minigzip
24
25test: all
26 ./example
27 echo hello world | ./minigzip | ./minigzip -d
28
29install: zlib.lib
30 -@mkdir $(prefix)/include
31 -@mkdir $(prefix)/lib
32 cp zlib.h zconf.h $(prefix)/include
33 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
34 cp zlib.lib $(prefix)/lib
35 chmod 644 $(prefix)/lib/zlib.lib
36
37zlib.lib: $(OBJS)
38 cc -A $@ $(OBJS)
39# ar rc $@ $(OBJS)
40# $(RANLIB) $@
41
42example: example.o zlib.lib
43 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
44
45minigzip: minigzip.o zlib.lib
46 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
47
48clean:
49 rm -f *.o example minigzip zlib.lib foo.gz
50
51zip:
52 zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch]
53
54tgz:
55 cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
56 zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch]
57
58# DO NOT DELETE THIS LINE -- make depend depends on it.
59
60adler32.o: zutil.h zlib.h zconf.h
61compress.o: zlib.h zconf.h
62crc32.o: zutil.h zlib.h zconf.h
63deflate.o: deflate.h zutil.h zlib.h zconf.h
64example.o: zlib.h zconf.h
65gzio.o: zutil.h zlib.h zconf.h
66infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
67infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
68inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
69inflate.o: zutil.h zlib.h zconf.h infblock.h
70inftrees.o: zutil.h zlib.h zconf.h inftrees.h
71infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h
72minigzip.o: zlib.h zconf.h
73trees.o: deflate.h zutil.h zlib.h zconf.h
74uncompr.o: zlib.h zconf.h
75zutil.o: zutil.h zlib.h zconf.h
diff --git a/Makefile.tc b/Makefile.tc
index e173a55..ceed87d 100644
--- a/Makefile.tc
+++ b/Makefile.tc
@@ -4,18 +4,20 @@
4# To use, do "make -fmakefile.tc" 4# To use, do "make -fmakefile.tc"
5 5
6# WARNING: the small model is supported but only for small values of 6# WARNING: the small model is supported but only for small values of
7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory 7# MAX_WBITS and MAX_MEM_LEVEL. For example:
8# requirements (default 256K for big objects plus a few K), you can add 8# -DMAX_WBITS=11 -DDEF_WBITS=11 -DMAX_MEM_LEVEL=3
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14 9# If you wish to reduce the memory requirements (default 256K for big
10# objects plus a few K), you can add to CFLAGS below:
11# -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements. 12# See zconf.h for details about the memory requirements.
11 13
12# ------------- Turbo C 2.0 ------------- 14# ------------- Turbo C 2.0 -------------
13MODEL=-ml 15MODEL=-ml
14CFLAGS=-O2 -Z $(MODEL) 16CFLAGS=-O2 -G -Z $(MODEL)
15CC=tcc 17CC=tcc -I\tc\include
16LD=tcc 18LD=tcc -L\tc\lib
17LIB=tlib 19LIB=tlib
18LDFLAGS=$(MODEL) 20LDFLAGS=$(MODEL) -f-
19O=.obj 21O=.obj
20 22
21# variables 23# variables
@@ -82,6 +84,7 @@ minigzip.obj: minigzip.c zlib.h zconf.h
82 84
83# we must cut the command line to fit in the MS/DOS 128 byte limit: 85# we must cut the command line to fit in the MS/DOS 128 byte limit:
84zlib.lib: $(OBJ1) $(OBJ2) 86zlib.lib: $(OBJ1) $(OBJ2)
87 del zlib.lib
85 $(LIB) zlib +$(OBJP1) 88 $(LIB) zlib +$(OBJP1)
86 $(LIB) zlib +$(OBJP2) 89 $(LIB) zlib +$(OBJP2)
87 90