Remove makefiles. (#5513)
This commit is contained in:
parent
093e2227e3
commit
a3db79df22
1
.gitignore
vendored
1
.gitignore
vendored
@ -65,7 +65,6 @@ nb-configuration*
|
||||
.pydevproject
|
||||
.settings/
|
||||
build
|
||||
config.mk
|
||||
/xgboost
|
||||
*.data
|
||||
build_plugin
|
||||
|
||||
113
Makefile
113
Makefile
@ -1,11 +1,3 @@
|
||||
ifndef config
|
||||
ifneq ("$(wildcard ./config.mk)","")
|
||||
config = config.mk
|
||||
else
|
||||
config = make/config.mk
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef DMLC_CORE
|
||||
DMLC_CORE = dmlc-core
|
||||
endif
|
||||
@ -30,16 +22,6 @@ ifndef MAKE_OK
|
||||
endif
|
||||
$(warning MAKE [$(MAKE)] - $(if $(MAKE_OK),checked OK,PROBLEM))
|
||||
|
||||
ifeq ($(OS), Windows_NT)
|
||||
UNAME="Windows"
|
||||
else
|
||||
UNAME=$(shell uname)
|
||||
endif
|
||||
|
||||
include $(config)
|
||||
ifeq ($(USE_OPENMP), 0)
|
||||
export NO_OPENMP = 1
|
||||
endif
|
||||
include $(DMLC_CORE)/make/dmlc.mk
|
||||
|
||||
# set compiler defaults for OSX versus *nix
|
||||
@ -62,75 +44,21 @@ export CXX = g++
|
||||
endif
|
||||
endif
|
||||
|
||||
export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS)
|
||||
export CFLAGS= -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude $(ADD_CFLAGS)
|
||||
CFLAGS += -I$(DMLC_CORE)/include -I$(RABIT)/include -I$(GTEST_PATH)/include
|
||||
#java include path
|
||||
export JAVAINCFLAGS = -I${JAVA_HOME}/include -I./java
|
||||
|
||||
ifeq ($(TEST_COVER), 1)
|
||||
CFLAGS += -g -O0 -fprofile-arcs -ftest-coverage
|
||||
else
|
||||
CFLAGS += -O3 -funroll-loops
|
||||
ifeq ($(USE_SSE), 1)
|
||||
CFLAGS += -msse2
|
||||
endif
|
||||
endif
|
||||
|
||||
ifndef LINT_LANG
|
||||
LINT_LANG= "all"
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME), Windows)
|
||||
XGBOOST_DYLIB = lib/xgboost.dll
|
||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/win32
|
||||
else
|
||||
ifeq ($(UNAME), Darwin)
|
||||
XGBOOST_DYLIB = lib/libxgboost.dylib
|
||||
CFLAGS += -fPIC
|
||||
else
|
||||
XGBOOST_DYLIB = lib/libxgboost.so
|
||||
CFLAGS += -fPIC
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME), Linux)
|
||||
LDFLAGS += -lrt
|
||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/linux
|
||||
endif
|
||||
|
||||
ifeq ($(UNAME), Darwin)
|
||||
JAVAINCFLAGS += -I${JAVA_HOME}/include/darwin
|
||||
endif
|
||||
|
||||
OPENMP_FLAGS =
|
||||
ifeq ($(USE_OPENMP), 1)
|
||||
OPENMP_FLAGS = -fopenmp
|
||||
else
|
||||
OPENMP_FLAGS = -DDISABLE_OPENMP
|
||||
endif
|
||||
CFLAGS += $(OPENMP_FLAGS)
|
||||
|
||||
# specify tensor path
|
||||
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck java pylint
|
||||
|
||||
all: lib/libxgboost.a $(XGBOOST_DYLIB) xgboost
|
||||
|
||||
$(DMLC_CORE)/libdmlc.a: $(wildcard $(DMLC_CORE)/src/*.cc $(DMLC_CORE)/src/*/*.cc)
|
||||
+ cd $(DMLC_CORE); "$(MAKE)" libdmlc.a config=$(ROOTDIR)/$(config); cd $(ROOTDIR)
|
||||
|
||||
$(RABIT)/lib/$(LIB_RABIT): $(wildcard $(RABIT)/src/*.cc)
|
||||
+ cd $(RABIT); "$(MAKE)" lib/$(LIB_RABIT) USE_SSE=$(USE_SSE); cd $(ROOTDIR)
|
||||
|
||||
jvm: jvm-packages/lib/libxgboost4j.so
|
||||
|
||||
SRC = $(wildcard src/*.cc src/*/*.cc)
|
||||
ALL_OBJ = $(patsubst src/%.cc, build/%.o, $(SRC))
|
||||
AMALGA_OBJ = amalgamation/xgboost-all0.o
|
||||
LIB_DEP = $(DMLC_CORE)/libdmlc.a $(RABIT)/lib/$(LIB_RABIT)
|
||||
ALL_DEP = $(filter-out build/cli_main.o, $(ALL_OBJ)) $(LIB_DEP)
|
||||
CLI_OBJ = build/cli_main.o
|
||||
include tests/cpp/xgboost_test.mk
|
||||
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck
|
||||
|
||||
build/%.o: src/%.cc
|
||||
@mkdir -p $(@D)
|
||||
@ -141,27 +69,6 @@ build/%.o: src/%.cc
|
||||
amalgamation/xgboost-all0.o: amalgamation/xgboost-all0.cc
|
||||
$(CXX) -c $(CFLAGS) $< -o $@
|
||||
|
||||
# Equivalent to lib/libxgboost_all.so
|
||||
lib/libxgboost_all.so: $(AMALGA_OBJ) $(LIB_DEP)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o %.a, $^) $(LDFLAGS)
|
||||
|
||||
lib/libxgboost.a: $(ALL_DEP)
|
||||
@mkdir -p $(@D)
|
||||
ar crv $@ $(filter %.o, $?)
|
||||
|
||||
lib/xgboost.dll lib/libxgboost.so lib/libxgboost.dylib: $(ALL_DEP)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o %a, $^) $(LDFLAGS)
|
||||
|
||||
jvm-packages/lib/libxgboost4j.so: jvm-packages/xgboost4j/src/native/xgboost4j.cpp $(ALL_DEP)
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(CFLAGS) $(JAVAINCFLAGS) -shared -o $@ $(filter %.cpp %.o %.a, $^) $(LDFLAGS)
|
||||
|
||||
|
||||
xgboost: $(CLI_OBJ) $(ALL_DEP)
|
||||
$(CXX) $(CFLAGS) -o $@ $(filter %.o %.a, $^) $(LDFLAGS)
|
||||
|
||||
rcpplint:
|
||||
python3 dmlc-core/scripts/lint.py xgboost ${LINT_LANG} R-package/src
|
||||
|
||||
@ -172,16 +79,6 @@ lint: rcpplint
|
||||
python-package/xgboost/src --pylint-rc ${PWD}/python-package/.pylintrc xgboost \
|
||||
${LINT_LANG} include src python-package
|
||||
|
||||
pylint:
|
||||
flake8 --ignore E501 python-package
|
||||
flake8 --ignore E501 tests/python
|
||||
|
||||
test: $(ALL_TEST)
|
||||
$(ALL_TEST)
|
||||
|
||||
check: test
|
||||
./tests/cpp/xgboost_test
|
||||
|
||||
ifeq ($(TEST_COVER), 1)
|
||||
cover: check
|
||||
@- $(foreach COV_OBJ, $(COVER_OBJ), \
|
||||
@ -202,14 +99,6 @@ clean_all: clean
|
||||
cd $(DMLC_CORE); "$(MAKE)" clean; cd $(ROOTDIR)
|
||||
cd $(RABIT); "$(MAKE)" clean; cd $(ROOTDIR)
|
||||
|
||||
doxygen:
|
||||
doxygen doc/Doxyfile
|
||||
|
||||
# create standalone python tar file.
|
||||
pypack: ${XGBOOST_DYLIB}
|
||||
cp ${XGBOOST_DYLIB} python-package/xgboost/lib
|
||||
cd python-package; tar cf xgboost.tar xgboost; cd ..
|
||||
|
||||
# create pip source dist (sdist) pack for PyPI
|
||||
pippack: clean_all
|
||||
cd python-package; python setup.py sdist; mv dist/*.tar.gz ..; cd ..
|
||||
|
||||
@ -8,7 +8,11 @@ if you are interested in contributing.
|
||||
Build XGBoost with Distributed Filesystem Support
|
||||
-------------------------------------------------
|
||||
To use distributed xgboost, you only need to turn the options on to build
|
||||
with distributed filesystems(HDFS or S3) in ```xgboost/make/config.mk```.
|
||||
with distributed filesystems(HDFS or S3) in cmake.
|
||||
|
||||
```
|
||||
cmake <path/to/xgboost> -DUSE_HDFS=ON -DUSE_S3=ON -DUSE_AZURE=ON
|
||||
```
|
||||
|
||||
|
||||
Step by Step Tutorial on AWS
|
||||
|
||||
@ -173,27 +173,6 @@ This specifies an out of source build using the Visual Studio 64 bit generator.
|
||||
|
||||
After the build process successfully ends, you will find a ``xgboost.dll`` library file inside ``./lib/`` folder.
|
||||
|
||||
Compile XGBoost using MinGW
|
||||
---------------------------
|
||||
After installing `Git for Windows <https://git-for-windows.github.io/>`_, you should have a shortcut named ``Git Bash``. You should run all subsequent steps in ``Git Bash``.
|
||||
|
||||
In MinGW, ``make`` command comes with the name ``mingw32-make``. You can add the following line into the ``.bashrc`` file:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
alias make='mingw32-make'
|
||||
|
||||
(On 64-bit Windows, you should get `MinGW64 <https://sourceforge.net/projects/mingw-w64/>`_ instead.) Make sure
|
||||
that the path to MinGW is in the system PATH.
|
||||
|
||||
To build with MinGW, type:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
cp make/mingw64.mk config.mk; make -j4
|
||||
|
||||
See :ref:`mingw_python` for buildilng XGBoost for Python.
|
||||
|
||||
.. _build_gpu_support:
|
||||
|
||||
Building with GPU support
|
||||
@ -252,8 +231,8 @@ To speed up compilation, run multiple jobs in parallel by appending option ``--
|
||||
Makefiles
|
||||
=========
|
||||
|
||||
It's only used for submitting R CRAN package and creating shorthands for running linters,
|
||||
performing packaging tasks etc. So the remaining makefiles are legacy.
|
||||
It's only used for creating shorthands for running linters, performing packaging tasks
|
||||
etc. So the remaining makefiles are legacy.
|
||||
|
||||
Python Package Installation
|
||||
===========================
|
||||
|
||||
@ -1,67 +0,0 @@
|
||||
#-----------------------------------------------------
|
||||
# xgboost: the configuration compile script
|
||||
#
|
||||
# If you want to change the configuration, please use the following
|
||||
# steps. Assume you are on the root directory of xgboost.
|
||||
# First copy this file so that any local changes will be ignored by git
|
||||
#
|
||||
# $ cp make/config.mk .
|
||||
#
|
||||
# Next modify the according entries in the copied file and then compile by
|
||||
#
|
||||
# $ make
|
||||
#
|
||||
# or build in parallel with 8 threads
|
||||
#
|
||||
# $ make -j8
|
||||
#----------------------------------------------------
|
||||
|
||||
# choice of compiler, by default use system preference.
|
||||
# export CC = gcc
|
||||
# export CXX = g++
|
||||
# export MPICXX = mpicxx
|
||||
|
||||
# the additional link flags you want to add
|
||||
ADD_LDFLAGS =
|
||||
|
||||
# the additional compile flags you want to add
|
||||
ADD_CFLAGS =
|
||||
|
||||
# Whether enable openmp support, needed for multi-threading.
|
||||
USE_OPENMP = 1
|
||||
|
||||
# whether use HDFS support during compile
|
||||
USE_HDFS = 0
|
||||
|
||||
# whether use AWS S3 support during compile
|
||||
USE_S3 = 0
|
||||
|
||||
# whether use Azure blob support during compile
|
||||
USE_AZURE = 0
|
||||
|
||||
#----------------------------
|
||||
# Settings for power and arm arch
|
||||
#----------------------------
|
||||
ARCH := $(shell uname -a)
|
||||
ifneq (,$(filter $(ARCH), armv6l armv7l powerpc64le ppc64le aarch64))
|
||||
USE_SSE=0
|
||||
else
|
||||
USE_SSE=1
|
||||
endif
|
||||
|
||||
# Rabit library version,
|
||||
# - librabit.a Normal distributed version.
|
||||
# - librabit_empty.a Non distributed mock version,
|
||||
LIB_RABIT = librabit.a
|
||||
|
||||
# path to libjvm.so
|
||||
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
|
||||
|
||||
# whether to test with coverage measurement or not. (only used for `make cover`)
|
||||
# measured with gcov and html report generated with lcov if it is installed.
|
||||
# this disables optimization to ensure coverage information is correct
|
||||
TEST_COVER = 0
|
||||
|
||||
# path to gtest library (only used when $BUILD_TEST=1)
|
||||
# there should be an include path in $GTEST_PATH/include and library in $GTEST_PATH/lib
|
||||
GTEST_PATH ?=
|
||||
@ -1,27 +0,0 @@
|
||||
#-----------------------------------------------------------
|
||||
# xgboost: Configuration for MinGW(Windows 64bit)
|
||||
# This allows to compile xgboost on windows by using mingw.
|
||||
# You will need to get install an mingw toolchain.
|
||||
# g++-4.6 or later is required.
|
||||
#
|
||||
# see config.mk for template.
|
||||
#-----------------------------------------------------------
|
||||
export CXX=g++ -m64
|
||||
export CC=gcc -m64
|
||||
|
||||
# Whether enable openmp support, needed for multi-threading.
|
||||
USE_OPENMP = 1
|
||||
|
||||
# whether use HDFS support during compile
|
||||
USE_HDFS = 0
|
||||
|
||||
# whether use AWS S3 support during compile
|
||||
USE_S3 = 0
|
||||
|
||||
# whether use Azure blob support during compile
|
||||
USE_AZURE = 0
|
||||
|
||||
# Rabit library version,
|
||||
# - librabit.a Normal distributed version.
|
||||
# - librabit_empty.a Non distributed mock version,
|
||||
LIB_RABIT = librabit_empty.a
|
||||
@ -1,22 +0,0 @@
|
||||
#-----------------------------------------------------
|
||||
# xgboost: minumum dependency configuration,
|
||||
# see config.mk for template.
|
||||
#----------------------------------------------------
|
||||
|
||||
# Whether enable openmp support, needed for multi-threading.
|
||||
USE_OPENMP = 0
|
||||
|
||||
# whether use HDFS support during compile
|
||||
USE_HDFS = 0
|
||||
|
||||
# whether use AWS S3 support during compile
|
||||
USE_S3 = 0
|
||||
|
||||
# whether use Azure blob support during compile
|
||||
USE_AZURE = 0
|
||||
|
||||
# Rabit library version,
|
||||
# - librabit.a Normal distributed version.
|
||||
# - librabit_empty.a Non distributed mock version,
|
||||
LIB_RABIT = librabit_empty.a
|
||||
|
||||
@ -1,23 +0,0 @@
|
||||
#------------------------------------------------------------------------
|
||||
# xgboost: minumum dependency configuration with Parallelization.
|
||||
# This configuration is standard but cannot run distributed computing.
|
||||
#
|
||||
# see config.mk for template.
|
||||
#------------------------------------------------------------------------
|
||||
|
||||
# Whether enable openmp support, needed for multi-threading.
|
||||
USE_OPENMP = 1
|
||||
|
||||
# whether use HDFS support during compile
|
||||
USE_HDFS = 0
|
||||
|
||||
# whether use AWS S3 support during compile
|
||||
USE_S3 = 0
|
||||
|
||||
# whether use Azure blob support during compile
|
||||
USE_AZURE = 0
|
||||
|
||||
# Rabit library version,
|
||||
# - librabit.a Normal distributed version.
|
||||
# - librabit_empty.a Non distributed mock version,
|
||||
LIB_RABIT = librabit_empty.a
|
||||
@ -1,30 +0,0 @@
|
||||
|
||||
# the additional link flags you want to add
|
||||
ADD_LDFLAGS =
|
||||
|
||||
# the additional compile flags you want to add
|
||||
ADD_CFLAGS =
|
||||
|
||||
# Whether enable openmp support, needed for multi-threading.
|
||||
USE_OPENMP = 1
|
||||
|
||||
# whether use HDFS support during compile
|
||||
USE_HDFS = 0
|
||||
|
||||
# whether use AWS S3 support during compile
|
||||
USE_S3 = 0
|
||||
|
||||
# whether use Azure blob support during compile
|
||||
USE_AZURE = 0
|
||||
|
||||
# Rabit library version,
|
||||
# - librabit.a Normal distributed version.
|
||||
# - librabit_empty.a Non distributed mock version,
|
||||
LIB_RABIT = librabit.a
|
||||
|
||||
# path to libjvm.so
|
||||
LIBJVM=$(JAVA_HOME)/jre/lib/amd64/server
|
||||
|
||||
# path to googletest and whether to measure coverage or not
|
||||
GTEST_PATH =
|
||||
WITH_COVER = 1
|
||||
@ -1,7 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
#run make in rabit/test to generate librabit_mock
|
||||
#update config.mk and build xgboost using mock
|
||||
export DMLC_SUBMIT_CLUSTER=local
|
||||
|
||||
submit="python3 dmlc-core/tracker/dmlc-submit"
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
UTEST_ROOT=tests/cpp
|
||||
UTEST_OBJ_ROOT=build_$(UTEST_ROOT)
|
||||
UNITTEST=$(UTEST_ROOT)/xgboost_test
|
||||
|
||||
UNITTEST_SRC=$(wildcard $(UTEST_ROOT)/*.cc $(UTEST_ROOT)/*/*.cc)
|
||||
UNITTEST_OBJ=$(patsubst $(UTEST_ROOT)%.cc, $(UTEST_OBJ_ROOT)%.o, $(UNITTEST_SRC))
|
||||
|
||||
GTEST_LIB=$(GTEST_PATH)/lib/
|
||||
GTEST_INC=$(GTEST_PATH)/include/
|
||||
|
||||
UNITTEST_CFLAGS=$(CFLAGS)
|
||||
UNITTEST_LDFLAGS=$(LDFLAGS) -L$(GTEST_LIB) -lgtest
|
||||
UNITTEST_DEPS=lib/libxgboost.a $(DMLC_CORE)/libdmlc.a $(RABIT)/lib/$(LIB_RABIT)
|
||||
|
||||
COVER_OBJ=$(patsubst %.o, %.gcda, $(ALL_OBJ)) $(patsubst %.o, %.gcda, $(UNITTEST_OBJ))
|
||||
|
||||
$(UTEST_OBJ_ROOT)/$(GTEST_PATH)/%.o: $(GTEST_PATH)/%.cc
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(UNITTEST_CFLAGS) -I$(GTEST_INC) -I$(GTEST_PATH) -o $@ -c $<
|
||||
|
||||
$(UTEST_OBJ_ROOT)/%.o: $(UTEST_ROOT)/%.cc
|
||||
@mkdir -p $(@D)
|
||||
$(CXX) $(UNITTEST_CFLAGS) -I$(GTEST_INC) -o $@ -c $<
|
||||
|
||||
$(UNITTEST): $(UNITTEST_OBJ) $(UNITTEST_DEPS)
|
||||
$(CXX) $(UNITTEST_CFLAGS) -o $@ $^ $(UNITTEST_LDFLAGS)
|
||||
|
||||
|
||||
ALL_TEST=$(UNITTEST)
|
||||
ALL_TEST_OBJ=$(UNITTEST_OBJ)
|
||||
Loading…
x
Reference in New Issue
Block a user