aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile15
-rw-r--r--Makefile.bak59
-rw-r--r--Makefile.bor5
-rw-r--r--Makefile.msc5
-rw-r--r--Makefile.tc5
5 files changed, 27 insertions, 62 deletions
diff --git a/Makefile b/Makefile
index f251670..9a48249 100644
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,17 @@
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
1CC=cc 5CC=cc
2CFLAGS=-O 6CFLAGS=-O
7#CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
3#CFLAGS=-g -DDEBUG 8#CFLAGS=-g -DDEBUG
4LDFLAGS=-L. -lgz 9LDFLAGS=-L. -lgz
5 10
6RANLIB=ranlib 11RANLIB=ranlib
7 12
13prefix=/usr/local
14
8OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ 15OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
9 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o 16 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
10 17
@@ -16,6 +23,14 @@ test: all
16 ./example 23 ./example
17 echo hello world | ./minigzip | ./minigzip -d 24 echo hello world | ./minigzip | ./minigzip -d
18 25
26install: libgz.a
27 -@mkdir $(prefix)/include
28 -@mkdir $(prefix)/lib
29 cp zlib.h zconf.h $(prefix)/include
30 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
31 cp libgz.a $(prefix)/lib
32 chmod 644 $(prefix)/lib/libgz.a
33
19libgz.a: $(OBJS) 34libgz.a: $(OBJS)
20 ar rc $@ $(OBJS) 35 ar rc $@ $(OBJS)
21 $(RANLIB) $@ 36 $(RANLIB) $@
diff --git a/Makefile.bak b/Makefile.bak
deleted file mode 100644
index bfe1b74..0000000
--- a/Makefile.bak
+++ /dev/null
@@ -1,59 +0,0 @@
1CC=gcc
2CFLAGS=-O2
3#CFLAGS=-g -DDEBUG
4LDFLAGS=-L. -lgz
5
6RANLIB=ranlib
7
8OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
9 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
10
11TEST_OBJS = example.o minigzip.o inftest.o
12
13all: example minigzip inftest
14
15test: all
16 ./example
17 echo hello world | ./minigzip | ./minigzip -d
18
19libgz.a: $(OBJS)
20 ar rc $@ $(OBJS)
21 $(RANLIB) $@
22
23example: example.o libgz.a
24 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
25
26minigzip: minigzip.o libgz.a
27 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
28
29inftest: inftest.o libgz.a
30 $(CC) $(CFLAGS) -o $@ inftest.o $(LDFLAGS)
31
32clean:
33 rm -f *.o example minigzip inftest libgz.a foo.gz
34
35zip:
36 zip -ul9 zlib README ChangeLog Makefile *.[ch]
37
38tgz:
39 cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
40 zlib/*.[ch]
41
42# DO NOT DELETE THIS LINE -- make depend depends on it.
43
44adler32.o: zutil.h zlib.h zconf.h
45compress.o: zlib.h zconf.h
46crc32.o: zutil.h zlib.h zconf.h
47deflate.o: deflate.h zutil.h zlib.h zconf.h
48example.o: zlib.h zconf.h
49gzio.o: zutil.h zlib.h zconf.h
50infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
51infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h
52inflate.o: zutil.h zlib.h zconf.h infblock.h
53inftest.o: zutil.h zlib.h zconf.h
54inftrees.o: zutil.h zlib.h zconf.h inftrees.h
55infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h
56minigzip.o: zlib.h zconf.h
57trees.o: deflate.h zutil.h zlib.h zconf.h
58uncompr.o: zlib.h zconf.h
59zutil.o: zutil.h zlib.h zconf.h
diff --git a/Makefile.bor b/Makefile.bor
index 877ed62..732ea5d 100644
--- a/Makefile.bor
+++ b/Makefile.bor
@@ -4,7 +4,10 @@
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 7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
8# requirements (default 256K for big objects plus a few K), you can add
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements.
8 11
9# ------------- Turbo C++, Borland C++ ------------- 12# ------------- Turbo C++, Borland C++ -------------
10MODEL=-ml 13MODEL=-ml
diff --git a/Makefile.msc b/Makefile.msc
index 375d21c..d6899d8 100644
--- a/Makefile.msc
+++ b/Makefile.msc
@@ -4,7 +4,10 @@
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# WARNING: the small model is supported but only for small values of
7# MAX_WBITS and MAX_MEM_LEVEL 7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
8# requirements (default 256K for big objects plus a few K), you can add
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements.
8 11
9# ------------- Microsoft C 5.1 and later ------------- 12# ------------- Microsoft C 5.1 and later -------------
10MODEL=-AL 13MODEL=-AL
diff --git a/Makefile.tc b/Makefile.tc
index 51075f7..e173a55 100644
--- a/Makefile.tc
+++ b/Makefile.tc
@@ -4,7 +4,10 @@
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 7# MAX_WBITS and MAX_MEM_LEVEL. If you wish to reduce the memory
8# requirements (default 256K for big objects plus a few K), you can add
9# to CFLAGS below: -DMAX_MEM_LEVEL=7 -DMAX_WBITS=14
10# See zconf.h for details about the memory requirements.
8 11
9# ------------- Turbo C 2.0 ------------- 12# ------------- Turbo C 2.0 -------------
10MODEL=-ml 13MODEL=-ml