1996-08-18 17:59:48 +00:00
|
|
|
#
|
2013-10-31 18:44:40 +00:00
|
|
|
# $FreeBSD$
|
1996-08-18 17:59:48 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
LIB= z
|
2015-06-15 15:34:20 +00:00
|
|
|
SHLIBDIR= /lib
|
2010-03-22 21:11:55 +00:00
|
|
|
SHLIB_MAJOR= 6
|
2014-03-06 00:25:21 +00:00
|
|
|
MAN= zlib.3 zopen.3
|
1996-08-18 17:59:48 +00:00
|
|
|
|
2010-03-22 21:11:55 +00:00
|
|
|
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
|
|
|
|
#CFLAGS=-g -DDEBUG
|
|
|
|
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
|
|
|
# -Wstrict-prototypes -Wmissing-prototypes
|
1996-08-18 17:59:48 +00:00
|
|
|
|
2010-03-22 21:11:55 +00:00
|
|
|
CFLAGS+= -DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR}
|
2000-12-06 01:49:08 +00:00
|
|
|
|
2010-01-02 09:58:07 +00:00
|
|
|
WARNS?= 3
|
|
|
|
|
1998-02-28 06:27:59 +00:00
|
|
|
CLEANFILES+= example.o example foo.gz minigzip.o minigzip
|
1996-08-18 17:59:48 +00:00
|
|
|
|
2010-03-22 21:11:55 +00:00
|
|
|
SRCS+= adler32.c
|
|
|
|
SRCS+= compress.c
|
|
|
|
SRCS+= crc32.c
|
|
|
|
SRCS+= deflate.c
|
|
|
|
SRCS+= gzclose.c
|
|
|
|
SRCS+= gzlib.c
|
|
|
|
SRCS+= gzread.c
|
|
|
|
SRCS+= gzwrite.c
|
|
|
|
SRCS+= infback.c
|
|
|
|
SRCS+= inffast.c
|
|
|
|
SRCS+= inflate.c
|
|
|
|
SRCS+= inftrees.c
|
|
|
|
SRCS+= trees.c
|
|
|
|
SRCS+= uncompr.c
|
|
|
|
SRCS+= zopen.c
|
|
|
|
SRCS+= zutil.c
|
|
|
|
|
2012-06-21 21:47:08 +00:00
|
|
|
#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
|
|
|
|
#.PATH: ${.CURDIR}/contrib/asm686
|
|
|
|
#SRCS+= match.S
|
|
|
|
#CFLAGS+= -DASMV -DNO_UNDERLINE
|
|
|
|
#ACFLAGS+= -Wa,--noexecstack
|
|
|
|
#.endif
|
2010-03-22 21:11:55 +00:00
|
|
|
|
2011-07-18 19:23:50 +00:00
|
|
|
#.if ${MACHINE_ARCH} == "amd64"
|
|
|
|
#.PATH: ${.CURDIR}/contrib/gcc_gvmat64
|
|
|
|
#SRCS+= gvmat64.S
|
|
|
|
#CFLAGS+= -DASMV -DNO_UNDERLINE
|
|
|
|
#ACFLAGS+= -Wa,--noexecstack
|
|
|
|
#.endif
|
2010-03-22 21:11:55 +00:00
|
|
|
|
|
|
|
VERSION_DEF= ${.CURDIR}/Versions.def
|
|
|
|
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
|
|
|
CFLAGS+= -DSYMBOL_VERSIONING
|
|
|
|
|
2000-01-14 07:57:47 +00:00
|
|
|
INCS= zconf.h zlib.h
|
1996-08-18 17:59:48 +00:00
|
|
|
|
2014-06-11 20:48:40 +00:00
|
|
|
.PATH: ${.CURDIR}/test
|
|
|
|
|
1996-08-18 17:59:48 +00:00
|
|
|
minigzip: all minigzip.o
|
|
|
|
$(CC) -o minigzip minigzip.o -L. -lz
|
|
|
|
|
|
|
|
example: all example.o
|
|
|
|
$(CC) -o example example.o -L. -lz
|
|
|
|
|
|
|
|
test: example minigzip
|
|
|
|
(export LD_LIBRARY_PATH=. ; ./example )
|
|
|
|
(export LD_LIBRARY_PATH=. ; \
|
|
|
|
echo hello world | ./minigzip | ./minigzip -d )
|
|
|
|
|
2014-10-27 23:43:25 +00:00
|
|
|
.ifndef COMPAT_32BIT
|
2014-06-11 20:44:54 +00:00
|
|
|
beforeinstall:
|
|
|
|
${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
|
|
|
|
${.CURDIR}/zlib.pc ${DESTDIR}${LIBDATADIR}/pkgconfig
|
2014-10-27 23:43:25 +00:00
|
|
|
.endif
|
2014-06-11 20:44:54 +00:00
|
|
|
|
1996-08-18 17:59:48 +00:00
|
|
|
.include <bsd.lib.mk>
|
2012-02-28 18:30:18 +00:00
|
|
|
|
|
|
|
## XXX: clang integrated-as doesn't grok .intel_syntax directives yet
|
|
|
|
#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS}
|
|
|
|
#ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}}
|