57e604b097
party software, this provides more standarized import workflow and makes future upgrades easier. The following files are new with this commit: zconf.h.in zlib.map zlib.pc.in They are not connected to build, but were kept in tree for reference for future maintenance. All our local trivial changes were applied to contrib/zlib, and the contrib/zlib vendor source code is intended to 100% match lib/libz before this commit. MFC after: 2 weeks
83 lines
1.6 KiB
Makefile
83 lines
1.6 KiB
Makefile
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PACKAGE=lib${LIB}
|
|
LIB= z
|
|
SHLIBDIR?= /lib
|
|
SHLIB_MAJOR= 6
|
|
MAN= zlib.3 zopen.3
|
|
|
|
ZLIBSRC= ${SRCTOP}/contrib/zlib
|
|
|
|
.PATH: ${ZLIBSRC}
|
|
|
|
#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
|
|
#CFLAGS=-g -DDEBUG
|
|
#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
|
|
# -Wstrict-prototypes -Wmissing-prototypes
|
|
|
|
CFLAGS+= -DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR}
|
|
|
|
WARNS?= 3
|
|
|
|
CLEANFILES+= example.o example foo.gz minigzip.o minigzip
|
|
|
|
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
|
|
|
|
#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*}
|
|
#.PATH: ${ZLIBSRC}/contrib/asm686
|
|
#SRCS+= match.S
|
|
#CFLAGS+= -DASMV -DNO_UNDERLINE
|
|
#ACFLAGS+= -Wa,--noexecstack
|
|
#.endif
|
|
|
|
#.if ${MACHINE_ARCH} == "amd64"
|
|
#.PATH: ${ZLIBSRC}/contrib/gcc_gvmat64
|
|
#SRCS+= gvmat64.S
|
|
#CFLAGS+= -DASMV -DNO_UNDERLINE
|
|
#ACFLAGS+= -Wa,--noexecstack
|
|
#.endif
|
|
|
|
VERSION_DEF= ${.CURDIR}/Versions.def
|
|
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
|
|
CFLAGS+= -DSYMBOL_VERSIONING
|
|
|
|
INCS= zconf.h zlib.h
|
|
|
|
.PATH: ${ZLIBSRC}/test
|
|
|
|
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 )
|
|
|
|
FILES= zlib.pc
|
|
FILESDIR= ${LIBDATADIR}/pkgconfig
|
|
|
|
.include <bsd.lib.mk>
|
|
|
|
## XXX: clang integrated-as doesn't grok .intel_syntax directives yet
|
|
#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS}
|