# Makevars and Makevars.interpret need to be identical files, except the NATIVEDIR variable which indicates where to get the libebm C++ files
# Makevars needs to be named that exactly because it will get loaded from devtools::install_github and devtools will want it to be that name.  When being installed from devtools, we can refer to .cpp and .h files wherever they are in the repo, so we use the NATIVEDIR to point to them
# Makevars.interpret is the CRAN version of Makevars.  When the interpret_*.tar.gz is created the Makevars.interpret file gets copied as Makevars into the R building directory

NATIVEDIR=./libebm

CXX_STD = CXX17
PKG_CPPFLAGS= -I$(NATIVEDIR)/pch -I$(NATIVEDIR)/inc -I$(NATIVEDIR)/unzoned -I$(NATIVEDIR)/bridge -I$(NATIVEDIR) -I$(NATIVEDIR)/compute -I$(NATIVEDIR)/compute/objectives -I$(NATIVEDIR)/compute/metrics -DLIBEBM_R
# TODO test adding the g++/clang flags to PKG_CXXFLAGS.  I think -g0 and -O3 won't work though since the R compile flags already include -g and -O2:
PKG_CXXFLAGS=$(CXX_VISIBILITY) 

OBJECTS = \
   $(NATIVEDIR)/ApplyTermUpdate.o \
   $(NATIVEDIR)/BoosterCore.o \
   $(NATIVEDIR)/BoosterShell.o \
   $(NATIVEDIR)/CalcInteractionStrength.o \
   $(NATIVEDIR)/compute_accessors.o \
   $(NATIVEDIR)/ConvertAddBin.o \
   $(NATIVEDIR)/CutQuantile.o \
   $(NATIVEDIR)/CutUniform.o \
   $(NATIVEDIR)/CutWinsorized.o \
   $(NATIVEDIR)/dataset_shared.o \
   $(NATIVEDIR)/DataSetBoosting.o \
   $(NATIVEDIR)/DataSetInteraction.o \
   $(NATIVEDIR)/DetermineLinkFunction.o \
   $(NATIVEDIR)/debug_ebm.o \
   $(NATIVEDIR)/Discretize.o \
   $(NATIVEDIR)/Term.o \
   $(NATIVEDIR)/GenerateTermUpdate.o \
   $(NATIVEDIR)/InitializeGradientsAndHessians.o \
   $(NATIVEDIR)/InteractionCore.o \
   $(NATIVEDIR)/InteractionShell.o \
   $(NATIVEDIR)/interpretable_numerics.o \
   $(NATIVEDIR)/PartitionOneDimensionalBoosting.o \
   $(NATIVEDIR)/PartitionRandomBoosting.o \
   $(NATIVEDIR)/PartitionTwoDimensionalBoosting.o \
   $(NATIVEDIR)/PartitionTwoDimensionalInteraction.o \
   $(NATIVEDIR)/Purify.o \
   $(NATIVEDIR)/RandomDeterministic.o \
   $(NATIVEDIR)/random.o \
   $(NATIVEDIR)/sampling.o \
   $(NATIVEDIR)/InnerBag.o \
   $(NATIVEDIR)/Tensor.o \
   $(NATIVEDIR)/TensorTotalsBuild.o \
   $(NATIVEDIR)/TermInnerBag.o \
   $(NATIVEDIR)/unzoned/logging.o \
   $(NATIVEDIR)/unzoned/unzoned.o \
   $(NATIVEDIR)/compute/cpu_ebm/cpu_64.o \
   interpret_R.o
