1 # $NetBSD: Makefile,v 1.16 2017/01/11 04:04:12 christos Exp $ 2 # Small zcat (i.e. for install media) 3 # 4 # Note: gzio.c is compiled here so that crunchgen will assume 5 # the same symbol space for zcat.c and gzio.c which is required 6 # so that the fake deflate functions in zcat.c will satisfy the 7 # references to those functions in gzio.c (yes, it's a hack). 8 9 SRCDIR= ${.CURDIR}/../../../common/dist/zlib 10 11 WARNS?= 4 12 PROG= zcat 13 NOMAN= # defined 14 15 SRCS= zcat.c gzread.c gzclose.c gzlib.c 16 17 CPPFLAGS+= -I${SRCDIR} -DNO_GZCOMPRESS 18 DPADD+= ${LIBZ} 19 LDADD+= -lz 20 21 .include <bsd.prog.mk> 22 23 .PATH: ${SRCDIR} 24 25 test: zcat 26 echo 'hello, hello!' | gzip | ./zcat 27