RHDF5_LIBS= $(shell echo 'Rhdf5lib::pkgconfig("PKG_C_LIBS")'|\
    "${R_HOME}/bin/R" --vanilla --slave) 
PKG_LIBS=$(RHDF5_LIBS)

USERDIR = ${R_PACKAGE_DIR}/lib${R_ARCH}
USERLIB = ${USERDIR}/libncdfFlow.a

 
all:  $(SHLIB)

$(SHLIB): $(USERLIB)

#expose static lib for other package to link to 
$(USERLIB): $(OBJECTS)
	mkdir -p "${USERDIR}"
	$(AR) rs "${USERLIB}" $(OBJECTS)








