freebsd-skq/lib/libz/Makefile

81 lines
1.6 KiB
Makefile
Raw Normal View History

1996-08-18 17:59:48 +00:00
#
# $FreeBSD$
1996-08-18 17:59:48 +00:00
#
PACKAGE= runtime
1996-08-18 17:59:48 +00:00
LIB= z
SHLIBDIR?= /lib
SHLIB_MAJOR= 6
MAN= zlib.3 zopen.3
MLINKS+= zopen.3 zdopen.3
1996-08-18 17:59:48 +00:00
ZLIBSRC= ${SRCTOP}/sys/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
1996-08-18 17:59:48 +00:00
CFLAGS+= -DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR}
WARNS?= 3
CLEANFILES+= example.o example foo.gz minigzip.o minigzip
1996-08-18 17:59:48 +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
.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "amd64"
CFLAGS+= -DUNALIGNED_OK
.endif
VERSION_DEF= ${.CURDIR}/Versions.def
SYMBOL_MAPS= ${.CURDIR}/Symbol.map
CFLAGS+= -DSYMBOL_VERSIONING
INCS= zconf.h zlib.h
1996-08-18 17:59:48 +00:00
.PATH: ${ZLIBSRC}/test
ZLIB_VERSION!= sed -n '/define.*ZLIB_VERSION/{s,[^0-9.],,gp;q;}' ${ZLIBSRC}/zlib.h
zlib.pc: zlib.pc.in
sed -e 's,@prefix@,/usr,g ; \
s,@exec_prefix@,$${prefix},g ; \
s,@libdir@,$${exec_prefix}/lib,g ; \
s,@sharedlibdir@,$${libdir},g ; \
s,@includedir@,$${prefix}/include,g ; \
s,@VERSION@,${ZLIB_VERSION},g ;' \
${.ALLSRC} > ${.TARGET}
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 )
PCFILES= zlib.pc
1996-08-18 17:59:48 +00:00
.include <bsd.lib.mk>