]> git.saurik.com Git - wxWidgets.git/blame - src/zlib/Makefile.in2
Added wxToggleBitmapButton (it compiles).
[wxWidgets.git] / src / zlib / Makefile.in2
CommitLineData
c801d85f
KB
1# Makefile for zlib
2# Copyright (C) 1995-1998 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# If you wish to build zlib as a shared library, use: ./configure -s
9
10# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
11# make install
12# To install in $HOME instead of /usr/local, use:
13# make install prefix=$HOME
14
15CC=cc
16
17CFLAGS=-O
18#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
19#CFLAGS=-g -DDEBUG
20#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
21# -Wstrict-prototypes -Wmissing-prototypes
22
23LDFLAGS=-L. -lz
24LDSHARED=$(CC)
25
26VER=1.1.2
27LIBS=libz.a
28SHAREDLIB=libz.so
29
30AR=ar rc
31RANLIB=ranlib
32TAR=tar
33SHELL=/bin/sh
34
35prefix = /usr/local
36exec_prefix = ${prefix}
37
38OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
39 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
40
41TEST_OBJS = example.o minigzip.o
42
43DISTFILES = README INDEX ChangeLog configure Make*[a-z0-9] *.[ch] descrip.mms \
44 algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
45 nt/Makefile.nt nt/zlib.dnt amiga/Make*.??? contrib/README.contrib \
46 contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \
47 contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/iostream/*.cpp \
48 contrib/iostream/*.h contrib/iostream2/*.h contrib/iostream2/*.cpp \
49 contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \
50 contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]??
51
52
53all: example minigzip
54
55test: all
56 @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
57 echo hello world | ./minigzip | ./minigzip -d || \
58 echo ' *** minigzip test FAILED ***' ; \
59 if ./example; then \
60 echo ' *** zlib test OK ***'; \
61 else \
62 echo ' *** zlib test FAILED ***'; \
63 fi
64
65libz.a: $(OBJS)
66 $(AR) $@ $(OBJS)
67 -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
68
69$(SHAREDLIB).$(VER): $(OBJS)
70 $(LDSHARED) -o $@ $(OBJS)
71 rm -f $(SHAREDLIB) $(SHAREDLIB).1
72 ln -s $@ $(SHAREDLIB)
73 ln -s $@ $(SHAREDLIB).1
74
75example: example.o $(LIBS)
76 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
77
78minigzip: minigzip.o $(LIBS)
79 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
80
81install: $(LIBS)
82 -@if [ ! -d $(prefix)/include ]; then mkdir $(prefix)/include; fi
83 -@if [ ! -d $(exec_prefix)/lib ]; then mkdir $(exec_prefix)/lib; fi
84 cp zlib.h zconf.h $(prefix)/include
85 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
86 cp $(LIBS) $(exec_prefix)/lib
87 cd $(exec_prefix)/lib; chmod 755 $(LIBS)
88 -@(cd $(exec_prefix)/lib; $(RANLIB) libz.a || true) >/dev/null 2>&1
89 cd $(exec_prefix)/lib; if test -f $(SHAREDLIB).$(VER); then \
90 rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
91 ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
92 ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
93 (ldconfig || true) >/dev/null 2>&1; \
94 fi
95# The ranlib in install is needed on NeXTSTEP which checks file times
96# ldconfig is for Linux
97
98uninstall:
99 cd $(prefix)/include; \
100 v=$(VER); \
101 if test -f zlib.h; then \
102 v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \
103 rm -f zlib.h zconf.h; \
104 fi; \
105 cd $(exec_prefix)/lib; rm -f libz.a; \
106 if test -f $(SHAREDLIB).$$v; then \
107 rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \
108 fi
109
110clean:
111 rm -f *.o *~ example minigzip libz.a libz.so* foo.gz
112
113distclean: clean
114
115zip:
116 mv Makefile Makefile~; cp -p Makefile.in Makefile
117 rm -f test.c ztest*.c contrib/minizip/test.zip
118 v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
119 zip -ul9 zlib$$v $(DISTFILES)
120 mv Makefile~ Makefile
121
122dist:
123 mv Makefile Makefile~; cp -p Makefile.in Makefile
124 rm -f test.c ztest*.c contrib/minizip/test.zip
125 d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
126 rm -f $$d.tar.gz; \
127 if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
128 files=""; \
129 for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
130 cd ..; \
131 GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
132 if test ! -d $$d; then rm -f $$d; fi
133 mv Makefile~ Makefile
134
135tags:
136 etags *.[ch]
137
138depend:
139 makedepend -- $(CFLAGS) -- *.[ch]
140
141# DO NOT DELETE THIS LINE -- make depend depends on it.
142
143adler32.o: zlib.h zconf.h
144compress.o: zlib.h zconf.h
145crc32.o: zlib.h zconf.h
146deflate.o: deflate.h zutil.h zlib.h zconf.h
147example.o: zlib.h zconf.h
148gzio.o: zutil.h zlib.h zconf.h
149infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
150infcodes.o: zutil.h zlib.h zconf.h
151infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
152inffast.o: zutil.h zlib.h zconf.h inftrees.h
153inffast.o: infblock.h infcodes.h infutil.h inffast.h
154inflate.o: zutil.h zlib.h zconf.h infblock.h
155inftrees.o: zutil.h zlib.h zconf.h inftrees.h
156infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
157minigzip.o: zlib.h zconf.h
158trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
159uncompr.o: zlib.h zconf.h
160zutil.o: zutil.h zlib.h zconf.h