diff options
Diffstat (limited to '')
-rw-r--r-- | Makefile | 42 | ||||
-rw-r--r-- | Makefile.in | 42 | ||||
-rw-r--r-- | msdos/Makefile.b32 (renamed from Makefile.b32) | 0 | ||||
-rw-r--r-- | msdos/Makefile.bor (renamed from Makefile.bor) | 0 | ||||
-rw-r--r-- | msdos/Makefile.dj2 (renamed from Makefile.dj2) | 33 | ||||
-rw-r--r-- | msdos/Makefile.msc (renamed from Makefile.msc) | 2 | ||||
-rw-r--r-- | msdos/Makefile.tc (renamed from Makefile.tc) | 0 | ||||
-rw-r--r-- | msdos/Makefile.wat (renamed from Makefile.wat) | 0 |
8 files changed, 79 insertions, 40 deletions
@@ -22,12 +22,14 @@ CFLAGS=-O | |||
22 | LDFLAGS=-L. -lz | 22 | LDFLAGS=-L. -lz |
23 | LDSHARED=$(CC) | 23 | LDSHARED=$(CC) |
24 | 24 | ||
25 | VER=1.0.5 | 25 | VER=1.0.7 |
26 | LIBS=libz.a | 26 | LIBS=libz.a |
27 | SHAREDLIB=libz.so | ||
27 | 28 | ||
28 | AR=ar rc | 29 | AR=ar rc |
29 | RANLIB=ranlib | 30 | RANLIB=ranlib |
30 | TAR=tar | 31 | TAR=tar |
32 | SHELL=/bin/sh | ||
31 | 33 | ||
32 | prefix=/usr/local | 34 | prefix=/usr/local |
33 | exec_prefix = $(prefix) | 35 | exec_prefix = $(prefix) |
@@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | |||
37 | 39 | ||
38 | TEST_OBJS = example.o minigzip.o | 40 | TEST_OBJS = example.o minigzip.o |
39 | 41 | ||
40 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \ | 42 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ |
41 | zlib.def zlib.rc algorithm.doc *.[ch] | 43 | algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ |
44 | nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ | ||
45 | contrib/asm386/*.asm contrib/asm386/*.c \ | ||
46 | contrib/asm386/*.bat contrib/asm386/*.mak contrib/iostream/*.cpp \ | ||
47 | contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ | ||
48 | contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 | ||
42 | 49 | ||
43 | all: example minigzip | 50 | all: example minigzip |
44 | 51 | ||
45 | test: all | 52 | test: all |
46 | ./example | 53 | @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ |
47 | echo hello world | ./minigzip | ./minigzip -d | 54 | ./example ; \ |
55 | echo hello world | ./minigzip | ./minigzip -d | ||
48 | 56 | ||
49 | libz.a: $(OBJS) | 57 | libz.a: $(OBJS) |
50 | $(AR) $@ $(OBJS) | 58 | $(AR) $@ $(OBJS) |
51 | -@ ($(RANLIB) $@ || true) 2>/dev/null | 59 | -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 |
52 | 60 | ||
53 | libz.so.$(VER): $(OBJS) | 61 | $(SHAREDLIB).$(VER): $(OBJS) |
54 | $(LDSHARED) -o $@ $(OBJS) | 62 | $(LDSHARED) -o $@ $(OBJS) |
55 | rm -f libz.so; ln -s $@ libz.so | 63 | rm -f $(SHAREDLIB) $(SHAREDLIB).1 |
64 | ln -s $@ $(SHAREDLIB) | ||
65 | ln -s $@ $(SHAREDLIB).1 | ||
56 | 66 | ||
57 | example: example.o $(LIBS) | 67 | example: example.o $(LIBS) |
58 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 68 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
@@ -68,22 +78,28 @@ install: $(LIBS) | |||
68 | cp $(LIBS) $(exec_prefix)/lib | 78 | cp $(LIBS) $(exec_prefix)/lib |
69 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | 79 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) |
70 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | 80 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 |
71 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | 81 | cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \ |
72 | ln -s libz.so.$(VER) libz.so; \ | 82 | rm -f $(SHAREDLIB) $(SHAREDLIB).1; \ |
83 | ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \ | ||
84 | ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \ | ||
85 | (ldconfig || true) >/dev/null 2>&1; \ | ||
73 | fi | 86 | fi |
74 | # The ranlib in install is needed on NeXTSTEP which checks file times | 87 | # The ranlib in install is needed on NeXTSTEP which checks file times |
88 | # ldconfig is for Linux | ||
75 | 89 | ||
76 | uninstall: | 90 | uninstall: |
77 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | 91 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ |
78 | if test -f libz.so; then \ | 92 | if test -f $(SHAREDLIB); then \ |
79 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | 93 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ |
80 | rm -f libz.so.$$v libz.so; \ | 94 | rm -f $(SHAREDLIB).$$v $(SHAREDLIB); \ |
81 | fi | 95 | fi |
82 | cd $(prefix)/include; rm -f zlib.h zconf.h | 96 | cdz $(prefix)/include; rm -f zlib.h zconf.h |
83 | 97 | ||
84 | clean: | 98 | clean: |
85 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz | 99 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz |
86 | 100 | ||
101 | distclean: clean | ||
102 | |||
87 | zip: | 103 | zip: |
88 | mv Makefile Makefile~; cp -p Makefile.in Makefile | 104 | mv Makefile Makefile~; cp -p Makefile.in Makefile |
89 | v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | 105 | v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ |
diff --git a/Makefile.in b/Makefile.in index b216ba7..3981614 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -22,12 +22,14 @@ CFLAGS=-O | |||
22 | LDFLAGS=-L. -lz | 22 | LDFLAGS=-L. -lz |
23 | LDSHARED=$(CC) | 23 | LDSHARED=$(CC) |
24 | 24 | ||
25 | VER=1.0.5 | 25 | VER=1.0.7 |
26 | LIBS=libz.a | 26 | LIBS=libz.a |
27 | SHAREDLIB=libz.so | ||
27 | 28 | ||
28 | AR=ar rc | 29 | AR=ar rc |
29 | RANLIB=ranlib | 30 | RANLIB=ranlib |
30 | TAR=tar | 31 | TAR=tar |
32 | SHELL=/bin/sh | ||
31 | 33 | ||
32 | prefix=/usr/local | 34 | prefix=/usr/local |
33 | exec_prefix = $(prefix) | 35 | exec_prefix = $(prefix) |
@@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | |||
37 | 39 | ||
38 | TEST_OBJS = example.o minigzip.o | 40 | TEST_OBJS = example.o minigzip.o |
39 | 41 | ||
40 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \ | 42 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \ |
41 | zlib.def zlib.rc algorithm.doc *.[ch] | 43 | algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \ |
44 | nt/Makefile.nt nt/zlib.dnt contrib/README.contrib contrib/*.txt \ | ||
45 | contrib/asm386/*.asm contrib/asm386/*.c \ | ||
46 | contrib/asm386/*.bat contrib/asm386/*.mak contrib/iostream/*.cpp \ | ||
47 | contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \ | ||
48 | contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 | ||
42 | 49 | ||
43 | all: example minigzip | 50 | all: example minigzip |
44 | 51 | ||
45 | test: all | 52 | test: all |
46 | ./example | 53 | @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ |
47 | echo hello world | ./minigzip | ./minigzip -d | 54 | ./example ; \ |
55 | echo hello world | ./minigzip | ./minigzip -d | ||
48 | 56 | ||
49 | libz.a: $(OBJS) | 57 | libz.a: $(OBJS) |
50 | $(AR) $@ $(OBJS) | 58 | $(AR) $@ $(OBJS) |
51 | -@ ($(RANLIB) $@ || true) 2>/dev/null | 59 | -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 |
52 | 60 | ||
53 | libz.so.$(VER): $(OBJS) | 61 | $(SHAREDLIB).$(VER): $(OBJS) |
54 | $(LDSHARED) -o $@ $(OBJS) | 62 | $(LDSHARED) -o $@ $(OBJS) |
55 | rm -f libz.so; ln -s $@ libz.so | 63 | rm -f $(SHAREDLIB) $(SHAREDLIB).1 |
64 | ln -s $@ $(SHAREDLIB) | ||
65 | ln -s $@ $(SHAREDLIB).1 | ||
56 | 66 | ||
57 | example: example.o $(LIBS) | 67 | example: example.o $(LIBS) |
58 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | 68 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) |
@@ -68,22 +78,28 @@ install: $(LIBS) | |||
68 | cp $(LIBS) $(exec_prefix)/lib | 78 | cp $(LIBS) $(exec_prefix)/lib |
69 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | 79 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) |
70 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | 80 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 |
71 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | 81 | cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \ |
72 | ln -s libz.so.$(VER) libz.so; \ | 82 | rm -f $(SHAREDLIB) $(SHAREDLIB).1; \ |
83 | ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \ | ||
84 | ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \ | ||
85 | (ldconfig || true) >/dev/null 2>&1; \ | ||
73 | fi | 86 | fi |
74 | # The ranlib in install is needed on NeXTSTEP which checks file times | 87 | # The ranlib in install is needed on NeXTSTEP which checks file times |
88 | # ldconfig is for Linux | ||
75 | 89 | ||
76 | uninstall: | 90 | uninstall: |
77 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | 91 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ |
78 | if test -f libz.so; then \ | 92 | if test -f $(SHAREDLIB); then \ |
79 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | 93 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ |
80 | rm -f libz.so.$$v libz.so; \ | 94 | rm -f $(SHAREDLIB).$$v $(SHAREDLIB); \ |
81 | fi | 95 | fi |
82 | cd $(prefix)/include; rm -f zlib.h zconf.h | 96 | cdz $(prefix)/include; rm -f zlib.h zconf.h |
83 | 97 | ||
84 | clean: | 98 | clean: |
85 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz | 99 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz |
86 | 100 | ||
101 | distclean: clean | ||
102 | |||
87 | zip: | 103 | zip: |
88 | mv Makefile Makefile~; cp -p Makefile.in Makefile | 104 | mv Makefile Makefile~; cp -p Makefile.in Makefile |
89 | v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | 105 | v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ |
diff --git a/Makefile.b32 b/msdos/Makefile.b32 index fc3ac68..fc3ac68 100644 --- a/Makefile.b32 +++ b/msdos/Makefile.b32 | |||
diff --git a/Makefile.bor b/msdos/Makefile.bor index 2116563..2116563 100644 --- a/Makefile.bor +++ b/msdos/Makefile.bor | |||
diff --git a/Makefile.dj2 b/msdos/Makefile.dj2 index 398f28b..0ab431c 100644 --- a/Makefile.dj2 +++ b/msdos/Makefile.dj2 | |||
@@ -1,5 +1,5 @@ | |||
1 | # Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. | 1 | # Makefile for zlib. Modified for djgpp v2.0 by F. J. Donahoe, 3/15/96. |
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | 2 | # Copyright (C) 1995-1998 Jean-loup Gailly. |
3 | # For conditions of distribution and use, see copyright notice in zlib.h | 3 | # For conditions of distribution and use, see copyright notice in zlib.h |
4 | 4 | ||
5 | # To compile, or to compile and test, type: | 5 | # To compile, or to compile and test, type: |
@@ -22,7 +22,8 @@ | |||
22 | # - - - - - | 22 | # - - - - - |
23 | # Alternately, these variables may be defined below, overriding the values | 23 | # Alternately, these variables may be defined below, overriding the values |
24 | # in djgpp.env, as | 24 | # in djgpp.env, as |
25 | INCLUDE_PATH=c:\usr\include | 25 | # INCLUDE_PATH=c:\usr\include |
26 | # LIBRARY_PATH=c:\usr\lib | ||
26 | 27 | ||
27 | CC=gcc | 28 | CC=gcc |
28 | 29 | ||
@@ -32,12 +33,12 @@ CC=gcc | |||
32 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | 33 | CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ |
33 | -Wstrict-prototypes -Wmissing-prototypes | 34 | -Wstrict-prototypes -Wmissing-prototypes |
34 | 35 | ||
35 | # If cp.exe is not found, replace with copy /Y . | 36 | # If cp.exe is available, replace "copy /Y" with "cp -fp" . |
36 | CP=cp -f | 37 | CP=copy /Y |
37 | # If install.exe is not found, replace with $(CP). | 38 | # If gnu install.exe is available, replace $(CP) with ginstall. |
38 | INSTALL=install | 39 | INSTALL=$(CP) |
39 | # The default value of RM is "rm -f." If "rm.exe" is not found, uncomment: | 40 | # The default value of RM is "rm -f." If "rm.exe" is found, comment out: |
40 | # RM=del | 41 | RM=del |
41 | LDLIBS=-L. -lz | 42 | LDLIBS=-L. -lz |
42 | LD=$(CC) -s -o | 43 | LD=$(CC) -s -o |
43 | LDSHARED=$(CC) | 44 | LDSHARED=$(CC) |
@@ -77,15 +78,21 @@ libz.a: $(OBJS) | |||
77 | install: $(INCL) $(LIBS) | 78 | install: $(INCL) $(LIBS) |
78 | -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) | 79 | -@if not exist $(INCLUDE_PATH)\nul mkdir $(INCLUDE_PATH) |
79 | -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) | 80 | -@if not exist $(LIBRARY_PATH)\nul mkdir $(LIBRARY_PATH) |
80 | for %%f in ($(INCL)) do $(INSTALL) %%f $(INCLUDE_PATH) | 81 | $(INSTALL) zlib.h $(INCLUDE_PATH) |
81 | for %%p in ($(LIBS)) do $(INSTALL) %%p $(LIBRARY_PATH) | 82 | $(INSTALL) zconf.h $(INCLUDE_PATH) |
83 | $(INSTALL) libz.a $(LIBRARY_PATH) | ||
82 | 84 | ||
83 | uninstall: | 85 | uninstall: |
84 | for %%f in ($(INCL)) do $(RM) $(INCLUDE_PATH)\%%f | 86 | $(RM) $(INCLUDE_PATH)\zlib.h |
85 | for %%p in ($(LIBS)) do $(RM) $(LIBRARY_PATH)\%%p | 87 | $(RM) $(INCLUDE_PATH)\zconf.h |
88 | $(RM) $(LIBRARY_PATH)\libz.a | ||
86 | 89 | ||
87 | clean: | 90 | clean: |
88 | for %%p in (*.d *.o *.exe libz.a libz.so* foo.gz) do $(RM) %%p | 91 | $(RM) *.d |
92 | $(RM) *.o | ||
93 | $(RM) *.exe | ||
94 | $(RM) libz.a | ||
95 | $(RM) foo.gz | ||
89 | 96 | ||
90 | DEPS := $(wildcard *.d) | 97 | DEPS := $(wildcard *.d) |
91 | ifneq ($(DEPS),) | 98 | ifneq ($(DEPS),) |
diff --git a/Makefile.msc b/msdos/Makefile.msc index 112684a..1a6d663 100644 --- a/Makefile.msc +++ b/msdos/Makefile.msc | |||
@@ -15,7 +15,7 @@ CFLAGS=-Oait -Gs -nologo -W3 $(MODEL) | |||
15 | #-Ox generates bad code with MSC 5.1 | 15 | #-Ox generates bad code with MSC 5.1 |
16 | CC=cl | 16 | CC=cl |
17 | LD=link | 17 | LD=link |
18 | LDFLAGS=/e/st:0x1000/noe | 18 | LDFLAGS=/e/st:0x1500/noe |
19 | O=.obj | 19 | O=.obj |
20 | 20 | ||
21 | # variables | 21 | # variables |
diff --git a/Makefile.tc b/msdos/Makefile.tc index a46ce73..a46ce73 100644 --- a/Makefile.tc +++ b/msdos/Makefile.tc | |||
diff --git a/Makefile.wat b/msdos/Makefile.wat index 2a3b629..2a3b629 100644 --- a/Makefile.wat +++ b/msdos/Makefile.wat | |||