-
Notifications
You must be signed in to change notification settings - Fork 368
/
Makefile
84 lines (59 loc) · 2.54 KB
/
Makefile
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include config.mk
SOURCE_DIR=src
DRIVER_DIR=drivers
COMMON_DIR=$(SOURCE_DIR)/common
PROTONN_DIR=$(SOURCE_DIR)/ProtoNN
BONSAI_DIR=$(SOURCE_DIR)/Bonsai
IFLAGS = -I eigen/ -I$(MKL_ROOT)/include \
-I$(COMMON_DIR) -I$(PROTONN_DIR) -I$(BONSAI_DIR)
all: ProtoNNTrain ProtoNNPredict BonsaiTrain BonsaiPredict #ProtoNNIngestTest BonsaiIngestTest
libcommon.so: $(COMMON_INCLUDES)
$(MAKE) -C $(SOURCE_DIR)/common
libProtoNN.so: $(PROTONN_INCLUDES)
$(MAKE) -C $(SOURCE_DIR)/ProtoNN
libBonsai.so: $(BONSAI_INCLUDES)
$(MAKE) -C $(SOURCE_DIR)/Bonsai
ProtoNNTrainDriver.o:
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer
ProtoNNPredictDriver.o:
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor
BonsaiTrainDriver.o:
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer
BonsaiPredictDriver.o:
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor
#ProtoNNIngestTest.o BonsaiIngestTest.o:
ProtoNNTrain: ProtoNNTrainDriver.o libcommon.so libProtoNN.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
ProtoNNPredict: ProtoNNPredictDriver.o libcommon.so libProtoNN.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
#ProtoNNIngestTest: ProtoNNIngestTest.o libcommon.so libProtoNN.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
#Bonsai: BonsaiLocalDriver.o libcommon.so libBonsai.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
BonsaiTrain: BonsaiTrainDriver.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
BonsaiPredict: BonsaiPredictDriver.o libcommon.so libBonsai.so
$(CC) -o $@ $^ $(CFLAGS) $(MKL_SEQ_LDFLAGS) $(CILK_LDFLAGS)
#BonsaiIngestTest: BonsaiIngestTest.o libcommon.so libBonsai.so
# $(CC) -o $@ $^ $(CFLAGS) $(MKL_PAR_LDFLAGS) $(CILK_LDFLAGS)
.PHONY: clean cleanest
clean:
rm -f *.o
$(MAKE) -C $(SOURCE_DIR)/common clean
$(MAKE) -C $(SOURCE_DIR)/ProtoNN clean
$(MAKE) -C $(SOURCE_DIR)/Bonsai clean
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer clean
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor clean
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer clean
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor clean
cleanest: clean
rm -f ProtoNN ProtoNNPredict ProtoNNIngestTest BonsaiIngestTest Bonsai
$(MAKE) -C $(SOURCE_DIR)/common cleanest
$(MAKE) -C $(SOURCE_DIR)/ProtoNN cleanest
$(MAKE) -C $(SOURCE_DIR)/Bonsai cleanest
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/trainer cleanest
$(MAKE) -C $(DRIVER_DIR)/ProtoNN/predictor cleanest
$(MAKE) -C $(DRIVER_DIR)/Bonsai/trainer cleanest
$(MAKE) -C $(DRIVER_DIR)/Bonsai/predictor cleanest