export CC=@CC@
export CXX=@CXX@
export PKG_CFLAGS=@CFLAGS@
export PKG_CXXFLAGS=@CXXFLAGS@
export PKG_CPICFLAGS=@CPICFLAGS@
export PKG_CXXPICFLAGS=@CXXPICFLAGS@
export PKG_CPPFLAGS=@CPPFLAGS@
export PKG_R_CPPFLAGS=@R_CPPFLAGS@
export RANLIB=@RANLIB@

ZSTD_LIB=@ZSTD_LIB@
BLOSC_LIB=@BLOSC_LIB@

PKG_LIBS=$(BLOSC_LIB) $(ZSTD_LIB)

all: $(SHLIB)

$(SHLIB): compression_libs

compression_libs: @BUILD_ZSTD@ @BUILD_BLOSC@

libblosc.a: @BUILD_ZSTD@
	$(MAKE) -C compression_tools/blosc

libzstd.a:
	$(MAKE) -C compression_tools/zstd-1.5.7
