# Register where the header files for the package can be found
PKG_CXXFLAGS = -I../inst/include/

## With Rcpp 0.11.0 and later, we no longer need to set PKG_LIBS as there is
## no user-facing library. The include path to headers is already set by R.

#..# PKG_LIBS = -lws2_32

# OpenMP
PKG_CXXFLAGS += $(SHLIB_OPENMP_CXXFLAGS)
PKG_CXXFLAGS += -DBOOST_NO_CONCEPT_CHECKING
PKG_CXXFLAGS += -DSTRICT_R_HEADERS

# Blas i Lapack
# PKG_LIBS += $(shell $(R_HOME)/bin${R_ARCH_BIN}/Rscript.exe -e "Rcpp:::LdFlags()") $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS) 
PKG_LIBS = -lws2_32
PKG_LIBS += $(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

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

#..# CCACHE=ccache
#..# CXX_STD = $(CCACHE) CXX17
CXX_STD = CXX17

# Optional: safe compiler-specific additions (commented by default)
# PKG_CXXFLAGS += -g3 -O3 -std=c++17 -Wall
