Home | History | Annotate | Line # | Download | only in zcat
Makefile revision 1.18
      1 # $NetBSD: Makefile,v 1.18 2019/02/06 09:17:18 mrg Exp $
      2 # Small zcat (i.e. for install media)
      3 #
      4 
      5 NOSSP=yes
      6 NOMAN=
      7 .include <bsd.own.mk>
      8 
      9 SRCDIR=		${.CURDIR}/../../../common/dist/zlib
     10 LIBC=		${NETBSDSRCDIR}/lib/libc
     11 
     12 .PATH:		${SRCDIR} ${LIBC}/stdlib
     13 
     14 WARNS?=		4
     15 PROG=		zcat
     16 
     17 # Just what we need from libz
     18 SRCS=		zcat.c gzread.c gzclose.c gzlib.c inflate.c 
     19 SRCS+=		adler32.c crc32.c zutil.c inffast.c inftrees.c
     20 CPPFLAGS+=	-I${SRCDIR} -DNO_GZCOMPRESS
     21 
     22 # This avoids including stdio, threads, locale, etc.
     23 SRCS+=		misc.c
     24 SRCS+=		malloc.c	# small
     25 CPPFLAGS+=	-I${LIBC}/include
     26 CPPFLAGS+=	-Dsnprintf=snprintf_ss -Dsprintf=sprintf_ss
     27 CPPFLAGS+=	-Dstrerror=strerror_ss
     28 
     29 .if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
     30 COPTS.inflate.c+=	-Wno-error=implicit-fallthrough
     31 .endif
     32 
     33 .include <bsd.prog.mk>
     34 
     35 test: zcat
     36 	echo 'hello, hello!' | gzip | ./zcat
     37