annotate zlib/Makefile @ 3:5a977ccbc7a9 default tip

Empty changelog
author darius
date Sat, 06 Dec 1997 05:41:29 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
1 # Makefile for zlib
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
2 # Copyright (C) 1995 Jean-loup Gailly.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
3 # For conditions of distribution and use, see copyright notice in zlib.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
4
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
5 CC=cc
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
6 CFLAGS=-O
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
7 #use -O3 for gcc to take advantage of inlining
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
8 #CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
9 #CFLAGS=-g -DDEBUG
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
10 LDFLAGS=-L. -lgz
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
11
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
12 RANLIB=ranlib
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
13
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
14 prefix=/usr/local
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
15
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
16 OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
17 zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o inffast.o
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
18
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
19 TEST_OBJS = example.o minigzip.o
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
20
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
21 all: example minigzip
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
22
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
23 test: all
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
24 ./example
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
25 echo hello world | ./minigzip | ./minigzip -d
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
26
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
27 install: libgz.a
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
28 -@mkdir $(prefix)/include
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
29 -@mkdir $(prefix)/lib
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
30 cp zlib.h zconf.h $(prefix)/include
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
31 chmod 644 $(prefix)/include/zlib.h $(prefix)/include/zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
32 cp libgz.a $(prefix)/lib
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
33 chmod 644 $(prefix)/lib/libgz.a
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
34
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
35 libgz.a: $(OBJS)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
36 ar rc $@ $(OBJS)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
37 $(RANLIB) $@
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
38
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
39 example: example.o libgz.a
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
40 $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
41
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
42 minigzip: minigzip.o libgz.a
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
43 $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
44
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
45 clean:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
46 rm -f *.o example minigzip libgz.a foo.gz
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
47
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
48 zip:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
49 zip -ul9 zlib README ChangeLog Makefile Makefile.??? Makefile.?? *.[ch]
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
50
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
51 tgz:
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
52 cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
53 zlib/Makefile.??? zlib/Makefile.?? zlib/*.[ch]
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
54
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
55 # DO NOT DELETE THIS LINE -- make depend depends on it.
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
56
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
57 adler32.o: zutil.h zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
58 compress.o: zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
59 crc32.o: zutil.h zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
60 deflate.o: deflate.h zutil.h zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
61 example.o: zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
62 gzio.o: zutil.h zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
63 infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
64 infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h inffast.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
65 inffast.o: zutil.h zlib.h zconf.h inftrees.h infutil.h inffast.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
66 inflate.o: zutil.h zlib.h zconf.h infblock.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
67 inftrees.o: zutil.h zlib.h zconf.h inftrees.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
68 infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
69 minigzip.o: zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
70 trees.o: deflate.h zutil.h zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
71 uncompr.o: zlib.h zconf.h
5a977ccbc7a9 Empty changelog
darius
parents:
diff changeset
72 zutil.o: zutil.h zlib.h zconf.h