diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | Makefile.bak | 59 | ||||
-rw-r--r-- | Makefile.bor | 5 | ||||
-rw-r--r-- | Makefile.msc | 5 | ||||
-rw-r--r-- | Makefile.tc | 5 |
5 files changed, 27 insertions, 62 deletions
@@ -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 | |||
1 | CC=cc | 5 | CC=cc |
2 | CFLAGS=-O | 6 | CFLAGS=-O |
7 | #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" | ||
3 | #CFLAGS=-g -DDEBUG | 8 | #CFLAGS=-g -DDEBUG |
4 | LDFLAGS=-L. -lgz | 9 | LDFLAGS=-L. -lgz |
5 | 10 | ||
6 | RANLIB=ranlib | 11 | RANLIB=ranlib |
7 | 12 | ||
13 | prefix=/usr/local | ||
14 | |||
8 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | 15 | OBJS = 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 | ||
26 | install: 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 | |||
19 | libgz.a: $(OBJS) | 34 | libgz.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 @@ | |||
1 | CC=gcc | ||
2 | CFLAGS=-O2 | ||
3 | #CFLAGS=-g -DDEBUG | ||
4 | LDFLAGS=-L. -lgz | ||
5 | |||
6 | RANLIB=ranlib | ||
7 | |||
8 | OBJS = 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 | |||
11 | TEST_OBJS = example.o minigzip.o inftest.o | ||
12 | |||
13 | all: example minigzip inftest | ||
14 | |||
15 | test: all | ||
16 | ./example | ||
17 | echo hello world | ./minigzip | ./minigzip -d | ||
18 | |||
19 | libgz.a: $(OBJS) | ||
20 | ar rc $@ $(OBJS) | ||
21 | $(RANLIB) $@ | ||
22 | |||
23 | example: example.o libgz.a | ||
24 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
25 | |||
26 | minigzip: minigzip.o libgz.a | ||
27 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
28 | |||
29 | inftest: inftest.o libgz.a | ||
30 | $(CC) $(CFLAGS) -o $@ inftest.o $(LDFLAGS) | ||
31 | |||
32 | clean: | ||
33 | rm -f *.o example minigzip inftest libgz.a foo.gz | ||
34 | |||
35 | zip: | ||
36 | zip -ul9 zlib README ChangeLog Makefile *.[ch] | ||
37 | |||
38 | tgz: | ||
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 | |||
44 | adler32.o: zutil.h zlib.h zconf.h | ||
45 | compress.o: zlib.h zconf.h | ||
46 | crc32.o: zutil.h zlib.h zconf.h | ||
47 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
48 | example.o: zlib.h zconf.h | ||
49 | gzio.o: zutil.h zlib.h zconf.h | ||
50 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
51 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h | ||
52 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
53 | inftest.o: zutil.h zlib.h zconf.h | ||
54 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
55 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
56 | minigzip.o: zlib.h zconf.h | ||
57 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
58 | uncompr.o: zlib.h zconf.h | ||
59 | zutil.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++ ------------- |
10 | MODEL=-ml | 13 | MODEL=-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 ------------- |
10 | MODEL=-AL | 13 | MODEL=-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 ------------- |
10 | MODEL=-ml | 13 | MODEL=-ml |