Makefile revision 303975
1184610Salfred# 2184610Salfred# $FreeBSD: releng/11.0/lib/libz/Makefile 298107 2016-04-16 07:45:30Z gjb $ 3184610Salfred# 4184610Salfred 5184610SalfredPACKAGE=lib${LIB} 6184610SalfredLIB= z 7184610SalfredSHLIBDIR?= /lib 8184610SalfredSHLIB_MAJOR= 6 9184610SalfredMAN= zlib.3 zopen.3 10184610Salfred 11184610Salfred#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7 12184610Salfred#CFLAGS=-g -DDEBUG 13184610Salfred#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ 14184610Salfred# -Wstrict-prototypes -Wmissing-prototypes 15184610Salfred 16184610SalfredCFLAGS+= -DHAS_snprintf -DHAS_vsnprintf -I${.CURDIR} 17184610Salfred 18184610SalfredWARNS?= 3 19184610Salfred 20184610SalfredCLEANFILES+= example.o example foo.gz minigzip.o minigzip 21184610Salfred 22184610SalfredSRCS+= adler32.c 23184610SalfredSRCS+= compress.c 24184610SalfredSRCS+= crc32.c 25184610SalfredSRCS+= deflate.c 26184610SalfredSRCS+= gzclose.c 27194677SthompsaSRCS+= gzlib.c 28194677SthompsaSRCS+= gzread.c 29194677SthompsaSRCS+= gzwrite.c 30194677SthompsaSRCS+= infback.c 31194677SthompsaSRCS+= inffast.c 32194677SthompsaSRCS+= inflate.c 33194677SthompsaSRCS+= inftrees.c 34194677SthompsaSRCS+= trees.c 35194677SthompsaSRCS+= uncompr.c 36194677SthompsaSRCS+= zopen.c 37194677SthompsaSRCS+= zutil.c 38194677Sthompsa 39194677Sthompsa#.if ${MACHINE_ARCH} == "i386" && ${MACHINE_CPU:M*i686*} 40194677Sthompsa#.PATH: ${.CURDIR}/contrib/asm686 41194677Sthompsa#SRCS+= match.S 42194677Sthompsa#CFLAGS+= -DASMV -DNO_UNDERLINE 43194677Sthompsa#ACFLAGS+= -Wa,--noexecstack 44194677Sthompsa#.endif 45194677Sthompsa 46188942Sthompsa#.if ${MACHINE_ARCH} == "amd64" 47194677Sthompsa#.PATH: ${.CURDIR}/contrib/gcc_gvmat64 48184610Salfred#SRCS+= gvmat64.S 49188942Sthompsa#CFLAGS+= -DASMV -DNO_UNDERLINE 50188942Sthompsa#ACFLAGS+= -Wa,--noexecstack 51188942Sthompsa#.endif 52188942Sthompsa 53188942SthompsaVERSION_DEF= ${.CURDIR}/Versions.def 54188942SthompsaSYMBOL_MAPS= ${.CURDIR}/Symbol.map 55184610SalfredCFLAGS+= -DSYMBOL_VERSIONING 56194677Sthompsa 57194677SthompsaINCS= zconf.h zlib.h 58194677Sthompsa 59184610Salfred.PATH: ${.CURDIR}/test 60184610Salfred 61184610Salfredminigzip: all minigzip.o 62184610Salfred $(CC) -o minigzip minigzip.o -L. -lz 63194228Sthompsa 64184610Salfredexample: all example.o 65192502Sthompsa $(CC) -o example example.o -L. -lz 66242126Shselasky 67194228Sthompsatest: example minigzip 68199675Sthompsa (export LD_LIBRARY_PATH=. ; ./example ) 69199675Sthompsa (export LD_LIBRARY_PATH=. ; \ 70241987Shselasky echo hello world | ./minigzip | ./minigzip -d ) 71241987Shselasky 72241987ShselaskyFILES= zlib.pc 73241987ShselaskyFILESDIR= ${LIBDATADIR}/pkgconfig 74241987Shselasky 75241987Shselasky.include <bsd.lib.mk> 76241987Shselasky 77241987Shselasky## XXX: clang integrated-as doesn't grok .intel_syntax directives yet 78242126Shselasky#ACFLAGS.gvmat64.S= ${CLANG_NO_IAS} 79241987Shselasky