CXX_STD = CXX17

PKGROOT=.

LGB_CPPFLAGS = \
    @LGB_CPPFLAGS@ \
    -DUSE_SOCKET \
    -DLGB_R_BUILD

PKG_CPPFLAGS = \
    -I$(PKGROOT)/include \
    $(LGB_CPPFLAGS)

PKG_CXXFLAGS = \
    @OPENMP_CXXFLAGS@ \
    -pthread

PKG_LIBS = \
    @OPENMP_CXXFLAGS@ \
    @OPENMP_LIB@ \
    -pthread

OBJECTS = \
    boosting/boosting.o \
    boosting/gbdt.o \
    boosting/gbdt_model_text.o \
    boosting/gbdt_prediction.o \
    boosting/prediction_early_stop.o \
    boosting/sample_strategy.o \
    io/bin.o \
    io/config.o \
    io/config_auto.o \
    io/dataset.o \
    io/dataset_loader.o \
    io/file_io.o \
    io/json11.o \
    io/metadata.o \
    io/parser.o \
    io/train_share_states.o \
    io/tree.o \
    metric/dcg_calculator.o \
    metric/metric.o \
    objective/objective_function.o \
    network/linker_topo.o \
    network/linkers_mpi.o \
    network/linkers_socket.o \
    network/network.o \
    treelearner/data_parallel_tree_learner.o \
    treelearner/feature_histogram.o \
    treelearner/feature_parallel_tree_learner.o \
    treelearner/gpu_tree_learner.o \
    treelearner/gradient_discretizer.o \
    treelearner/linear_tree_learner.o \
    treelearner/serial_tree_learner.o \
    treelearner/tree_learner.o \
    treelearner/voting_parallel_tree_learner.o \
    utils/openmp_wrapper.o \
    c_api.o \
    lightgbm_R.o
