## 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_randomForestRHF.c \
  entry.c	\
  medianLogStitchedHazard.c \
  weightedStitchedHazard.c \
  augmentationOps.c \
  augmentationOpsCommon.c \
  augmentationOpsSimple.c \
  descriptor.c \
  entryGeneric.c \
  greedyOps.c \
  internal.c \
  nodeOps.c \
  nrutilDerived.c \
  processEnsemble.c \
  rhfMain.c \
  rhfMainRT.c \
  server.c \
  sexpOutgoing.c \
  splitGreedy.c \
  splitInfoDerived.c \
  splitTDC.c \
  splitNLS.c \
  splitUtil.c \
  stackOutput.c \
  stackOutputQQ.c \
  stackOutputQQTest.c \
  stackSubjectInfo.c \
  survivalTDC.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)


