Skip to content

Commit a3db79d

Browse files
authored
Remove makefiles. (#5513)
1 parent 093e222 commit a3db79d

File tree

11 files changed

+8
-338
lines changed

11 files changed

+8
-338
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ nb-configuration*
6565
.pydevproject
6666
.settings/
6767
build
68-
config.mk
6968
/xgboost
7069
*.data
7170
build_plugin

Makefile

Lines changed: 1 addition & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
ifndef config
2-
ifneq ("$(wildcard ./config.mk)","")
3-
config = config.mk
4-
else
5-
config = make/config.mk
6-
endif
7-
endif
8-
91
ifndef DMLC_CORE
102
DMLC_CORE = dmlc-core
113
endif
@@ -30,16 +22,6 @@ ifndef MAKE_OK
3022
endif
3123
$(warning MAKE [$(MAKE)] - $(if $(MAKE_OK),checked OK,PROBLEM))
3224

33-
ifeq ($(OS), Windows_NT)
34-
UNAME="Windows"
35-
else
36-
UNAME=$(shell uname)
37-
endif
38-
39-
include $(config)
40-
ifeq ($(USE_OPENMP), 0)
41-
export NO_OPENMP = 1
42-
endif
4325
include $(DMLC_CORE)/make/dmlc.mk
4426

4527
# set compiler defaults for OSX versus *nix
@@ -62,75 +44,21 @@ export CXX = g++
6244
endif
6345
endif
6446

65-
export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS)
6647
export CFLAGS= -DDMLC_LOG_CUSTOMIZE=1 -std=c++11 -Wall -Wno-unknown-pragmas -Iinclude $(ADD_CFLAGS)
6748
CFLAGS += -I$(DMLC_CORE)/include -I$(RABIT)/include -I$(GTEST_PATH)/include
68-
#java include path
69-
export JAVAINCFLAGS = -I${JAVA_HOME}/include -I./java
7049

7150
ifeq ($(TEST_COVER), 1)
7251
CFLAGS += -g -O0 -fprofile-arcs -ftest-coverage
7352
else
7453
CFLAGS += -O3 -funroll-loops
75-
ifeq ($(USE_SSE), 1)
76-
CFLAGS += -msse2
77-
endif
7854
endif
7955

8056
ifndef LINT_LANG
8157
LINT_LANG= "all"
8258
endif
8359

84-
ifeq ($(UNAME), Windows)
85-
XGBOOST_DYLIB = lib/xgboost.dll
86-
JAVAINCFLAGS += -I${JAVA_HOME}/include/win32
87-
else
88-
ifeq ($(UNAME), Darwin)
89-
XGBOOST_DYLIB = lib/libxgboost.dylib
90-
CFLAGS += -fPIC
91-
else
92-
XGBOOST_DYLIB = lib/libxgboost.so
93-
CFLAGS += -fPIC
94-
endif
95-
endif
96-
97-
ifeq ($(UNAME), Linux)
98-
LDFLAGS += -lrt
99-
JAVAINCFLAGS += -I${JAVA_HOME}/include/linux
100-
endif
101-
102-
ifeq ($(UNAME), Darwin)
103-
JAVAINCFLAGS += -I${JAVA_HOME}/include/darwin
104-
endif
105-
106-
OPENMP_FLAGS =
107-
ifeq ($(USE_OPENMP), 1)
108-
OPENMP_FLAGS = -fopenmp
109-
else
110-
OPENMP_FLAGS = -DDISABLE_OPENMP
111-
endif
112-
CFLAGS += $(OPENMP_FLAGS)
113-
11460
# specify tensor path
115-
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck java pylint
116-
117-
all: lib/libxgboost.a $(XGBOOST_DYLIB) xgboost
118-
119-
$(DMLC_CORE)/libdmlc.a: $(wildcard $(DMLC_CORE)/src/*.cc $(DMLC_CORE)/src/*/*.cc)
120-
+ cd $(DMLC_CORE); "$(MAKE)" libdmlc.a config=$(ROOTDIR)/$(config); cd $(ROOTDIR)
121-
122-
$(RABIT)/lib/$(LIB_RABIT): $(wildcard $(RABIT)/src/*.cc)
123-
+ cd $(RABIT); "$(MAKE)" lib/$(LIB_RABIT) USE_SSE=$(USE_SSE); cd $(ROOTDIR)
124-
125-
jvm: jvm-packages/lib/libxgboost4j.so
126-
127-
SRC = $(wildcard src/*.cc src/*/*.cc)
128-
ALL_OBJ = $(patsubst src/%.cc, build/%.o, $(SRC))
129-
AMALGA_OBJ = amalgamation/xgboost-all0.o
130-
LIB_DEP = $(DMLC_CORE)/libdmlc.a $(RABIT)/lib/$(LIB_RABIT)
131-
ALL_DEP = $(filter-out build/cli_main.o, $(ALL_OBJ)) $(LIB_DEP)
132-
CLI_OBJ = build/cli_main.o
133-
include tests/cpp/xgboost_test.mk
61+
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck
13462

13563
build/%.o: src/%.cc
13664
@mkdir -p $(@D)
@@ -141,27 +69,6 @@ build/%.o: src/%.cc
14169
amalgamation/xgboost-all0.o: amalgamation/xgboost-all0.cc
14270
$(CXX) -c $(CFLAGS) $< -o $@
14371

144-
# Equivalent to lib/libxgboost_all.so
145-
lib/libxgboost_all.so: $(AMALGA_OBJ) $(LIB_DEP)
146-
@mkdir -p $(@D)
147-
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o %.a, $^) $(LDFLAGS)
148-
149-
lib/libxgboost.a: $(ALL_DEP)
150-
@mkdir -p $(@D)
151-
ar crv $@ $(filter %.o, $?)
152-
153-
lib/xgboost.dll lib/libxgboost.so lib/libxgboost.dylib: $(ALL_DEP)
154-
@mkdir -p $(@D)
155-
$(CXX) $(CFLAGS) -shared -o $@ $(filter %.o %a, $^) $(LDFLAGS)
156-
157-
jvm-packages/lib/libxgboost4j.so: jvm-packages/xgboost4j/src/native/xgboost4j.cpp $(ALL_DEP)
158-
@mkdir -p $(@D)
159-
$(CXX) $(CFLAGS) $(JAVAINCFLAGS) -shared -o $@ $(filter %.cpp %.o %.a, $^) $(LDFLAGS)
160-
161-
162-
xgboost: $(CLI_OBJ) $(ALL_DEP)
163-
$(CXX) $(CFLAGS) -o $@ $(filter %.o %.a, $^) $(LDFLAGS)
164-
16572
rcpplint:
16673
python3 dmlc-core/scripts/lint.py xgboost ${LINT_LANG} R-package/src
16774

@@ -172,16 +79,6 @@ lint: rcpplint
17279
python-package/xgboost/src --pylint-rc ${PWD}/python-package/.pylintrc xgboost \
17380
${LINT_LANG} include src python-package
17481

175-
pylint:
176-
flake8 --ignore E501 python-package
177-
flake8 --ignore E501 tests/python
178-
179-
test: $(ALL_TEST)
180-
$(ALL_TEST)
181-
182-
check: test
183-
./tests/cpp/xgboost_test
184-
18582
ifeq ($(TEST_COVER), 1)
18683
cover: check
18784
@- $(foreach COV_OBJ, $(COVER_OBJ), \
@@ -202,14 +99,6 @@ clean_all: clean
20299
cd $(DMLC_CORE); "$(MAKE)" clean; cd $(ROOTDIR)
203100
cd $(RABIT); "$(MAKE)" clean; cd $(ROOTDIR)
204101

205-
doxygen:
206-
doxygen doc/Doxyfile
207-
208-
# create standalone python tar file.
209-
pypack: ${XGBOOST_DYLIB}
210-
cp ${XGBOOST_DYLIB} python-package/xgboost/lib
211-
cd python-package; tar cf xgboost.tar xgboost; cd ..
212-
213102
# create pip source dist (sdist) pack for PyPI
214103
pippack: clean_all
215104
cd python-package; python setup.py sdist; mv dist/*.tar.gz ..; cd ..

demo/distributed-training/README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ if you are interested in contributing.
88
Build XGBoost with Distributed Filesystem Support
99
-------------------------------------------------
1010
To use distributed xgboost, you only need to turn the options on to build
11-
with distributed filesystems(HDFS or S3) in ```xgboost/make/config.mk```.
11+
with distributed filesystems(HDFS or S3) in cmake.
12+
13+
```
14+
cmake <path/to/xgboost> -DUSE_HDFS=ON -DUSE_S3=ON -DUSE_AZURE=ON
15+
```
1216

1317

1418
Step by Step Tutorial on AWS

doc/build.rst

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -173,27 +173,6 @@ This specifies an out of source build using the Visual Studio 64 bit generator.
173173

174174
After the build process successfully ends, you will find a ``xgboost.dll`` library file inside ``./lib/`` folder.
175175

176-
Compile XGBoost using MinGW
177-
---------------------------
178-
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``.
179-
180-
In MinGW, ``make`` command comes with the name ``mingw32-make``. You can add the following line into the ``.bashrc`` file:
181-
182-
.. code-block:: bash
183-
184-
alias make='mingw32-make'
185-
186-
(On 64-bit Windows, you should get `MinGW64 <https://sourceforge.net/projects/mingw-w64/>`_ instead.) Make sure
187-
that the path to MinGW is in the system PATH.
188-
189-
To build with MinGW, type:
190-
191-
.. code-block:: bash
192-
193-
cp make/mingw64.mk config.mk; make -j4
194-
195-
See :ref:`mingw_python` for buildilng XGBoost for Python.
196-
197176
.. _build_gpu_support:
198177

199178
Building with GPU support
@@ -252,8 +231,8 @@ To speed up compilation, run multiple jobs in parallel by appending option ``--
252231
Makefiles
253232
=========
254233

255-
It's only used for submitting R CRAN package and creating shorthands for running linters,
256-
performing packaging tasks etc. So the remaining makefiles are legacy.
234+
It's only used for creating shorthands for running linters, performing packaging tasks
235+
etc. So the remaining makefiles are legacy.
257236

258237
Python Package Installation
259238
===========================

make/config.mk

Lines changed: 0 additions & 67 deletions
This file was deleted.

make/mingw64.mk

Lines changed: 0 additions & 27 deletions
This file was deleted.

make/minimum.mk

Lines changed: 0 additions & 22 deletions
This file was deleted.

make/minimum_parallel.mk

Lines changed: 0 additions & 23 deletions
This file was deleted.

make/travis.mk

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)