xref: /freebsd/lib/libz/Makefile (revision 1e413cf93298b5b97441a21d9a50fdcd0ee9945e)
1#
2# $FreeBSD$
3#
4
5LIB=		z
6SHLIBDIR?=	/lib
7MAN=		zlib.3
8
9#CFLAGS+=	-DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
10#CFLAGS+=	-g -DDEBUG
11#CFLAGS+=	-Wall -Wwrite-strings -Wpointer-arith -Wconversion \
12#		-Wstrict-prototypes -Wmissing-prototypes
13
14CFLAGS+=	-DHAS_snprintf -DHAS_vsnprintf
15
16CLEANFILES+=	example.o example foo.gz minigzip.o minigzip
17
18SRCS = adler32.c compress.c crc32.c gzio.c uncompr.c deflate.c trees.c \
19       zutil.c inflate.c inftrees.c inffast.c zopen.c infback.c
20INCS=		zconf.h zlib.h
21
22minigzip:	all minigzip.o
23	$(CC) -o minigzip minigzip.o -L. -lz
24
25example:	all example.o
26	$(CC) -o example example.o -L. -lz
27
28test: example minigzip
29	(export LD_LIBRARY_PATH=. ; ./example )
30	(export LD_LIBRARY_PATH=. ; \
31		echo hello world | ./minigzip | ./minigzip -d )
32
33.include <bsd.lib.mk>
34