## This file uses GNU make syntax $(shell ...) so we need to
## have "SystemRequirements: GNU make" in the DESCRIPTION file.

OBJECTS = \
    S4Vectors_stubs.o \
    H5File.o \
    global_errmsg_buf.o \
    H5DSetDescriptor.o \
    h5dimscales.o \
    uaselection.o \
    h5mread_helpers.o \
    h5mread_startscounts.o \
    ChunkIterator.o \
    h5mread_index.o \
    h5mread_sparse.o \
    h5mread.o \
    h5summarize.o \
    R_init_HDF5Array.o

RHDF5LIB_LIBS=$(shell "${R_HOME}/bin${R_ARCH_BIN}/Rscript" -e \
    'Rhdf5lib::pkgconfig("PKG_C_HL_LIBS")')

PKG_LIBS=$(RHDF5LIB_LIBS)

all: $(SHLIB)

clean:
	rm -f $(OBJECTS) HDF5Array.so

