summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
committerMark Adler <madler@alumni.caltech.edu>2011-09-09 23:27:17 -0700
commite0ff940e1adb68d3575705ebf1546d9f07ad3b4a (patch)
tree792ac6996d1225c0955027050296126bc8ff6e26 /Makefile.in
parent7df877eccdd826e94df53215f65dee639428e83f (diff)
downloadzlib-1.2.3.8.tar.gz
zlib-1.2.3.8.tar.bz2
zlib-1.2.3.8.zip
zlib 1.2.3.8v1.2.3.8
Diffstat (limited to '')
-rw-r--r--Makefile.in96
1 files changed, 53 insertions, 43 deletions
diff --git a/Makefile.in b/Makefile.in
index 99945a8..a8d10ba 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -32,7 +32,7 @@ CPP=$(CC) -E
32 32
33STATICLIB=libz.a 33STATICLIB=libz.a
34SHAREDLIB=libz.so 34SHAREDLIB=libz.so
35SHAREDLIBV=libz.so.1.2.3.7 35SHAREDLIBV=libz.so.1.2.3.8
36SHAREDLIBM=libz.so.1 36SHAREDLIBM=libz.so.1
37LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV) 37LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
38 38
@@ -53,15 +53,16 @@ pkgconfigdir = ${libdir}/pkgconfig
53OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzio.o gzlib.o gzread.o \ 53OBJC = adler32.o compress.o crc32.o deflate.o gzclose.o gzio.o gzlib.o gzread.o \
54 gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o 54 gzwrite.o infback.o inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
55 55
56# to use the asm code: make OBJA=match.o 56PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzio.lo gzlib.lo gzread.lo \
57OBJA = 57 gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo
58 58
59objdir = objs/ 59# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
60picdir = pics/ 60OBJA =
61PIC_OBJA =
61 62
62OBJS = $(addprefix $(objdir), $(OBJC) $(OBJA)) 63OBJS = $(OBJC) $(OBJA)
63 64
64PIC_OBJS = $(addprefix $(picdir), $(OBJC) $(OBJA)) 65PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA)
65 66
66all: static shared 67all: static shared
67 68
@@ -76,12 +77,10 @@ check: test
76test: all teststatic testshared 77test: all teststatic testshared
77 78
78teststatic: static 79teststatic: static
79 @echo hello world | ./minigzip | ./minigzip -d || \ 80 @if echo hello world | ./minigzip | ./minigzip -d && ./example; then \
80 echo ' *** minigzip test FAILED ***' ; \
81 if ./example; then \
82 echo ' *** zlib test OK ***'; \ 81 echo ' *** zlib test OK ***'; \
83 else \ 82 else \
84 echo ' *** zlib test FAILED ***'; \ 83 echo ' *** zlib test FAILED ***'; false; \
85 fi 84 fi
86 -@rm -f foo.gz 85 -@rm -f foo.gz
87 86
@@ -90,22 +89,18 @@ testshared: shared
90 LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \ 89 LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
91 DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \ 90 DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
92 SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \ 91 SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
93 echo hello world | ./minigzipsh | ./minigzipsh -d || \ 92 if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh; then \
94 echo ' *** minigzip shared test FAILED ***' ; \
95 if ./examplesh; then \
96 echo ' *** zlib shared test OK ***'; \ 93 echo ' *** zlib shared test OK ***'; \
97 else \ 94 else \
98 echo ' *** zlib shared test FAILED ***'; \ 95 echo ' *** zlib shared test FAILED ***'; false; \
99 fi 96 fi
100 -@rm -f foo.gz 97 -@rm -f foo.gz
101 98
102test64: all64 99test64: all64
103 @echo hello world | ./minigzip64 | ./minigzip64 -d || \ 100 @if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64; then \
104 echo ' *** minigzip 64-bit test FAILED ***' ; \
105 if ./example64; then \
106 echo ' *** zlib 64-bit test OK ***'; \ 101 echo ' *** zlib 64-bit test OK ***'; \
107 else \ 102 else \
108 echo ' *** zlib 64-bit test FAILED ***'; \ 103 echo ' *** zlib 64-bit test FAILED ***'; false; \
109 fi 104 fi
110 -@rm -f foo.gz 105 -@rm -f foo.gz
111 106
@@ -113,51 +108,55 @@ libz.a: $(OBJS)
113 $(AR) $@ $(OBJS) 108 $(AR) $@ $(OBJS)
114 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 109 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
115 110
116objs/match.o: match.S 111match.o: match.S
117 $(CPP) match.S > _match.s 112 $(CPP) match.S > _match.s
118 $(CC) -c -o $@ _match.s 113 $(CC) -c _match.s
114 mv _match.o match.o
119 rm -f _match.s 115 rm -f _match.s
120 116
121pics/match.o: match.S 117match.lo: match.S
122 $(CPP) match.S > _match.s 118 $(CPP) match.S > _match.s
123 $(CC) -c -o $@ -fPIC _match.s 119 $(CC) -c -fPIC _match.s
120 mv _match.o match.lo
124 rm -f _match.s 121 rm -f _match.s
125 122
126objs/example64.o: example.c zlib.h zconf.h 123example64.o: example.c zlib.h zconf.h
127 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c 124 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c
128 125
129objs/minigzip64.o: minigzip.c zlib.h zconf.h 126minigzip64.o: minigzip.c zlib.h zconf.h
130 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c 127 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c
131 128
132$(objdir)%.o: %.c 129.SUFFIXES: .lo
133 $(CC) $(CFLAGS) -c -o $@ $<
134 130
135$(picdir)%.o: %.c 131.c.lo:
136 $(CC) $(SFLAGS) -DPIC -c -o $@ $< 132 -@if [ ! -d objs ]; then mkdir objs; fi
133 $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
134 -@mv objs/$*.o $@
137 135
138$(SHAREDLIBV): $(PIC_OBJS) 136$(SHAREDLIBV): $(PIC_OBJS)
139 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc 137 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
140 rm -f $(SHAREDLIB) $(SHAREDLIBM) 138 rm -f $(SHAREDLIB) $(SHAREDLIBM)
141 ln -s $@ $(SHAREDLIB) 139 ln -s $@ $(SHAREDLIB)
142 ln -s $@ $(SHAREDLIBM) 140 ln -s $@ $(SHAREDLIBM)
141 -@rmdir objs
143 142
144example$(EXE): objs/example.o $(STATICLIB) 143example$(EXE): example.o $(STATICLIB)
145 $(CC) $(CFLAGS) -o $@ objs/example.o $(LDFLAGS) 144 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
146 145
147minigzip$(EXE): objs/minigzip.o $(STATICLIB) 146minigzip$(EXE): minigzip.o $(STATICLIB)
148 $(CC) $(CFLAGS) -o $@ objs/minigzip.o $(LDFLAGS) 147 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
149 148
150examplesh$(EXE): objs/example.o $(SHAREDLIBV) 149examplesh$(EXE): example.o $(SHAREDLIBV)
151 $(CC) $(CFLAGS) -o $@ objs/example.o -L. $(SHAREDLIBV) 150 $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
152 151
153minigzipsh$(EXE): objs/minigzip.o $(SHAREDLIBV) 152minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
154 $(CC) $(CFLAGS) -o $@ objs/minigzip.o -L. $(SHAREDLIBV) 153 $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
155 154
156example64$(EXE): objs/example64.o $(STATICLIB) 155example64$(EXE): example64.o $(STATICLIB)
157 $(CC) $(CFLAGS) -o $@ objs/example64.o $(LDFLAGS) 156 $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
158 157
159minigzip64$(EXE): objs/minigzip64.o $(STATICLIB) 158minigzip64$(EXE): minigzip64.o $(STATICLIB)
160 $(CC) $(CFLAGS) -o $@ objs/minigzip64.o $(LDFLAGS) 159 $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
161 160
162install-libs: $(LIBS) 161install-libs: $(LIBS)
163 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi 162 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
@@ -196,18 +195,19 @@ uninstall:
196 195
197mostlyclean: clean 196mostlyclean: clean
198clean: 197clean:
199 rm -f $(objdir)* $(picdir)* *~ \ 198 rm -f *.o *.lo *~ \
200 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ 199 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
201 example64$(EXE) minigzip64$(EXE) \ 200 example64$(EXE) minigzip64$(EXE) \
202 libz.* foo.gz so_locations \ 201 libz.* foo.gz so_locations \
203 _match.s maketree contrib/infback9/*.o 202 _match.s maketree contrib/infback9/*.o
203 rm -rf objs
204 204
205maintainer-clean: distclean 205maintainer-clean: distclean
206distclean: clean 206distclean: clean
207 cp -p zconf.in.h zconf.h 207 cp -p zconf.in.h zconf.h
208 rm -f zlib.pc .DS_Store 208 rm -f zlib.pc .DS_Store
209 -@printf 'all:\n\t-@echo "Use ./configure first. Thank you."\n' > Makefile 209 -@printf 'all:\n\t-@echo "Use ./configure first. Thank you."\n' > Makefile
210 -@ touch -r Makefile.in Makefile objs pics 210 -@touch -r Makefile.in Makefile
211 211
212tags: 212tags:
213 etags *.[ch] 213 etags *.[ch]
@@ -226,3 +226,13 @@ infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffi
226inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h 226inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
227inftrees.o: zutil.h zlib.h zconf.h inftrees.h 227inftrees.o: zutil.h zlib.h zconf.h inftrees.h
228trees.o: deflate.h zutil.h zlib.h zconf.h trees.h 228trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
229
230adler32.lo gzio.lo zutil.lo: zutil.h zlib.h zconf.h
231gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h gzguts.h
232compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h
233crc32.lo: zutil.h zlib.h zconf.h crc32.h
234deflate.lo: deflate.h zutil.h zlib.h zconf.h
235infback.lo inflate.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
236inffast.lo: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
237inftrees.lo: zutil.h zlib.h zconf.h inftrees.h
238trees.lo: deflate.h zutil.h zlib.h zconf.h trees.h