Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src add support to build pigz as a host tool.



details:   https://anonhg.NetBSD.org/src/rev/7e51c9287071
branches:  trunk
changeset: 755734:7e51c9287071
user:      mrg <mrg%NetBSD.org@localhost>
date:      Fri Jun 18 05:26:12 2010 +0000

description:
add support to build pigz as a host tool.

still missing:
- TOOL_PIGZ
- support to use it instead of the host's "gzip"

diffstat:

 external/zlib/pigz/bin/pigz/Makefile |  24 +++++++++++++++++++++++-
 tools/pigz/Makefile                  |   6 ++++++
 2 files changed, 29 insertions(+), 1 deletions(-)

diffs (45 lines):

diff -r fb3236fdf61b -r 7e51c9287071 external/zlib/pigz/bin/pigz/Makefile
--- a/external/zlib/pigz/bin/pigz/Makefile      Fri Jun 18 04:21:21 2010 +0000
+++ b/external/zlib/pigz/bin/pigz/Makefile      Fri Jun 18 05:26:12 2010 +0000
@@ -1,4 +1,8 @@
-#      $NetBSD: Makefile,v 1.2 2010/06/18 04:21:23 mrg Exp $
+#      $NetBSD: Makefile,v 1.3 2010/06/18 05:26:12 mrg Exp $
+
+.ifdef HOSTPROG
+
+.include <bsd.own.mk>
 
 BINDIR=                /usr/bin
 
@@ -37,3 +41,21 @@
 .PATH: ${DIST}
 GZIPDIST=      ${NETBSDSRCDIR}/usr.bin/gzip
 .PATH: ${GZIPDIST}
+
+.else  # HOSTPROG
+
+SRCS=          pigz.c
+
+HOST_LDFLAGS=  -lz
+
+#HAVE_PTHREAD_H!=      if echo '#include <pthread.h>' | ${HOST_CC} -E - > /dev/null; then echo yes; else echo no; fi
+HAVE_PTHREAD_H?=       yes
+
+.if ${HAVE_PTHREAD_H} != "no"
+SRCS+=         yarn.c
+HOST_LDFLAGS+= -lpthread
+.else
+HOST_CPPFLAGS+=        -DNOTHREAD
+.endif
+
+.endif # HOSTPROG
diff -r fb3236fdf61b -r 7e51c9287071 tools/pigz/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/tools/pigz/Makefile       Fri Jun 18 05:26:12 2010 +0000
@@ -0,0 +1,6 @@
+#      $NetBSD: Makefile,v 1.1 2010/06/18 05:26:12 mrg Exp $
+
+HOSTPROGNAME=  ${_TOOL_PREFIX}pigz
+HOST_SRCDIR=   external/zlib/pigz/bin/pigz
+
+.include "${.CURDIR}/../Makefile.host"



Home | Main Index | Thread Index | Old Index