## Use R's portable OpenMP flags (do NOT hard-code -fopenmp etc.)
PKG_CFLAGS = $(SHLIB_OPENMP_CFLAGS)
PKG_LIBS   = $(SHLIB_OPENMP_CFLAGS) 

PKG_CPPFLAGS = -Ishared

## C sources in src/
SRCS_MAIN = \
	R_init_randomForestSGT.c \
	entry.c \
	augmentationOps.c \
	augmentationOpsCommon.c \
	augmentationOpsCustom.c \
	augmentationOpsSimple.c \
	cdlMain.c \
	cdlRegr.c \
	cdlUtil.c \
	cvRegr.c \
	cvUtil.c \
	descriptor.c \
	entryGeneric.c \
	greedyOps.c \
	internal.c \
	nodeOps.c \
	nrutilDerived.c \
	processEnsemble.c \
	regressionDerived.c \
	server.c \
	sexpOutgoing.c \
	sgtMain.c \
	sgtMainRT.c \
	splitGreedy.c \
	splitInfoDerived.c \
	splitRegr.c \
	splitUtil.c \
	stackOutput.c \
	stackOutputQQ.c \
	termOps.c \
	treeOps.c \
	treeOpsRT.c


## C sources in src/shared/
SRCS_SHARED = \
  shared/bootstrap.c \
  shared/classification.c \
  shared/diagnostic.c \
  shared/error.c \
  shared/factorOps.c \
  shared/internalCore.c \
  shared/leafLink.c \
  shared/nativeUtil.c \
  shared/nodeBaseOps.c \
  shared/nrutil.c \
  shared/stackParallel.c \
  shared/polarityNew.c \
  shared/preprocessForestRecord.c \
  shared/quantile.c \
  shared/random.c \
  shared/regression.c \
  shared/restoreTree.c \
  shared/sampling.c \
  shared/sexpIO.c \
  shared/sortedLink.c \
  shared/splitInfo.c \
  shared/stack.c \
  shared/stackAuxiliaryInfo.c \
  shared/stackForestObjects.c \
  shared/stackIncoming.c \
  shared/stackMembershipVectors.c \
  shared/stackPreDefined.c \
  shared/survival.c \
  shared/termBaseOps.c \
  shared/trace.c

## Tell R exactly which objects belong in the shared library
OBJECTS = $(SRCS_MAIN:.c=.o) $(SRCS_SHARED:.c=.o)

## Do NOT override the default "all" target – R's own makefiles provide that.
# all: $(SHLIB)


