#################################################################
###                     SAIGEgds Codes                        ###
###                                                           ###

# enable ARMA_64BIT_WORD for large matrices
PKG_CPPFLAGS = -DARMA_64BIT_WORD=1

# check GNU GCC for function multi-versioning
GCC_FLAG=$(shell $(CC) -dM -E - < /dev/null |grep -Eo '__GNUC__|__clang__|ICC' \
	|tr '\n' ' ' |grep GNUC |grep -v -e clang -e ICC)
LIB_GCC=$(if ${GCC_FLAG},-lgcc)


# to set flags for the linker
PKG_LIBS = -lm $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) \
	$(shell ${R_HOME}/bin/Rscript -e "RcppParallel::RcppParallelLibs()") \
	${LIB_GCC}

all: $(SHLIB)

clean:
	rm -f ../.travis.yml
	rm -f ../.gitignore
