forked from dmlc/wormhole
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (49 loc) · 1.45 KB
/
Makefile
File metadata and controls
66 lines (49 loc) · 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Makefile for wormhole project
ifneq ("$(wildcard ./config.mk)","")
config = config.mk
else
config = make/config.mk
endif
ROOTDIR = $(CURDIR)
REPOS = dmlc-core repo/xgboost
CPBIN = xgboost.dmlc kmeans.dmlc
.PHONY: clean all test pull
all: xgboost.dmlc kmeans.dmlc
# dmlc-core
dmlc-core:
git clone https://github.com/dmlc/dmlc-core; cd $(ROOTDIR)
dmlc-core/libdmlc.a: | dmlc-core
+ cd dmlc-core; make libdmlc.a config=$(ROOTDIR)/$(config); cd $(ROOTDIR)
# xgboost
repo/xgboost:
cd repo; git clone https://github.com/dmlc/xgboost; cd $(ROOTDIR)
repo/xgboost/xgboost: dmlc-core/libdmlc.a | repo/xgboost dmlc-core
+ cd repo/xgboost; make dmlc=$(ROOTDIR)/dmlc-core config=$(ROOTDIR)/$(config)
# parameter server
repo/ps-lite:
git clone https://github.com/dmlc/ps-lite repo/ps-lite
# rabit
repo/rabit:
cd repo; git clone https://github.com/dmlc/rabit; cd $(ROOTDIR)
repo/rabit/lib/librabit.a: | repo/rabit
+ cd repo/rabit; make; cd $(ROOTDIR)
learn/kmeans/kmeans.dmlc: learn/kmeans/kmeans.cc |repo/rabit/lib/librabit.a dmlc-core/libdmlc.a
+ cd learn/kmeans;make kmeans.dmlc; cd $(ROOTDIR)
# toolkits
xgboost.dmlc: repo/xgboost/xgboost
cp $+ $@
kmeans.dmlc: learn/kmeans/kmeans.dmlc
cp $+ $@
pull:
for prefix in $(REPOS); do \
if [ -d $$prefix ]; then \
cd $$prefix; git pull; cd $(ROOTDIR); \
fi \
done
clean:
for prefix in $(REPOS); do \
if [ -d $$prefix ]; then \
cd $$prefix; make clean; cd $(ROOTDIR); \
fi \
done
rm -rf $(BIN) *~ */*~