]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - lib/libz/Makefile
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / lib / libz / Makefile
1 #
2 # $FreeBSD$
3 #
4
5 LIB=            z
6 SHLIBDIR?=      /lib
7 MAN=            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
14 CFLAGS+=        -DHAS_snprintf -DHAS_vsnprintf
15
16 CLEANFILES+=    example.o example foo.gz minigzip.o minigzip
17
18 SRCS = 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
20 INCS=           zconf.h zlib.h
21
22 .if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
23 .PATH:          ${.CURDIR}/contrib/asm686
24 SRCS+=          match.S
25 CFLAGS+=        -DASMV -DNO_UNDERLINE
26 .endif
27
28 .if ${MACHINE_ARCH} == "amd64"
29 .PATH:          ${.CURDIR}/contrib/gcc_gvmat64
30 SRCS+=          gvmat64.S
31 CFLAGS+=        -DASMV -DNO_UNDERLINE
32 .endif
33
34 minigzip:       all minigzip.o
35         $(CC) -o minigzip minigzip.o -L. -lz
36
37 example:        all example.o
38         $(CC) -o example example.o -L. -lz
39
40 test: example minigzip
41         (export LD_LIBRARY_PATH=. ; ./example )
42         (export LD_LIBRARY_PATH=. ; \
43                 echo hello world | ./minigzip | ./minigzip -d )
44
45 .include <bsd.lib.mk>