Makefile revision 1.18
11.18Smrg# $NetBSD: Makefile,v 1.18 2019/02/06 09:17:18 mrg Exp $ 21.1Sgwr# Small zcat (i.e. for install media) 31.1Sgwr# 41.17Schristos 51.17SchristosNOSSP=yes 61.17SchristosNOMAN= 71.17Schristos.include <bsd.own.mk> 81.1Sgwr 91.14SchristosSRCDIR= ${.CURDIR}/../../../common/dist/zlib 101.17SchristosLIBC= ${NETBSDSRCDIR}/lib/libc 111.17Schristos 121.17Schristos.PATH: ${SRCDIR} ${LIBC}/stdlib 131.1Sgwr 141.15StsutsuiWARNS?= 4 151.13StvPROG= zcat 161.1Sgwr 171.17Schristos# Just what we need from libz 181.17SchristosSRCS= zcat.c gzread.c gzclose.c gzlib.c inflate.c 191.17SchristosSRCS+= adler32.c crc32.c zutil.c inffast.c inftrees.c 201.17SchristosCPPFLAGS+= -I${SRCDIR} -DNO_GZCOMPRESS 211.13Stv 221.17Schristos# This avoids including stdio, threads, locale, etc. 231.17SchristosSRCS+= misc.c 241.17SchristosSRCS+= malloc.c # small 251.17SchristosCPPFLAGS+= -I${LIBC}/include 261.17SchristosCPPFLAGS+= -Dsnprintf=snprintf_ss -Dsprintf=sprintf_ss 271.17SchristosCPPFLAGS+= -Dstrerror=strerror_ss 281.1Sgwr 291.18Smrg.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc" 301.18SmrgCOPTS.inflate.c+= -Wno-error=implicit-fallthrough 311.18Smrg.endif 321.18Smrg 331.1Sgwr.include <bsd.prog.mk> 341.13Stv 351.1Sgwrtest: zcat 361.1Sgwr echo 'hello, hello!' | gzip | ./zcat 37