aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile42
-rw-r--r--Makefile.in42
-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
diff --git a/Makefile b/Makefile
index b216ba7..3981614 100644
--- a/Makefile
+++ b/Makefile
@@ -22,12 +22,14 @@ CFLAGS=-O
22LDFLAGS=-L. -lz 22LDFLAGS=-L. -lz
23LDSHARED=$(CC) 23LDSHARED=$(CC)
24 24
25VER=1.0.5 25VER=1.0.7
26LIBS=libz.a 26LIBS=libz.a
27SHAREDLIB=libz.so
27 28
28AR=ar rc 29AR=ar rc
29RANLIB=ranlib 30RANLIB=ranlib
30TAR=tar 31TAR=tar
32SHELL=/bin/sh
31 33
32prefix=/usr/local 34prefix=/usr/local
33exec_prefix = $(prefix) 35exec_prefix = $(prefix)
@@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
37 39
38TEST_OBJS = example.o minigzip.o 40TEST_OBJS = example.o minigzip.o
39 41
40DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \ 42DISTFILES = 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
43all: example minigzip 50all: example minigzip
44 51
45test: all 52test: 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
49libz.a: $(OBJS) 57libz.a: $(OBJS)
50 $(AR) $@ $(OBJS) 58 $(AR) $@ $(OBJS)
51 -@ ($(RANLIB) $@ || true) 2>/dev/null 59 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
52 60
53libz.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
57example: example.o $(LIBS) 67example: 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
76uninstall: 90uninstall:
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
84clean: 98clean:
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
101distclean: clean
102
87zip: 103zip:
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
22LDFLAGS=-L. -lz 22LDFLAGS=-L. -lz
23LDSHARED=$(CC) 23LDSHARED=$(CC)
24 24
25VER=1.0.5 25VER=1.0.7
26LIBS=libz.a 26LIBS=libz.a
27SHAREDLIB=libz.so
27 28
28AR=ar rc 29AR=ar rc
29RANLIB=ranlib 30RANLIB=ranlib
30TAR=tar 31TAR=tar
32SHELL=/bin/sh
31 33
32prefix=/usr/local 34prefix=/usr/local
33exec_prefix = $(prefix) 35exec_prefix = $(prefix)
@@ -37,22 +39,30 @@ OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
37 39
38TEST_OBJS = example.o minigzip.o 40TEST_OBJS = example.o minigzip.o
39 41
40DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms \ 42DISTFILES = 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
43all: example minigzip 50all: example minigzip
44 51
45test: all 52test: 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
49libz.a: $(OBJS) 57libz.a: $(OBJS)
50 $(AR) $@ $(OBJS) 58 $(AR) $@ $(OBJS)
51 -@ ($(RANLIB) $@ || true) 2>/dev/null 59 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
52 60
53libz.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
57example: example.o $(LIBS) 67example: 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
76uninstall: 90uninstall:
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
84clean: 98clean:
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
101distclean: clean
102
87zip: 103zip:
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
25INCLUDE_PATH=c:\usr\include 25# INCLUDE_PATH=c:\usr\include
26# LIBRARY_PATH=c:\usr\lib
26 27
27CC=gcc 28CC=gcc
28 29
@@ -32,12 +33,12 @@ CC=gcc
32CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 33CFLAGS=-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" .
36CP=cp -f 37CP=copy /Y
37# If install.exe is not found, replace with $(CP). 38# If gnu install.exe is available, replace $(CP) with ginstall.
38INSTALL=install 39INSTALL=$(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 41RM=del
41LDLIBS=-L. -lz 42LDLIBS=-L. -lz
42LD=$(CC) -s -o 43LD=$(CC) -s -o
43LDSHARED=$(CC) 44LDSHARED=$(CC)
@@ -77,15 +78,21 @@ libz.a: $(OBJS)
77install: $(INCL) $(LIBS) 78install: $(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
83uninstall: 85uninstall:
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
87clean: 90clean:
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
90DEPS := $(wildcard *.d) 97DEPS := $(wildcard *.d)
91ifneq ($(DEPS),) 98ifneq ($(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
16CC=cl 16CC=cl
17LD=link 17LD=link
18LDFLAGS=/e/st:0x1000/noe 18LDFLAGS=/e/st:0x1500/noe
19O=.obj 19O=.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