USER_LIB_DIR = ${R_PACKAGE_DIR}/lib${R_ARCH}/

export CC=@CC@
export PKG_CFLAGS=@CFLAGS@
export PKG_CPICFLAGS=@CPICFLAGS@
export CXX=@CXX@
export PKG_CPPFLAGS=@CPPFLAGS@
export PKG_R_CPPFLAGS=@R_CPPFLAGS@
export RANLIB=@RANLIB@

PKG_LIBS=compression_tools/blosc/libblosc.a compression_tools/zstd-1.5.7/libzstd.a -lz -lstdc++

all: $(SHLIB)

$(SHLIB): compression_libs

compression_libs: libblosc.a libzstd.a

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

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

clean:
	$(MAKE) -C blosc clean
