forked from microsoft/EdgeML
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (42 loc) · 1.82 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
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT license.
include config.mk
COMMON_INCLUDES=$(SOURCE_DIR)/common
PROTONN_INCLUDES=$(SOURCE_DIR)/ProtoNN
BONSAI_INCLUDES=$(SOURCE_DIR)/Bonsai
IFLAGS=-I eigen/ -I$(MKL_ROOT)/include \
-I$(COMMON_INCLUDES) -I$(PROTONN_INCLUDES) -I$(BONSAI_INCLUDES)
all: ProtoNN Bonsai #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
ProtoNNLocalDriver.o: ProtoNNLocalDriver.cpp $(PROTONN_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNNIngestTest.o: ProtoNNIngestTest.cpp $(PROTONN_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
BonsaiLocalDriver.o:BonsaiLocalDriver.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
BonsaiIngestTest.o:BonsaiIngestTest.cpp $(BONSAI_INCLUDES)
$(CC) -c -o $@ $(IFLAGS) $(CFLAGS) $<
ProtoNN: ProtoNNLocalDriver.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)
#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
cleanest: clean
rm -f ProtoNN ProtoNNIngestTest BonsaiIngestTest Bonsai
$(MAKE) -C $(SOURCE_DIR)/common cleanest
$(MAKE) -C $(SOURCE_DIR)/ProtoNN cleanest
$(MAKE) -C $(SOURCE_DIR)/Bonsai cleanest