~ubuntu-branches/ubuntu/wily/dopewars/wily

« back to all changes in this revision

Viewing changes to win32/zlib/Makefile.nocygwin

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2006-01-19 00:30:22 UTC
  • mfrom: (3.1.3 dapper)
  • Revision ID: james.westby@ubuntu.com-20060119003022-ouj13ca9jdqeb2ok
Tags: 1.5.12-2
* Set the default web browser to sensible-browser
* Remove the misc:depends dependencies

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
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 
 
2
# Copyright (C) 1995-2003 Jean-loup Gailly.
 
3
# For conditions of distribution and use, see copyright notice in zlib.h
4
4
 
5
5
# To compile and test, type:
6
 
#   ./configure; make test
 
6
#    ./configure; make test
7
7
# The call of configure is optional if you don't have special requirements
8
8
# If you wish to build zlib as a shared library, use: ./configure -s
9
9
 
 
10
# To use the asm code, type:
 
11
#    cp contrib/asm?86/match.S ./match.S
 
12
#    make LOC=-DASMV OBJA=match.o
 
13
 
10
14
# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
11
15
#    make install
12
16
# To install in $HOME instead of /usr/local, use:
13
17
#    make install prefix=$HOME
14
18
 
15
 
CC=gcc -mno-cygwin
 
19
CC=cc -mno-cygwin
16
20
 
17
21
CFLAGS=-O
18
22
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
20
24
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
21
25
#           -Wstrict-prototypes -Wmissing-prototypes
22
26
 
23
 
LDFLAGS=-L. -lz
 
27
LDFLAGS=libz.a
24
28
LDSHARED=$(CC)
25
29
CPP=$(CC) -E
26
30
 
27
 
VER=1.1.3
28
31
LIBS=libz.a
29
32
SHAREDLIB=libz.so
 
33
SHAREDLIBV=libz.so.1.2.1
 
34
SHAREDLIBM=libz.so.1
30
35
 
31
36
AR=ar rc
32
37
RANLIB=ranlib
33
38
TAR=tar
34
39
SHELL=/bin/sh
 
40
EXE=
35
41
 
36
42
prefix = /usr/local
37
43
exec_prefix = ${prefix}
38
44
libdir = ${exec_prefix}/lib
39
45
includedir = ${prefix}/include
 
46
mandir = ${prefix}/share/man
 
47
man3dir = ${mandir}/man3
40
48
 
41
49
OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
42
 
       zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
 
50
       zutil.o inflate.o infback.o inftrees.o inffast.o
43
51
 
44
52
OBJA =
45
53
# to use the asm code: make OBJA=match.o
46
54
 
47
 
DISTFILES = README FAQ INDEX ChangeLog configure Make*[a-z0-9] *.[ch] *.mms \
48
 
  algorithm.txt zlib.3 msdos/Make*[a-z0-9] msdos/zlib.def msdos/zlib.rc \
49
 
  nt/Make*[a-z0-9] nt/zlib.dnt amiga/Make*.??? os2/M*.os2 os2/zlib.def \
50
 
  contrib/RE*.contrib contrib/*.txt contrib/asm386/*.asm contrib/asm386/*.c \
51
 
  contrib/asm386/*.bat contrib/asm386/zlibvc.d?? contrib/asm[56]86/*.?86 \
52
 
  contrib/asm[56]86/*.S contrib/iostream/*.cpp \
53
 
  contrib/iostream/*.h  contrib/iostream2/*.h contrib/iostream2/*.cpp \
54
 
  contrib/untgz/Makefile contrib/untgz/*.c contrib/untgz/*.w32 \
55
 
  contrib/minizip/[CM]*[pe] contrib/minizip/*.[ch] contrib/minizip/*.[td]?? \
56
 
  contrib/delphi*/*.???
57
 
 
58
 
all: libz.a
 
55
TEST_OBJS = example.o minigzip.o
 
56
 
 
57
all: example$(EXE) minigzip$(EXE)
 
58
 
 
59
check: test
 
60
test: all
 
61
        @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
 
62
        echo hello world | ./minigzip | ./minigzip -d || \
 
63
          echo '                *** minigzip test FAILED ***' ; \
 
64
        if ./example; then \
 
65
          echo '                *** zlib test OK ***'; \
 
66
        else \
 
67
          echo '                *** zlib test FAILED ***'; \
 
68
        fi
59
69
 
60
70
libz.a: $(OBJS) $(OBJA)
61
71
        $(AR) $@ $(OBJS) $(OBJA)
67
77
        mv _match.o match.o
68
78
        rm -f _match.s
69
79
 
70
 
$(SHAREDLIB).$(VER): $(OBJS)
 
80
$(SHAREDLIBV): $(OBJS)
71
81
        $(LDSHARED) -o $@ $(OBJS)
72
 
        rm -f $(SHAREDLIB) $(SHAREDLIB).1
 
82
        rm -f $(SHAREDLIB) $(SHAREDLIBM)
73
83
        ln -s $@ $(SHAREDLIB)
74
 
        ln -s $@ $(SHAREDLIB).1
 
84
        ln -s $@ $(SHAREDLIBM)
 
85
 
 
86
example$(EXE): example.o $(LIBS)
 
87
        $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
 
88
 
 
89
minigzip$(EXE): minigzip.o $(LIBS)
 
90
        $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
75
91
 
76
92
install: $(LIBS)
77
 
        -@if [ ! -d $(includedir)  ]; then mkdir $(includedir); fi
78
 
        -@if [ ! -d $(libdir) ]; then mkdir $(libdir); fi
 
93
        -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
 
94
        -@if [ ! -d $(includedir)  ]; then mkdir -p $(includedir); fi
 
95
        -@if [ ! -d $(libdir)      ]; then mkdir -p $(libdir); fi
 
96
        -@if [ ! -d $(man3dir)     ]; then mkdir -p $(man3dir); fi
79
97
        cp zlib.h zconf.h $(includedir)
80
98
        chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
81
99
        cp $(LIBS) $(libdir)
82
100
        cd $(libdir); chmod 755 $(LIBS)
83
101
        -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
84
 
        cd $(libdir); if test -f $(SHAREDLIB).$(VER); then \
85
 
          rm -f $(SHAREDLIB) $(SHAREDLIB).1; \
86
 
          ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB); \
87
 
          ln -s $(SHAREDLIB).$(VER) $(SHAREDLIB).1; \
 
102
        cd $(libdir); if test -f $(SHAREDLIBV); then \
 
103
          rm -f $(SHAREDLIB) $(SHAREDLIBM); \
 
104
          ln -s $(SHAREDLIBV) $(SHAREDLIB); \
 
105
          ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
88
106
          (ldconfig || true)  >/dev/null 2>&1; \
89
107
        fi
 
108
        cp zlib.3 $(man3dir)
 
109
        chmod 644 $(man3dir)/zlib.3
90
110
# The ranlib in install is needed on NeXTSTEP which checks file times
91
111
# ldconfig is for Linux
92
112
 
93
113
uninstall:
94
114
        cd $(includedir); \
95
 
        v=$(VER); \
96
 
        if test -f zlib.h; then \
97
 
          v=`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`; \
98
 
          rm -f zlib.h zconf.h; \
99
 
        fi; \
100
115
        cd $(libdir); rm -f libz.a; \
101
 
        if test -f $(SHAREDLIB).$$v; then \
102
 
          rm -f $(SHAREDLIB).$$v $(SHAREDLIB) $(SHAREDLIB).1; \
 
116
        if test -f $(SHAREDLIBV); then \
 
117
          rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
103
118
        fi
 
119
        cd $(man3dir); rm -f zlib.3
104
120
 
 
121
mostlyclean: clean
105
122
clean:
106
 
        rm -f *.o *~ libz.a libz.so* foo.gz so_locations \
107
 
           _match.s maketree
108
 
 
109
 
distclean:      clean
110
 
 
111
 
zip:
112
 
        mv Makefile Makefile~; cp -p Makefile.in Makefile
113
 
        rm -f test.c ztest*.c contrib/minizip/test.zip
114
 
        v=`sed -n -e 's/\.//g' -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
115
 
        zip -ul9 zlib$$v $(DISTFILES)
116
 
        mv Makefile~ Makefile
117
 
 
118
 
dist:
119
 
        mv Makefile Makefile~; cp -p Makefile.in Makefile
120
 
        rm -f test.c ztest*.c contrib/minizip/test.zip
121
 
        d=zlib-`sed -n '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`;\
122
 
        rm -f $$d.tar.gz; \
123
 
        if test ! -d ../$$d; then rm -f ../$$d; ln -s `pwd` ../$$d; fi; \
124
 
        files=""; \
125
 
        for f in $(DISTFILES); do files="$$files $$d/$$f"; done; \
126
 
        cd ..; \
127
 
        GZIP=-9 $(TAR) chofz $$d/$$d.tar.gz $$files; \
128
 
        if test ! -d $$d; then rm -f $$d; fi
129
 
        mv Makefile~ Makefile
130
 
 
131
 
tags:   
 
123
        rm -f *.o *~ example$(EXE) minigzip$(EXE) \
 
124
           libz.* foo.gz so_locations \
 
125
           _match.s maketree contrib/infback9/*.o
 
126
 
 
127
maintainer-clean: distclean
 
128
distclean: clean
 
129
        cp -p Makefile.in Makefile
 
130
        cp -p zconf.in.h zconf.h
 
131
        rm -f .DS_Store
 
132
 
 
133
tags:
132
134
        etags *.[ch]
133
135
 
134
136
depend:
138
140
 
139
141
adler32.o: zlib.h zconf.h
140
142
compress.o: zlib.h zconf.h
141
 
crc32.o: zlib.h zconf.h
 
143
crc32.o: crc32.h zlib.h zconf.h
142
144
deflate.o: deflate.h zutil.h zlib.h zconf.h
 
145
example.o: zlib.h zconf.h
143
146
gzio.o: zutil.h zlib.h zconf.h
144
 
infblock.o: infblock.h inftrees.h infcodes.h infutil.h zutil.h zlib.h zconf.h
145
 
infcodes.o: zutil.h zlib.h zconf.h
146
 
infcodes.o: inftrees.h infblock.h infcodes.h infutil.h inffast.h
147
 
inffast.o: zutil.h zlib.h zconf.h inftrees.h
148
 
inffast.o: infblock.h infcodes.h infutil.h inffast.h
149
 
inflate.o: zutil.h zlib.h zconf.h infblock.h
 
147
inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
 
148
inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
 
149
infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
150
150
inftrees.o: zutil.h zlib.h zconf.h inftrees.h
151
 
infutil.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
152
 
minigzip.o:  zlib.h zconf.h 
 
151
minigzip.o: zlib.h zconf.h
153
152
trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
154
153
uncompr.o: zlib.h zconf.h
155
 
zutil.o: zutil.h zlib.h zconf.h  
 
154
zutil.o: zutil.h zlib.h zconf.h