head	1.10;
access;
symbols
	netbsd-11-0-RC6:1.9
	netbsd-11-0-RC5:1.9
	netbsd-11-0-RC4:1.9
	netbsd-11-0-RC3:1.9
	netbsd-11-0-RC2:1.9
	netbsd-11-0-RC1:1.9
	perseant-exfatfs-base-20250801:1.9
	netbsd-11:1.9.0.2
	netbsd-11-base:1.9;
locks; strict;
comment	@# @;


1.10
date	2026.05.01.14.32.50;	author christos;	state Exp;
branches;
next	1.9;
commitid	jHycBs7j4XBnv7EG;

1.9
date	2025.04.06.23.03.05;	author rillig;	state Exp;
branches;
next	1.8;
commitid	19bgwc0qOk34R2QF;

1.8
date	2025.01.17.10.40.09;	author riastradh;	state Exp;
branches;
next	1.7;
commitid	vbYh15FhJt7kiPFF;

1.7
date	2025.01.14.19.58.10;	author riastradh;	state Exp;
branches;
next	1.6;
commitid	JA0AI3zJT8UKtuFF;

1.6
date	2024.11.08.16.59.26;	author christos;	state Exp;
branches;
next	1.5;
commitid	uKpG3eo1o9uSDRwF;

1.5
date	2024.11.07.17.52.58;	author christos;	state Exp;
branches;
next	1.4;
commitid	5ayXoTTfuuDjYJwF;

1.4
date	2024.11.02.22.02.40;	author christos;	state Exp;
branches;
next	1.3;
commitid	5LzZxYwm1XzUv7wF;

1.3
date	2024.10.29.20.51.37;	author christos;	state Exp;
branches;
next	1.2;
commitid	JkPWKSkUXtBwfBvF;

1.2
date	2024.10.29.14.38.32;	author christos;	state Exp;
branches;
next	1.1;
commitid	jh9gxAZhnDpwbzvF;

1.1
date	2024.10.27.22.48.51;	author christos;	state Exp;
branches;
next	;
commitid	YoNkhK1y3s7KXlvF;


desc
@@


1.10
log
@merge changes between zstd-1.5.6 and zstd-1.5.7
@
text
@# $NetBSD: Makefile,v 1.9 2025/04/06 23:03:05 rillig Exp $

LIBISPRIVATE=pic
NOLINT=yes	# XXX
WARNS?=		4
.include <bsd.init.mk>
USE_FORT?= yes

CPPFLAGS+= -I${.OBJDIR}
DIST=${.CURDIR}/../dist
SRCDIR=${DIST}/lib

.PATH:	${SRCDIR}/decompress ${SRCDIR}/dictBuilder ${SRCDIR}/common \
	${SRCDIR}/compress ${SRCDIR}

LIB=	zstd

SRCS= \
cover.c \
debug.c \
divsufsort.c \
entropy_common.c \
error_private.c \
fastcover.c \
fse_compress.c \
fse_decompress.c \
hist.c \
huf_compress.c \
huf_decompress.c \
pool.c \
threading.c \
xxhash.c \
zdict.c \
zstd_common.c \
zstd_compress.c \
zstd_compress_literals.c \
zstd_compress_sequences.c \
zstd_compress_superblock.c \
zstd_ddict.c \
zstd_decompress.c \
zstd_decompress_block.c \
zstd_double_fast.c \
zstd_fast.c \
zstd_lazy.c \
zstd_ldm.c \
zstd_preSplit.c \
zstd_opt.c \
zstdmt_compress.c

.if ${MACHINE} == "amd64"
SRCS+= huf_decompress_${MACHINE}.S
.else
SRCS+= huf_decompress.c
.endif

# XXX: emmintrin.h causes lint pain
LINTFLAGS += -X 96,117,129,174,214,226,231,298

CPPFLAGS+= -I${SRCDIR} -DZSTD_MULTITHREAD

LIBDPLIBS += pthread ${NETBSDSRCDIR}/lib/libpthread

.if ${LIBISPRIVATE:Uno} == "no"
INCS=	zdict.h zstd.h zstd_errors.h
INCSDIR=	/usr/include


PC=libzstd.pc
FILES+=			${PC}
FILESOWN_${PC}=		${BINOWN}
FILESGRP_${PC}=		${BINGRP}
FILESMODE_${PC}=	${NONBINMODE}
FILESDIR_${PC}=		/usr/lib/pkgconfig

CLEANFILES+=		${PC}

all: ${PC}
dependall: all

${PC}: ${PC}.in
	@@${_MKTARGET_CREATE}
	@@(V=$$( (echo '#include <zstd.h>'; echo ZSTD_LIB_VERSION) | \
	    ${CC} -E - | tail -1 | tr -d ' ') && \
	    ${TOOL_SED} -e s,@@VERSION@@,$$V, \
		-e s,@@PREFIX@@,/usr, -e s,@@EXEC_PREFIX@@,/usr/bin, \
		-e s,@@INCLUDEDIR@@,/usr/include, -e s,@@LIBDIR@@,/usr/lib, \
		-e s,@@LIBS_PRIVATE@@,, \
	    < ${.ALLSRC} > ${.TARGET})
.endif

.include <bsd.lib.mk>
@


1.9
log
@all: remove 'constant in conditional context' from LINTFLAGS

Lint no longer emits this message, as it produced too many false
positives.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2025/01/17 10:40:09 riastradh Exp $
d46 1
@


1.8
log
@zstd/Makefile: Nix trailing whitespace.

No functional change intended.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2025/01/14 19:58:10 riastradh Exp $
d56 1
a56 1
LINTFLAGS += -X 96,117,129,161,174,214,226,231,298
@


1.7
log
@zstd, libuv: Fix conditional LIBISPRIVATE=pic setting.

This was wrong for arbitrary MKPIC=no builds, and is unnecessary for
sun2 builds now that bsd.lib.mk already handles this case
appropriately.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2024/11/08 16:59:26 christos Exp $	
d7 1
a7 1
USE_FORT?= yes	
d63 1
a63 1
INCS=	zdict.h zstd.h zstd_errors.h  
@


1.6
log
@try to fix the sun2 build: don't build pic since we are linking statically.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2024/11/07 17:52:58 christos Exp $	
a2 3
.if ${MACHINE} == "sun2"
LIBISPRIVATE=yes
.else
a3 1
.endif
@


1.5
log
@fix sun2 build.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2024/11/02 22:02:40 christos Exp $	
d3 3
d7 1
a65 5
.if ${MACHINE} == "sun2"
# large got offsets: generate movel instead of lea for got loading
COPTS.zstd_lazy.c += -mid-shared-library
.endif

@


1.4
log
@make zstd a private library (for now)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2024/10/29 20:51:37 christos Exp $	
d62 5
@


1.3
log
@fix names.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2024/10/29 14:38:32 christos Exp $	
d3 1
d60 3
a65 1
LIBDPLIBS += pthread ${NETBSDSRCDIR}/lib/libpthread
d88 1
@


1.2
log
@build libzstd.pc
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1 2024/10/27 22:48:51 christos Exp $	
d64 6
a69 5
FILES+=				libzstd.pc
FILESOWN_libarchive.pc=		${BINOWN}
FILESGRP_libarchive.pc=		${BINGRP}
FILESMODE_libarchive.pc=	${NONBINMODE}
FILESDIR_libarchive.pc=		/usr/lib/pkgconfig
d71 1
a71 1
CLEANFILES+=libzstd.pc
d73 1
a73 1
all: libzstd.pc
d76 1
a76 1
libzstd.pc: libzstd.pc.in
@


1.1
log
@Add build glue.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2024/09/02 15:33:39 christos Exp $	
d64 21
@

