Makefile revision 205471
117653Speter#
250476Speter# $FreeBSD: head/lib/libz/Makefile 205471 2010-03-22 21:11:55Z delphij $
317653Speter#
417653Speter
517653SpeterLIB=		z
6119017SgordonSHLIBDIR?=	/lib
7205471SdelphijSHLIB_MAJOR=	6
874870SruMAN=		zlib.3
917653Speter
10205471Sdelphij#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
11205471Sdelphij#CFLAGS=-g -DDEBUG
12205471Sdelphij#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
13205471Sdelphij#           -Wstrict-prototypes -Wmissing-prototypes
1417653Speter
15205471SdelphijCFLAGS+=	-DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR}
1669653Sjedgar
17201381SedWARNS?=		3
18201381Sed
1933912SsteveCLEANFILES+=	example.o example foo.gz minigzip.o minigzip
2017653Speter
21205471SdelphijSRCS+=		adler32.c
22205471SdelphijSRCS+=		compress.c
23205471SdelphijSRCS+=		crc32.c
24205471SdelphijSRCS+=		deflate.c
25205471SdelphijSRCS+=		gzclose.c
26205471SdelphijSRCS+=		gzlib.c
27205471SdelphijSRCS+=		gzread.c
28205471SdelphijSRCS+=		gzwrite.c
29205471SdelphijSRCS+=		infback.c
30205471SdelphijSRCS+=		inffast.c
31205471SdelphijSRCS+=		inflate.c
32205471SdelphijSRCS+=		inftrees.c
33205471SdelphijSRCS+=		trees.c
34205471SdelphijSRCS+=		uncompr.c
35205471SdelphijSRCS+=		zopen.c
36205471SdelphijSRCS+=		zutil.c
37205471Sdelphij
38205471Sdelphij.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
39205471Sdelphij.PATH:		${.CURDIR}/contrib/asm686
40205471SdelphijSRCS+=		match.S
41205471SdelphijCFLAGS+=	-DASMV -DNO_UNDERLINE
42205471Sdelphij.endif
43205471Sdelphij
44205471Sdelphij.if ${MACHINE_ARCH} == "amd64"
45205471Sdelphij.PATH:		${.CURDIR}/contrib/gcc_gvmat64
46205471SdelphijSRCS+=		gvmat64.S
47205471SdelphijCFLAGS+=	-DASMV -DNO_UNDERLINE
48205471Sdelphij.endif
49205471Sdelphij
50205471SdelphijVERSION_DEF=	${.CURDIR}/Versions.def
51205471SdelphijSYMBOL_MAPS=	${.CURDIR}/Symbol.map
52205471SdelphijCFLAGS+=	-DSYMBOL_VERSIONING
53205471Sdelphij
5455955SrgrimesINCS=		zconf.h zlib.h
5517653Speter
5617653Speterminigzip:	all minigzip.o
5717653Speter	$(CC) -o minigzip minigzip.o -L. -lz
5817653Speter
5917653Speterexample:	all example.o
6017653Speter	$(CC) -o example example.o -L. -lz
6117653Speter
6217653Spetertest: example minigzip
6317653Speter	(export LD_LIBRARY_PATH=. ; ./example )
6417653Speter	(export LD_LIBRARY_PATH=. ; \
6517653Speter		echo hello world | ./minigzip | ./minigzip -d )
6617653Speter
6717653Speter.include <bsd.lib.mk>
68