aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:29 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:26:29 -0700
commit639be997883d9016baaf46017a2802b2ce1698bd (patch)
treedb90fc577d10564b335980824111e8d11c5527e2 /Makefile
parentd6231142d2b883a8c3b253fa34992b5cdb4ac2fe (diff)
downloadzlib-639be997883d9016baaf46017a2802b2ce1698bd.tar.gz
zlib-639be997883d9016baaf46017a2802b2ce1698bd.tar.bz2
zlib-639be997883d9016baaf46017a2802b2ce1698bd.zip
zlib 1.2.3.3v1.2.3.3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile41
1 files changed, 32 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 8c77268..2fa2e25 100644
--- a/Makefile
+++ b/Makefile
@@ -32,7 +32,7 @@ CPP=$(CC) -E
32 32
33LIBS=libz.a 33LIBS=libz.a
34SHAREDLIB=libz.so 34SHAREDLIB=libz.so
35SHAREDLIBV=libz.so.1.2.3.2 35SHAREDLIBV=libz.so.1.2.3.3
36SHAREDLIBM=libz.so.1 36SHAREDLIBM=libz.so.1
37 37
38AR=ar 38AR=ar
@@ -61,12 +61,14 @@ PIC_OBJS = $(OBJS:%.o=%.lo)
61 61
62TEST_OBJS = example.o minigzip.o 62TEST_OBJS = example.o minigzip.o
63 63
64all: example$(EXE) minigzip$(EXE) 64allstatic: example$(EXE) minigzip$(EXE)
65 65
66check: test 66allshared: examplesh$(EXE) minigzipsh$(EXE)
67test: all 67
68 @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ 68all: allstatic allshared
69 echo hello world | ./minigzip | ./minigzip -d || \ 69
70teststatic: allstatic
71 @echo hello world | ./minigzip | ./minigzip -d || \
70 echo ' *** minigzip test FAILED ***' ; \ 72 echo ' *** minigzip test FAILED ***' ; \
71 if ./example; then \ 73 if ./example; then \
72 echo ' *** zlib test OK ***'; \ 74 echo ' *** zlib test OK ***'; \
@@ -74,6 +76,22 @@ test: all
74 echo ' *** zlib test FAILED ***'; \ 76 echo ' *** zlib test FAILED ***'; \
75 fi 77 fi
76 78
79testshared: allshared
80 @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
81 DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
82 SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
83 echo hello world | ./minigzipsh | ./minigzipsh -d || \
84 echo ' *** minigzip shared test FAILED ***' ; \
85 if ./examplesh; then \
86 echo ' *** zlib shared test OK ***'; \
87 else \
88 echo ' *** zlib shared test FAILED ***'; \
89 fi
90
91test: teststatic testshared
92
93check: test
94
77libz.a: $(OBJS) 95libz.a: $(OBJS)
78 $(AR) $@ $(OBJS) 96 $(AR) $@ $(OBJS)
79 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 97 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
@@ -105,6 +123,12 @@ example$(EXE): example.o $(LIBS)
105minigzip$(EXE): minigzip.o $(LIBS) 123minigzip$(EXE): minigzip.o $(LIBS)
106 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 124 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
107 125
126examplesh$(EXE): example.o $(LIBS)
127 $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIB)
128
129minigzipsh$(EXE): minigzip.o $(LIBS)
130 $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIB)
131
108install-libs: $(LIBS) 132install-libs: $(LIBS)
109 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi 133 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
110 -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi 134 -@if [ ! -d $(DESTDIR)$(libdir) ]; then mkdir -p $(DESTDIR)$(libdir); fi
@@ -142,7 +166,8 @@ uninstall:
142 166
143mostlyclean: clean 167mostlyclean: clean
144clean: 168clean:
145 rm -f *.o *.lo *~ example$(EXE) minigzip$(EXE) \ 169 rm -f *.o *.lo *~ \
170 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
146 libz.* foo.gz so_locations \ 171 libz.* foo.gz so_locations \
147 _match.s maketree contrib/infback9/*.o 172 _match.s maketree contrib/infback9/*.o
148 173
@@ -180,13 +205,11 @@ adler32.lo: zlib.h zconf.h zlibdefs.h
180compress.lo: zlib.h zconf.h zlibdefs.h 205compress.lo: zlib.h zconf.h zlibdefs.h
181crc32.lo: crc32.h zlib.h zconf.h zlibdefs.h 206crc32.lo: crc32.h zlib.h zconf.h zlibdefs.h
182deflate.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h 207deflate.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h
183example.lo: zlib.h zconf.h zlibdefs.h
184gzio.lo: zutil.h zlib.h zconf.h zlibdefs.h 208gzio.lo: zutil.h zlib.h zconf.h zlibdefs.h
185inffast.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h 209inffast.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h
186inflate.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h 210inflate.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
187infback.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h 211infback.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
188inftrees.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h 212inftrees.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h
189minigzip.lo: zlib.h zconf.h zlibdefs.h
190trees.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h 213trees.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h
191uncompr.lo: zlib.h zconf.h zlibdefs.h 214uncompr.lo: zlib.h zconf.h zlibdefs.h
192zutil.lo: zutil.h zlib.h zconf.h zlibdefs.h 215zutil.lo: zutil.h zlib.h zconf.h zlibdefs.h