xref: /dragonfly/lib/libz/Makefile (revision 8dbfb057)
1#
2# $FreeBSD: src/lib/libz/Makefile,v 1.11.2.4 2003/02/01 13:33:12 sobomax Exp $
3# $DragonFly: src/lib/libz/Makefile,v 1.6 2004/12/06 11:29:51 joerg Exp $
4#
5
6LIB=		z
7MAN=		zlib.3
8WARNS?=		3
9
10PATCHES!=	echo ${.CURDIR}/patches/*.patch
11CONTRIBDIR=	${.CURDIR}/../../contrib/zlib-1.2.2
12
13.PATH: ${CONTRIBDIR}
14
15#CFLAGS+=	-DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
16#CFLAGS+=	-g -DDEBUG
17#CFLAGS+=	-Wall -Wwrite-strings -Wpointer-arith -Wconversion \
18#		-Wstrict-prototypes -Wmissing-prototypes
19
20CLEANFILES+=	example.o example foo.gz minigzip.o minigzip
21
22SRCS=	adler32.c compress.c crc32.c deflate.c gzio.c infback.c
23SRCS+=	inffast.c inflate.c inftrees.c trees.c uncompr.c zopen.c zutil.c
24SRCS+=	${PATCHES}
25
26INCS=		zconf.h zlib.h
27
28minigzip:	all minigzip.o
29	$(CC) -o minigzip minigzip.o -L. -lz
30
31example:	all example.o
32	$(CC) -o example example.o -L. -lz
33
34test: example minigzip
35	(export LD_LIBRARY_PATH=. ; ./example )
36	(export LD_LIBRARY_PATH=. ; \
37		echo hello world | ./minigzip | ./minigzip -d )
38
39.include <bsd.lib.mk>
40