1# 2# $FreeBSD$ 3# 4 5LIB= z 6SHLIBDIR?= /lib 7SHLIB_MAJOR= 6 8MAN= zlib.3 9 10#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 11#CFLAGS=-g -DDEBUG 12#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 13# -Wstrict-prototypes -Wmissing-prototypes 14 15CFLAGS+= -DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR} 16 17WARNS?= 3 18 19CLEANFILES+= example.o example foo.gz minigzip.o minigzip 20 21SRCS+= adler32.c 22SRCS+= compress.c 23SRCS+= crc32.c 24SRCS+= deflate.c 25SRCS+= gzclose.c 26SRCS+= gzlib.c 27SRCS+= gzread.c 28SRCS+= gzwrite.c 29SRCS+= infback.c 30SRCS+= inffast.c 31SRCS+= inflate.c 32SRCS+= inftrees.c 33SRCS+= trees.c 34SRCS+= uncompr.c 35SRCS+= zopen.c 36SRCS+= zutil.c 37 38#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*} 39#.PATH: ${.CURDIR}/contrib/asm686 40#SRCS+= match.S 41#CFLAGS+= -DASMV -DNO_UNDERLINE 42#ACFLAGS+= -Wa,--noexecstack 43#.endif 44 45#.if ${MACHINE_ARCH} == "amd64" 46#.PATH: ${.CURDIR}/contrib/gcc_gvmat64 47#SRCS+= gvmat64.S 48#CFLAGS+= -DASMV -DNO_UNDERLINE 49#ACFLAGS+= -Wa,--noexecstack 50#.endif 51 52VERSION_DEF= ${.CURDIR}/Versions.def 53SYMBOL_MAPS= ${.CURDIR}/Symbol.map 54CFLAGS+= -DSYMBOL_VERSIONING 55 56INCS= zconf.h zlib.h 57 58minigzip: all minigzip.o 59 $(CC) -o minigzip minigzip.o -L. -lz 60 61example: all example.o 62 $(CC) -o example example.o -L. -lz 63 64test: example minigzip 65 (export LD_LIBRARY_PATH=. ; ./example ) 66 (export LD_LIBRARY_PATH=. ; \ 67 echo hello world | ./minigzip | ./minigzip -d ) 68 69.include <bsd.lib.mk> 70 71## XXX: clang integrated-as doesn't grok .intel_syntax directives yet 72#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS} 73#ACFLAGS+= ${ACFLAGS.${.IMPSRC:T}} 74