head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.1
	zstd-1-5-7:1.1.1.1
	netbsd-11-0-RC3:1.1.1.1
	netbsd-11-0-RC2:1.1.1.1
	netbsd-11-0-RC1:1.1.1.1
	perseant-exfatfs-base-20250801:1.1.1.1
	netbsd-11:1.1.1.1.0.2
	netbsd-11-base:1.1.1.1
	zstd-1-5-6:1.1.1.1
	META:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2024.10.27.22.44.14;	author christos;	state Exp;
branches
	1.1.1.1;
next	;
commitid	IUZDrqSXcnIYVlvF;

1.1.1.1
date	2024.10.27.22.44.14;	author christos;	state Exp;
branches;
next	;
commitid	IUZDrqSXcnIYVlvF;


desc
@@


1.1
log
@Initial revision
@
text
@# ################################################################
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under both the BSD-style license (found in the
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
# in the COPYING file in the root directory of this source tree).
# You may select, at your option, one of the above-listed licenses.
# ################################################################

CFLAGS ?= -O3

CURL_CFLAGS := $(shell curl-config --cflags)
CURL_LDFLAGS := $(shell curl-config --libs) -pthread

PROGDIR := ../../programs
LIBDIR := ../../lib
ZSTD_CPPFLAGS := -I$(PROGDIR) -I$(LIBDIR) -I$(LIBDIR)/common -Wno-deprecated-declarations

REGRESSION_CFLAGS = $(CFLAGS) $(CURL_CFLAGS)
REGRESSION_CPPFLAGS = $(CPPFLAGS) $(ZSTD_CPPFLAGS)
REGRESSION_LDFLAGS = $(LDFLAGS) $(CURL_LDFLAGS)

all: test

xxhash.o: $(LIBDIR)/common/xxhash.c $(LIBDIR)/common/xxhash.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

util.o: $(PROGDIR)/util.c $(PROGDIR)/util.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

data.o: data.c data.h $(PROGDIR)/util.h $(LIBDIR)/common/xxhash.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

config.o: config.c config.h levels.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

method.h: data.h config.h result.h

method.o: method.c method.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

result.o: result.c result.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

test.o: test.c data.h config.h method.h
	$(CC) $(REGRESSION_CFLAGS) $(REGRESSION_CPPFLAGS) $< -c -o $@@

.PHONY: libzstd.a
libzstd.a:
	$(MAKE) -C $(LIBDIR) libzstd.a-mt
	cp $(LIBDIR)/libzstd.a .

test: test.o data.o config.o util.o method.o result.o xxhash.o libzstd.a
	$(CC) $^ $(REGRESSION_LDFLAGS) -o $@@

.PHONY: clean
clean:
	$(MAKE) -C $(LIBDIR) clean
	$(RM) *.o *.a test
@


1.1.1.1
log
@Import zstd-1.5.6 from:
    https://github.com/facebook/zstd/releases/download/v1.5.6/zstd-1.5.6.tar.gz
@
text
@@
