Home | History | Annotate | Line # | Download | only in tests
      1  1.1  christos # ################################################################
      2  1.1  christos # Copyright (c) Meta Platforms, Inc. and affiliates.
      3  1.1  christos # All rights reserved.
      4  1.1  christos #
      5  1.1  christos # This source code is licensed under both the BSD-style license (found in the
      6  1.1  christos # LICENSE file in the root directory of this source tree) and the GPLv2 (found
      7  1.1  christos # in the COPYING file in the root directory of this source tree).
      8  1.1  christos # ################################################################
      9  1.1  christos 
     10  1.1  christos # This Makefile presumes libzstd is built, using `make` in / or /lib/
     11  1.1  christos 
     12  1.1  christos ZSTDLIB_PATH = ../../../lib
     13  1.1  christos ZSTDLIB_NAME = libzstd.a
     14  1.1  christos ZSTDLIB = $(ZSTDLIB_PATH)/$(ZSTDLIB_NAME)
     15  1.1  christos 
     16  1.1  christos CPPFLAGS += -DXXH_NAMESPACE=ZSTD_ -I../ -I$(ZSTDLIB_PATH) -I$(ZSTDLIB_PATH)/common
     17  1.1  christos 
     18  1.1  christos CFLAGS ?= -O3
     19  1.1  christos CFLAGS += -g -Wall -Wextra -Wcast-qual -Wcast-align -Wconversion \
     20  1.1  christos           -Wformat=2 -Wstrict-aliasing=1
     21  1.1  christos 
     22  1.1  christos SEEKABLE_OBJS = ../zstdseek_compress.c ../zstdseek_decompress.c $(ZSTDLIB)
     23  1.1  christos 
     24  1.1  christos .PHONY: default clean test
     25  1.1  christos default: test
     26  1.1  christos 
     27  1.1  christos test: seekable_tests
     28  1.1  christos 	./seekable_tests
     29  1.1  christos 
     30  1.1  christos $(ZSTDLIB):
     31  1.1  christos 	$(MAKE) -C $(ZSTDLIB_PATH) $(ZSTDLIB_NAME)
     32  1.1  christos 
     33  1.1  christos seekable_tests : $(SEEKABLE_OBJS)
     34  1.1  christos 
     35  1.1  christos clean:
     36  1.1  christos 	@$(RM) core *.o tmp* result* *.zst \
     37  1.1  christos 		seekable_tests
     38  1.1  christos 	@echo Cleaning completed
     39