Makefile.in 13.1 KB
Newer Older
M
Mark Adler 已提交
1
# Makefile for zlib
M
Mark Adler 已提交
2
# Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler
M
Mark Adler 已提交
3
# For conditions of distribution and use, see copyright notice in zlib.h
M
Mark Adler 已提交
4 5

# To compile and test, type:
M
Mark Adler 已提交
6
#    ./configure; make test
M
Mark Adler 已提交
7 8
# Normally configure builds both a static and a shared library.
# If you want to build just a static library, use: ./configure --static
M
Mark Adler 已提交
9

M
Mark Adler 已提交
10 11 12 13
# To use the asm code, type:
#    cp contrib/asm?86/match.S ./match.S
#    make LOC=-DASMV OBJA=match.o

M
Mark Adler 已提交
14 15 16 17 18 19 20 21 22
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
#    make install
# To install in $HOME instead of /usr/local, use:
#    make install prefix=$HOME

CC=cc

CFLAGS=-O
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
23
#CFLAGS=-g -DZLIB_DEBUG
M
Mark Adler 已提交
24 25 26
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
#           -Wstrict-prototypes -Wmissing-prototypes

M
Mark Adler 已提交
27
SFLAGS=-O
M
Mark Adler 已提交
28
LDFLAGS=
M
Mark Adler 已提交
29
TEST_LDFLAGS=-L. libz.a
M
Mark Adler 已提交
30
LDSHARED=$(CC)
M
Mark Adler 已提交
31
CPP=$(CC) -E
M
Mark Adler 已提交
32

M
Mark Adler 已提交
33
STATICLIB=libz.a
M
Mark Adler 已提交
34
SHAREDLIB=libz.so
35
SHAREDLIBV=libz.so.1.2.9.1
M
Mark Adler 已提交
36
SHAREDLIBM=libz.so.1
M
Mark Adler 已提交
37
LIBS=$(STATICLIB) $(SHAREDLIBV)
M
Mark Adler 已提交
38

39 40
AR=ar
ARFLAGS=rc
M
Mark Adler 已提交
41
RANLIB=ranlib
M
Mark Adler 已提交
42 43
LDCONFIG=ldconfig
LDSHAREDLIBC=-lc
M
Mark Adler 已提交
44
TAR=tar
M
Mark Adler 已提交
45
SHELL=/bin/sh
M
Mark Adler 已提交
46
EXE=
M
Mark Adler 已提交
47

M
Mark Adler 已提交
48 49
prefix = /usr/local
exec_prefix = ${prefix}
M
Mark Adler 已提交
50
libdir = ${exec_prefix}/lib
M
Mark Adler 已提交
51
sharedlibdir = ${libdir}
M
Mark Adler 已提交
52
includedir = ${prefix}/include
M
Mark Adler 已提交
53 54
mandir = ${prefix}/share/man
man3dir = ${mandir}/man3
M
Mark Adler 已提交
55
pkgconfigdir = ${libdir}/pkgconfig
56 57 58
SRCDIR=
ZINC=
ZINCOUT=-I.
M
Mark Adler 已提交
59

60 61 62
OBJZ = adler32.o crc32.o deflate.o infback.o inffast.o inflate.o inftrees.o trees.o zutil.o
OBJG = compress.o uncompr.o gzclose.o gzlib.o gzread.o gzwrite.o
OBJC = $(OBJZ) $(OBJG)
M
Mark Adler 已提交
63

64 65 66
PIC_OBJZ = adler32.lo crc32.lo deflate.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
PIC_OBJG = compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo
PIC_OBJC = $(PIC_OBJZ) $(PIC_OBJG)
M
Mark Adler 已提交
67

M
Mark Adler 已提交
68 69 70
# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
OBJA =
PIC_OBJA =
M
Mark Adler 已提交
71

M
Mark Adler 已提交
72
OBJS = $(OBJC) $(OBJA)
M
Mark Adler 已提交
73

M
Mark Adler 已提交
74
PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
M
Mark Adler 已提交
75 76

all: static shared
M
Mark Adler 已提交
77

M
Mark Adler 已提交
78
static: example$(EXE) minigzip$(EXE)
M
Mark Adler 已提交
79

M
Mark Adler 已提交
80
shared: examplesh$(EXE) minigzipsh$(EXE)
M
Mark Adler 已提交
81

M
Mark Adler 已提交
82 83 84
all64: example64$(EXE) minigzip64$(EXE)

check: test
M
Mark Adler 已提交
85

M
Mark Adler 已提交
86
test: all teststatic testshared
M
Mark Adler 已提交
87

M
Mark Adler 已提交
88
teststatic: static
89
	@TMPST=tmpst_$$; \
90
	if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
M
Mark Adler 已提交
91 92
	  echo '		*** zlib test OK ***'; \
	else \
M
Mark Adler 已提交
93
	  echo '		*** zlib test FAILED ***'; false; \
94 95
	fi; \
	rm -f $$TMPST
M
Mark Adler 已提交
96

M
Mark Adler 已提交
97
testshared: shared
M
Mark Adler 已提交
98
	@LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
M
Mark Adler 已提交
99
	LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
M
Mark Adler 已提交
100 101
	DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
	SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
102
	TMPSH=tmpsh_$$; \
103
	if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
M
Mark Adler 已提交
104 105
	  echo '		*** zlib shared test OK ***'; \
	else \
M
Mark Adler 已提交
106
	  echo '		*** zlib shared test FAILED ***'; false; \
107 108
	fi; \
	rm -f $$TMPSH
M
Mark Adler 已提交
109

M
Mark Adler 已提交
110
test64: all64
111
	@TMP64=tmp64_$$; \
112
	if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
M
Mark Adler 已提交
113 114
	  echo '		*** zlib 64-bit test OK ***'; \
	else \
M
Mark Adler 已提交
115
	  echo '		*** zlib 64-bit test FAILED ***'; false; \
116 117
	fi; \
	rm -f $$TMP64
M
Mark Adler 已提交
118

119 120
infcover.o: $(SRCDIR)test/infcover.c $(SRCDIR)zlib.h zconf.h
	$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/infcover.c
121 122 123 124 125 126 127 128 129

infcover: infcover.o libz.a
	$(CC) $(CFLAGS) -o $@ infcover.o libz.a

cover: infcover
	rm -f *.gcda
	./infcover
	gcov inf*.c

M
Mark Adler 已提交
130
libz.a: $(OBJS)
131
	$(AR) $(ARFLAGS) $@ $(OBJS)
M
Mark Adler 已提交
132
	-@ ($(RANLIB) $@ || true) >/dev/null 2>&1
M
Mark Adler 已提交
133

M
Mark Adler 已提交
134
match.o: match.S
M
Mark Adler 已提交
135
	$(CPP) match.S > _match.s
M
Mark Adler 已提交
136 137
	$(CC) -c _match.s
	mv _match.o match.o
M
Mark Adler 已提交
138 139
	rm -f _match.s

M
Mark Adler 已提交
140
match.lo: match.S
M
Mark Adler 已提交
141
	$(CPP) match.S > _match.s
M
Mark Adler 已提交
142 143
	$(CC) -c -fPIC _match.s
	mv _match.o match.lo
M
Mark Adler 已提交
144 145
	rm -f _match.s

146 147
example.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
	$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/example.c
M
Mark Adler 已提交
148

149 150
minigzip.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
	$(CC) $(CFLAGS) $(ZINCOUT) -c -o $@ $(SRCDIR)test/minigzip.c
151

152 153
example64.o: $(SRCDIR)test/example.c $(SRCDIR)zlib.h zconf.h
	$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/example.c
154

155 156
minigzip64.o: $(SRCDIR)test/minigzip.c $(SRCDIR)zlib.h zconf.h
	$(CC) $(CFLAGS) $(ZINCOUT) -D_FILE_OFFSET_BITS=64 -c -o $@ $(SRCDIR)test/minigzip.c
M
Mark Adler 已提交
157 158


159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
adler32.o: $(SRCDIR)adler32.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)adler32.c

crc32.o: $(SRCDIR)crc32.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)crc32.c

deflate.o: $(SRCDIR)deflate.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)deflate.c

infback.o: $(SRCDIR)infback.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)infback.c

inffast.o: $(SRCDIR)inffast.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inffast.c

inflate.o: $(SRCDIR)inflate.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inflate.c

inftrees.o: $(SRCDIR)inftrees.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)inftrees.c

trees.o: $(SRCDIR)trees.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)trees.c

zutil.o: $(SRCDIR)zutil.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)zutil.c

compress.o: $(SRCDIR)compress.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)compress.c

uncompr.o: $(SRCDIR)uncompr.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)uncompr.c

gzclose.o: $(SRCDIR)gzclose.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzclose.c

gzlib.o: $(SRCDIR)gzlib.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzlib.c

gzread.o: $(SRCDIR)gzread.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzread.c

gzwrite.o: $(SRCDIR)gzwrite.c
	$(CC) $(CFLAGS) $(ZINC) -c -o $@ $(SRCDIR)gzwrite.c


adler32.lo: $(SRCDIR)adler32.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/adler32.o $(SRCDIR)adler32.c
	-@mv objs/adler32.o $@

crc32.lo: $(SRCDIR)crc32.c
M
Mark Adler 已提交
211
	-@mkdir objs 2>/dev/null || test -d objs
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/crc32.o $(SRCDIR)crc32.c
	-@mv objs/crc32.o $@

deflate.lo: $(SRCDIR)deflate.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/deflate.o $(SRCDIR)deflate.c
	-@mv objs/deflate.o $@

infback.lo: $(SRCDIR)infback.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/infback.o $(SRCDIR)infback.c
	-@mv objs/infback.o $@

inffast.lo: $(SRCDIR)inffast.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inffast.o $(SRCDIR)inffast.c
	-@mv objs/inffast.o $@

inflate.lo: $(SRCDIR)inflate.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inflate.o $(SRCDIR)inflate.c
	-@mv objs/inflate.o $@

inftrees.lo: $(SRCDIR)inftrees.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/inftrees.o $(SRCDIR)inftrees.c
	-@mv objs/inftrees.o $@

trees.lo: $(SRCDIR)trees.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/trees.o $(SRCDIR)trees.c
	-@mv objs/trees.o $@

zutil.lo: $(SRCDIR)zutil.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/zutil.o $(SRCDIR)zutil.c
	-@mv objs/zutil.o $@

compress.lo: $(SRCDIR)compress.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/compress.o $(SRCDIR)compress.c
	-@mv objs/compress.o $@

uncompr.lo: $(SRCDIR)uncompr.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/uncompr.o $(SRCDIR)uncompr.c
	-@mv objs/uncompr.o $@

gzclose.lo: $(SRCDIR)gzclose.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzclose.o $(SRCDIR)gzclose.c
	-@mv objs/gzclose.o $@

gzlib.lo: $(SRCDIR)gzlib.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzlib.o $(SRCDIR)gzlib.c
	-@mv objs/gzlib.o $@

gzread.lo: $(SRCDIR)gzread.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzread.o $(SRCDIR)gzread.c
	-@mv objs/gzread.o $@

gzwrite.lo: $(SRCDIR)gzwrite.c
	-@mkdir objs 2>/dev/null || test -d objs
	$(CC) $(SFLAGS) $(ZINC) -DPIC -c -o objs/gzwrite.o $(SRCDIR)gzwrite.c
	-@mv objs/gzwrite.o $@

M
Mark Adler 已提交
280

M
Mark Adler 已提交
281
placebo $(SHAREDLIBV): $(PIC_OBJS) libz.a
M
Mark Adler 已提交
282
	$(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) $(LDSHAREDLIBC) $(LDFLAGS)
M
Mark Adler 已提交
283
	rm -f $(SHAREDLIB) $(SHAREDLIBM)
M
Mark Adler 已提交
284
	ln -s $@ $(SHAREDLIB)
M
Mark Adler 已提交
285
	ln -s $@ $(SHAREDLIBM)
M
Mark Adler 已提交
286
	-@rmdir objs
M
Mark Adler 已提交
287

M
Mark Adler 已提交
288
example$(EXE): example.o $(STATICLIB)
M
Mark Adler 已提交
289
	$(CC) $(CFLAGS) -o $@ example.o $(TEST_LDFLAGS)
M
Mark Adler 已提交
290

M
Mark Adler 已提交
291
minigzip$(EXE): minigzip.o $(STATICLIB)
M
Mark Adler 已提交
292
	$(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
M
Mark Adler 已提交
293

M
Mark Adler 已提交
294 295
examplesh$(EXE): example.o $(SHAREDLIBV)
	$(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
M
Mark Adler 已提交
296

M
Mark Adler 已提交
297 298
minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
	$(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
M
Mark Adler 已提交
299

M
Mark Adler 已提交
300
example64$(EXE): example64.o $(STATICLIB)
M
Mark Adler 已提交
301
	$(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
M
Mark Adler 已提交
302

M
Mark Adler 已提交
303
minigzip64$(EXE): minigzip64.o $(STATICLIB)
M
Mark Adler 已提交
304
	$(CC) $(CFLAGS) -o $@ minigzip64.o $(TEST_LDFLAGS)
M
Mark Adler 已提交
305

M
Mark Adler 已提交
306
install-libs: $(LIBS)
M
Mark Adler 已提交
307 308
	-@if [ ! -d $(DESTDIR)$(exec_prefix)  ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
	-@if [ ! -d $(DESTDIR)$(libdir)       ]; then mkdir -p $(DESTDIR)$(libdir); fi
M
Mark Adler 已提交
309
	-@if [ ! -d $(DESTDIR)$(sharedlibdir) ]; then mkdir -p $(DESTDIR)$(sharedlibdir); fi
M
Mark Adler 已提交
310 311
	-@if [ ! -d $(DESTDIR)$(man3dir)      ]; then mkdir -p $(DESTDIR)$(man3dir); fi
	-@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
M
Mark Adler 已提交
312
	cp $(STATICLIB) $(DESTDIR)$(libdir)
M
Mark Adler 已提交
313 314 315 316 317 318 319 320
	chmod 644 $(DESTDIR)$(libdir)/$(STATICLIB)
	-@($(RANLIB) $(DESTDIR)$(libdir)/libz.a || true) >/dev/null 2>&1
	-@if test -n "$(SHAREDLIBV)"; then \
	  cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir); \
	  echo "cp $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)"; \
	  chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
	  echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
	  rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
321 322
	  ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
	  ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
M
Mark Adler 已提交
323
	  ($(LDCONFIG) || true)  >/dev/null 2>&1; \
M
Mark Adler 已提交
324
	fi
325
	cp $(SRCDIR)zlib.3 $(DESTDIR)$(man3dir)
M
Mark Adler 已提交
326 327 328
	chmod 644 $(DESTDIR)$(man3dir)/zlib.3
	cp zlib.pc $(DESTDIR)$(pkgconfigdir)
	chmod 644 $(DESTDIR)$(pkgconfigdir)/zlib.pc
M
Mark Adler 已提交
329
# The ranlib in install is needed on NeXTSTEP which checks file times
M
Mark Adler 已提交
330
# ldconfig is for Linux
M
Mark Adler 已提交
331

M
Mark Adler 已提交
332 333
install: install-libs
	-@if [ ! -d $(DESTDIR)$(includedir)   ]; then mkdir -p $(DESTDIR)$(includedir); fi
334
	cp $(SRCDIR)zlib.h zconf.h $(DESTDIR)$(includedir)
M
Mark Adler 已提交
335
	chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
M
Mark Adler 已提交
336

M
Mark Adler 已提交
337
uninstall:
338 339
	cd $(DESTDIR)$(includedir) && rm -f zlib.h zconf.h
	cd $(DESTDIR)$(libdir) && rm -f libz.a; \
M
Mark Adler 已提交
340
	if test -n "$(SHAREDLIBV)" -a -f $(SHAREDLIBV); then \
M
Mark Adler 已提交
341
	  rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
M
Mark Adler 已提交
342
	fi
343 344
	cd $(DESTDIR)$(man3dir) && rm -f zlib.3
	cd $(DESTDIR)$(pkgconfigdir) && rm -f zlib.pc
M
Mark Adler 已提交
345

M
Mark Adler 已提交
346 347
docs: zlib.3.pdf

348 349
zlib.3.pdf: $(SRCDIR)zlib.3
	groff -mandoc -f H -T ps $(SRCDIR)zlib.3 | ps2pdf - $@
M
Mark Adler 已提交
350

351
zconf.h.cmakein: $(SRCDIR)zconf.h.in
352
	-@ TEMPFILE=zconfh_$$; \
353
	echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
354 355
	sed -f $$TEMPFILE $(SRCDIR)zconf.h.in > $@ &&\
	touch -r $(SRCDIR)zconf.h.in $@ &&\
356
	rm $$TEMPFILE
M
Mark Adler 已提交
357

358 359
zconf: $(SRCDIR)zconf.h.in
	cp -p $(SRCDIR)zconf.h.in zconf.h
M
Mark Adler 已提交
360

M
Mark Adler 已提交
361
mostlyclean: clean
M
Mark Adler 已提交
362
clean:
M
Mark Adler 已提交
363
	rm -f *.o *.lo *~ \
M
Mark Adler 已提交
364
	   example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
M
Mark Adler 已提交
365
	   example64$(EXE) minigzip64$(EXE) \
366
	   infcover \
M
Mark Adler 已提交
367
	   libz.* foo.gz so_locations \
M
Mark Adler 已提交
368
	   _match.s maketree contrib/infback9/*.o
M
Mark Adler 已提交
369
	rm -rf objs
370
	rm -f *.gcda *.gcno *.gcov
371
	rm -f contrib/infback9/*.gcda contrib/infback9/*.gcno contrib/infback9/*.gcov
M
Mark Adler 已提交
372

M
Mark Adler 已提交
373
maintainer-clean: distclean
374
distclean: clean zconf zconf.h.cmakein docs
375
	rm -f Makefile zlib.pc configure.log
M
Mark Adler 已提交
376
	-@rm -f .DS_Store
377 378 379 380 381 382
	@if [ -f Makefile.in ]; then \
	printf 'all:\n\t-@echo "Please use ./configure first.  Thank you."\n' > Makefile ; \
	printf '\ndistclean:\n\tmake -f Makefile.in distclean\n' >> Makefile ; \
	touch -r $(SRCDIR)Makefile.in Makefile ; fi
	@if [ ! -f zconf.h.in ]; then rm -f zconf.h zconf.h.cmakein ; fi
	@if [ ! -f zlib.3 ]; then rm -f zlib.3.pdf ; fi
M
Mark Adler 已提交
383

M
Mark Adler 已提交
384
tags:
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405
	etags $(SRCDIR)*.[ch]

adler32.o zutil.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
gzclose.o gzlib.o gzread.o gzwrite.o: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.o example.o minigzip.o uncompr.o: $(SRCDIR)zlib.h zconf.h
crc32.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.o inflate.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.o: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.o: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h

adler32.lo zutil.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
gzclose.lo gzlib.lo gzread.lo gzwrite.lo: $(SRCDIR)zlib.h zconf.h $(SRCDIR)gzguts.h
compress.lo example.lo minigzip.lo uncompr.lo: $(SRCDIR)zlib.h zconf.h
crc32.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)crc32.h
deflate.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h
infback.lo inflate.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h $(SRCDIR)inffixed.h
inffast.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h $(SRCDIR)inflate.h $(SRCDIR)inffast.h
inftrees.lo: $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)inftrees.h
trees.lo: $(SRCDIR)deflate.h $(SRCDIR)zutil.h $(SRCDIR)zlib.h zconf.h $(SRCDIR)trees.h