CXX_STD = @CXX_STD@

PKGROOT=.

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

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

PKG_CXXFLAGS = \
    ${SHLIB_OPENMP_CXXFLAGS} \
    ${SHLIB_PTHREAD_FLAGS}

PKG_LIBS = \
    ${SHLIB_OPENMP_CXXFLAGS} \
    ${SHLIB_PTHREAD_FLAGS} \
    -lws2_32 \
    -liphlpapi

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
