diff options
| author | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 22:36:31 -0700 |
|---|---|---|
| committer | Mark Adler <madler@alumni.caltech.edu> | 2011-09-09 22:36:31 -0700 |
| commit | bcf78a20978d76f64b7cd46d1a4d7a79a578c77b (patch) | |
| tree | 1929db4ad12c15efc15ac123264a8a9046903a7a /Makefile | |
| download | zlib-0.71.tar.gz zlib-0.71.tar.bz2 zlib-0.71.zip | |
zlib 0.71v0.71
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..478920a --- /dev/null +++ b/Makefile | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | CC=cc | ||
| 2 | CFLAGS=-O | ||
| 3 | #CFLAGS=-g -DDEBUG | ||
| 4 | LDFLAGS=-L. -lgz | ||
| 5 | |||
| 6 | RANLIB=ranlib | ||
| 7 | |||
| 8 | OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \ | ||
| 9 | zutil.o inflate.o infblock.o inftrees.o infcodes.o infutil.o | ||
| 10 | |||
| 11 | TEST_OBJS = example.o minigzip.o inftest.o | ||
| 12 | |||
| 13 | all: example minigzip inftest | ||
| 14 | |||
| 15 | test: all | ||
| 16 | ./example | ||
| 17 | echo hello world | ./minigzip | ./minigzip -d | ||
| 18 | |||
| 19 | libgz.a: $(OBJS) | ||
| 20 | ar rc $@ $(OBJS) | ||
| 21 | $(RANLIB) $@ | ||
| 22 | |||
| 23 | example: example.o libgz.a | ||
| 24 | $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) | ||
| 25 | |||
| 26 | minigzip: minigzip.o libgz.a | ||
| 27 | $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) | ||
| 28 | |||
| 29 | inftest: inftest.o libgz.a | ||
| 30 | $(CC) $(CFLAGS) -o $@ inftest.o $(LDFLAGS) | ||
| 31 | |||
| 32 | clean: | ||
| 33 | rm -f *.o example minigzip inftest libgz.a foo.gz | ||
| 34 | |||
| 35 | zip: | ||
| 36 | zip -ul9 zlib README ChangeLog Makefile *.[ch] | ||
| 37 | |||
| 38 | tgz: | ||
| 39 | cd ..; tar cfz zlib/zlib.tgz zlib/README zlib/ChangeLog zlib/Makefile \ | ||
| 40 | zlib/*.[ch] | ||
| 41 | |||
| 42 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 43 | |||
| 44 | adler32.o: zutil.h zlib.h zconf.h | ||
| 45 | compress.o: zlib.h zconf.h | ||
| 46 | crc32.o: zutil.h zlib.h zconf.h | ||
| 47 | deflate.o: deflate.h zutil.h zlib.h zconf.h | ||
| 48 | example.o: zlib.h zconf.h | ||
| 49 | gzio.o: zutil.h zlib.h zconf.h | ||
| 50 | infblock.o: zutil.h zlib.h zconf.h infblock.h inftrees.h infcodes.h infutil.h | ||
| 51 | infcodes.o: zutil.h zlib.h zconf.h inftrees.h infutil.h infcodes.h | ||
| 52 | inflate.o: zutil.h zlib.h zconf.h infblock.h | ||
| 53 | inftest.o: zutil.h zlib.h zconf.h | ||
| 54 | inftrees.o: zutil.h zlib.h zconf.h inftrees.h | ||
| 55 | infutil.o: zutil.h zlib.h zconf.h inftrees.h infutil.h | ||
| 56 | minigzip.o: zlib.h zconf.h | ||
| 57 | trees.o: deflate.h zutil.h zlib.h zconf.h | ||
| 58 | uncompr.o: zlib.h zconf.h | ||
| 59 | zutil.o: zutil.h zlib.h zconf.h | ||
