diff options
Diffstat (limited to 'Makefile.in')
-rw-r--r-- | Makefile.in | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..3b41059 --- /dev/null +++ b/Makefile.in | |||
@@ -0,0 +1,129 @@ | |||
1 | # Makefile for zlib | ||
2 | # Copyright (C) 1995-1996 Jean-loup Gailly. | ||
3 | # For conditions of distribution and use, see copyright notice in zlib.h | ||
4 | |||
5 | # To compile and test, type: | ||
6 | # ./configure; make test | ||
7 | # The call of configure is optional if you don't have special requirements | ||
8 | |||
9 | # To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type: | ||
10 | # make install | ||
11 | # To install in $HOME instead of /usr/local, use: | ||
12 | # make install prefix=$HOME | ||
13 | |||
14 | CC=cc | ||
15 | |||
16 | CFLAGS=-O | ||
17 | #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 | ||
18 | #CFLAGS=-g -DDEBUG | ||
19 | #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ | ||
20 | # -Wstrict-prototypes -Wmissing-prototypes | ||
21 | |||
22 | LDFLAGS=-L. -lz | ||
23 | LDSHARED=$(CC) | ||
24 | |||
25 | VER=1.0.1 | ||
26 | LIBS=libz.a | ||
27 | |||
28 | AR=ar rc | ||
29 | RANLIB=ranlib | ||
30 | TAR=tar | ||
31 | |||
32 | prefix=/usr/local | ||
33 | exec_prefix = $(prefix) | ||
34 | |||
35 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
36 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o | ||
37 | |||
38 | TEST_OBJS = example.o minigzip.o | ||
39 | |||
40 | DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] descrip.mms *.[ch] | ||
41 | |||
42 | all: example minigzip | ||
43 | |||
44 | test: all | ||
45 | ./example | ||
46 | echo hello world | ./minigzip | ./minigzip -d | ||
47 | |||
48 | libz.a: $(OBJS) | ||
49 | $(AR) $@ $(OBJS) | ||
50 | -@ ($(RANLIB) $@ || true) 2>/dev/null | ||
51 | |||
52 | libz.so.$(VER): $(OBJS) | ||
53 | $(LDSHARED) -o $@ $(OBJS) | ||
54 | rm -f libz.so; ln -s $@ libz.so | ||
55 | |||
56 | example: example.o $(LIBS) | ||
57 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
58 | |||
59 | minigzip: minigzip.o $(LIBS) | ||
60 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
61 | |||
62 | install: $(LIBS) | ||
63 | -@if [ ! $(prefix)/include ]; then mkdir $(prefix)/include; fi | ||
64 | -@if [ ! $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi | ||
65 | cp zlib.h zconf.h $(prefix)/include | ||
66 | chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h | ||
67 | cp $(LIBS) $(exec_prefix)/lib | ||
68 | cd $(exec_prefix)/lib; chmod 644 $(LIBS) | ||
69 | -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1 | ||
70 | cd $(exec_prefix)/lib; if test -f libz.so.$(VER); then \ | ||
71 | ln -s libz.so.$(VER) libz.so; \ | ||
72 | fi | ||
73 | # The ranlib in install is needed on NeXTSTEP which checks file times | ||
74 | |||
75 | uninstall: | ||
76 | cd $(exec_prefix)/lib; rm -f $(LIBS); \ | ||
77 | if test -f libz.so; then \ | ||
78 | v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p'<$(prefix)/include/zlib.h`;\ | ||
79 | rm -f libz.so.$$v libz.so; \ | ||
80 | fi | ||
81 | cd $(prefix)/include; rm -f zlib.h zconf.h | ||
82 | |||
83 | clean: | ||
84 | rm -f *.o *~ example minigzip libz.a libz.so* foo.gz | ||
85 | |||
86 | zip: | ||
87 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
88 | v=`sed -n -e 's/\./-/g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
89 | zip -ul9 zlib-$$v $(DISTFILES) | ||
90 | mv Makefile~ Makefile | ||
91 | |||
92 | dist: | ||
93 | mv Makefile Makefile~; cp -p Makefile.in Makefile | ||
94 | d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\ | ||
95 | rm -f $$d.tar.gz; \ | ||
96 | if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \ | ||
97 | files=""; \ | ||
98 | for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \ | ||
99 | cd ..; \ | ||
100 | GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \ | ||
101 | if test ! -d $$d; then rm -f $$d; fi | ||
102 | mv Makefile~ Makefile | ||
103 | |||
104 | tags: | ||
105 | etags *.[ch] | ||
106 | |||
107 | depend: | ||
108 | makedepend -- $(CFLAGS) -- *.[ch] | ||
109 | |||
110 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
111 | |||
112 | adler32.o: zlib.h zconf.h | ||
113 | compress.o: zlib.h zconf.h | ||
114 | crc32.o: zlib.h zconf.h | ||
115 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
116 | example.o: zlib.h zconf.h | ||
117 | gzio.o: zutil.h zlib.h zconf.h | ||
118 | infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h | ||
119 | infcodes.o: zutil.h zlib.h zconf.h | ||
120 | infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h | ||
121 | inffast.o: zutil.h zlib.h zconf.h inftrees.h | ||
122 | inffast.o: infblock.h infcodes.h infutil.h inffast.h | ||
123 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
124 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
125 | infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
126 | minigzip.o: zlib.h zconf.h | ||
127 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
128 | uncompr.o: zlib.h zconf.h | ||
129 | zutil.o: zutil.h zlib.h zconf.h | ||