summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in111
1 files changed, 49 insertions, 62 deletions
diff --git a/Makefile.in b/Makefile.in
index 9b81f23..99945a8 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.6 35SHAREDLIBV=libz.so.1.2.3.7
36SHAREDLIBM=libz.so.1 36SHAREDLIBM=libz.so.1
37LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV) 37LIBS=$(STATICLIB) $(SHAREDLIB) $(SHAREDLIBV)
38 38
@@ -53,16 +53,15 @@ 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
56PIC_OBJC = adler32.lo compress.lo crc32.lo deflate.lo gzclose.lo gzio.lo gzlib.lo gzread.lo \ 56# to use the asm code: make OBJA=match.o
57 gzwrite.lo infback.lo inffast.lo inflate.lo inftrees.lo trees.lo uncompr.lo zutil.lo
58
59# to use the asm code: make OBJA=match.o, PIC_OBJA=match.lo
60OBJA = 57OBJA =
61PIC_OBJA =
62 58
63OBJS = $(OBJC) $(OBJA) 59objdir = objs/
60picdir = pics/
61
62OBJS = $(addprefix $(objdir), $(OBJC) $(OBJA))
64 63
65PIC_OBJS = $(PIC_OBJC) $(PIC_OBJA) 64PIC_OBJS = $(addprefix $(picdir), $(OBJC) $(OBJA))
66 65
67all: static shared 66all: static shared
68 67
@@ -84,6 +83,7 @@ teststatic: static
84 else \ 83 else \
85 echo ' *** zlib test FAILED ***'; \ 84 echo ' *** zlib test FAILED ***'; \
86 fi 85 fi
86 -@rm -f foo.gz
87 87
88testshared: shared 88testshared: shared
89 @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \ 89 @LD_LIBRARY_PATH=`pwd`:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
@@ -97,6 +97,7 @@ testshared: shared
97 else \ 97 else \
98 echo ' *** zlib shared test FAILED ***'; \ 98 echo ' *** zlib shared test FAILED ***'; \
99 fi 99 fi
100 -@rm -f foo.gz
100 101
101test64: all64 102test64: all64
102 @echo hello world | ./minigzip64 | ./minigzip64 -d || \ 103 @echo hello world | ./minigzip64 | ./minigzip64 -d || \
@@ -106,60 +107,57 @@ test64: all64
106 else \ 107 else \
107 echo ' *** zlib 64-bit test FAILED ***'; \ 108 echo ' *** zlib 64-bit test FAILED ***'; \
108 fi 109 fi
110 -@rm -f foo.gz
109 111
110libz.a: $(OBJS) 112libz.a: $(OBJS)
111 $(AR) $@ $(OBJS) 113 $(AR) $@ $(OBJS)
112 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1 114 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
113 115
114match.o: match.S 116objs/match.o: match.S
115 $(CPP) match.S > _match.s 117 $(CPP) match.S > _match.s
116 $(CC) -c _match.s 118 $(CC) -c -o $@ _match.s
117 mv _match.o match.o
118 rm -f _match.s 119 rm -f _match.s
119 120
120match.lo: match.S 121pics/match.o: match.S
121 $(CPP) match.S > _match.s 122 $(CPP) match.S > _match.s
122 $(CC) -c -fPIC _match.s 123 $(CC) -c -o $@ -fPIC _match.s
123 mv _match.o match.lo
124 rm -f _match.s 124 rm -f _match.s
125 125
126example64.o: example.c zlib.h zconf.h zlibdefs.h 126objs/example64.o: example.c zlib.h zconf.h
127 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c 127 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ example.c
128 128
129minigzip64.o: minigzip.c zlib.h zconf.h zlibdefs.h 129objs/minigzip64.o: minigzip.c zlib.h zconf.h
130 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c 130 $(CC) $(CFLAGS) -D_FILE_OFFSET_BITS=64 -c -o $@ minigzip.c
131 131
132.SUFFIXES: .lo 132$(objdir)%.o: %.c
133 $(CC) $(CFLAGS) -c -o $@ $<
133 134
134.c.lo: 135$(picdir)%.o: %.c
135 -@if [ ! -d objs ]; then mkdir objs; fi 136 $(CC) $(SFLAGS) -DPIC -c -o $@ $<
136 $(CC) $(SFLAGS) -DPIC -c -o objs/$*.o $<
137 -@mv objs/$*.o $@
138 137
139$(SHAREDLIBV): $(PIC_OBJS) 138$(SHAREDLIBV): $(PIC_OBJS)
140 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc 139 $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
141 rm -f $(SHAREDLIB) $(SHAREDLIBM) 140 rm -f $(SHAREDLIB) $(SHAREDLIBM)
142 ln -s $@ $(SHAREDLIB) 141 ln -s $@ $(SHAREDLIB)
143 ln -s $@ $(SHAREDLIBM) 142 ln -s $@ $(SHAREDLIBM)
144 -@rmdir objs
145 143
146example$(EXE): example.o $(STATICLIB) 144example$(EXE): objs/example.o $(STATICLIB)
147 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) 145 $(CC) $(CFLAGS) -o $@ objs/example.o $(LDFLAGS)
148 146
149minigzip$(EXE): minigzip.o $(STATICLIB) 147minigzip$(EXE): objs/minigzip.o $(STATICLIB)
150 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) 148 $(CC) $(CFLAGS) -o $@ objs/minigzip.o $(LDFLAGS)
151 149
152examplesh$(EXE): example.o $(SHAREDLIBV) 150examplesh$(EXE): objs/example.o $(SHAREDLIBV)
153 $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV) 151 $(CC) $(CFLAGS) -o $@ objs/example.o -L. $(SHAREDLIBV)
154 152
155minigzipsh$(EXE): minigzip.o $(SHAREDLIBV) 153minigzipsh$(EXE): objs/minigzip.o $(SHAREDLIBV)
156 $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV) 154 $(CC) $(CFLAGS) -o $@ objs/minigzip.o -L. $(SHAREDLIBV)
157 155
158example64$(EXE): example64.o $(STATICLIB) 156example64$(EXE): objs/example64.o $(STATICLIB)
159 $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS) 157 $(CC) $(CFLAGS) -o $@ objs/example64.o $(LDFLAGS)
160 158
161minigzip64$(EXE): minigzip64.o $(STATICLIB) 159minigzip64$(EXE): objs/minigzip64.o $(STATICLIB)
162 $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS) 160 $(CC) $(CFLAGS) -o $@ objs/minigzip64.o $(LDFLAGS)
163 161
164install-libs: $(LIBS) 162install-libs: $(LIBS)
165 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi 163 -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
@@ -167,7 +165,7 @@ install-libs: $(LIBS)
167 -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi 165 -@if [ ! -d $(DESTDIR)$(man3dir) ]; then mkdir -p $(DESTDIR)$(man3dir); fi
168 -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi 166 -@if [ ! -d $(DESTDIR)$(pkgconfigdir) ]; then mkdir -p $(DESTDIR)$(pkgconfigdir); fi
169 cp $(LIBS) $(DESTDIR)$(libdir) 167 cp $(LIBS) $(DESTDIR)$(libdir)
170 cd $(DESTDIR)$(libdir); chmod 755 $(LIBS) 168 cd $(DESTDIR)$(libdir); chmod 755 $(SHAREDLIB) ; chmod u=rw,go=r $(STATICLIB)
171 -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1 169 -@(cd $(DESTDIR)$(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
172 cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \ 170 cd $(DESTDIR)$(libdir); if test -f $(SHAREDLIBV); then \
173 rm -f $(SHAREDLIB) $(SHAREDLIBM); \ 171 rm -f $(SHAREDLIB) $(SHAREDLIBM); \
@@ -184,11 +182,11 @@ install-libs: $(LIBS)
184 182
185install: install-libs 183install: install-libs
186 -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi 184 -@if [ ! -d $(DESTDIR)$(includedir) ]; then mkdir -p $(DESTDIR)$(includedir); fi
187 cp zlib.h zconf.h zlibdefs.h $(DESTDIR)$(includedir) 185 cp zlib.h zconf.h $(DESTDIR)$(includedir)
188 chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h $(DESTDIR)$(includedir)/zlibdefs.h 186 chmod 644 $(DESTDIR)$(includedir)/zlib.h $(DESTDIR)$(includedir)/zconf.h
189 187
190uninstall: 188uninstall:
191 cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h zlibdefs.h 189 cd $(DESTDIR)$(includedir); rm -f zlib.h zconf.h
192 cd $(DESTDIR)$(libdir); rm -f libz.a; \ 190 cd $(DESTDIR)$(libdir); rm -f libz.a; \
193 if test -f $(SHAREDLIBV); then \ 191 if test -f $(SHAREDLIBV); then \
194 rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \ 192 rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
@@ -198,19 +196,18 @@ uninstall:
198 196
199mostlyclean: clean 197mostlyclean: clean
200clean: 198clean:
201 rm -f *.o *.lo *~ \ 199 rm -f $(objdir)* $(picdir)* *~ \
202 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \ 200 example$(EXE) minigzip$(EXE) examplesh$(EXE) minigzipsh$(EXE) \
203 example64$(EXE) minigzip64$(EXE) \ 201 example64$(EXE) minigzip64$(EXE) \
204 libz.* foo.gz so_locations \ 202 libz.* foo.gz so_locations \
205 _match.s maketree contrib/infback9/*.o 203 _match.s maketree contrib/infback9/*.o
206 rm -rf objs
207 204
208maintainer-clean: distclean 205maintainer-clean: distclean
209distclean: clean 206distclean: clean
210 cp -p Makefile.in Makefile 207 cp -p zconf.in.h zconf.h
211 rm zlibdefs.h
212 touch -r configure zlibdefs.h
213 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
210 -@ touch -r Makefile.in Makefile objs pics
214 211
215tags: 212tags:
216 etags *.[ch] 213 etags *.[ch]
@@ -220,22 +217,12 @@ depend:
220 217
221# DO NOT DELETE THIS LINE -- make depend depends on it. 218# DO NOT DELETE THIS LINE -- make depend depends on it.
222 219
223adler32.o gzio.o zutil.o: zutil.h zlib.h zconf.h zlibdefs.h 220adler32.o gzio.o zutil.o: zutil.h zlib.h zconf.h
224gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h zlibdefs.h gzguts.h 221gzclose.o gzlib.o gzread.o gzwrite.o: zlib.h zconf.h gzguts.h
225compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h zlibdefs.h 222compress.o example.o minigzip.o uncompr.o: zlib.h zconf.h
226crc32.o: zutil.h zlib.h zconf.h zlibdefs.h crc32.h 223crc32.o: zutil.h zlib.h zconf.h crc32.h
227deflate.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h 224deflate.o: deflate.h zutil.h zlib.h zconf.h
228infback.o inflate.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h 225infback.o inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h inffixed.h
229inffast.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h 226inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
230inftrees.o: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h 227inftrees.o: zutil.h zlib.h zconf.h inftrees.h
231trees.o: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h 228trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
232
233adler32.lo gzio.lo zutil.lo: zutil.h zlib.h zconf.h zlibdefs.h
234gzclose.lo gzlib.lo gzread.lo gzwrite.lo: zlib.h zconf.h zlibdefs.h gzguts.h
235compress.lo example.lo minigzip.lo uncompr.lo: zlib.h zconf.h zlibdefs.h
236crc32.lo: zutil.h zlib.h zconf.h zlibdefs.h crc32.h
237deflate.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h
238infback.lo inflate.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h inffixed.h
239inffast.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h inflate.h inffast.h
240inftrees.lo: zutil.h zlib.h zconf.h zlibdefs.h inftrees.h
241trees.lo: deflate.h zutil.h zlib.h zconf.h zlibdefs.h trees.h