-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
79 lines (54 loc) · 1.37 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
# Author: Corentin Debains
# Email: cdebains@iit.edu
#
CXX=g++
CFLAGS=-Xlinker -zmuldefs -Llib -L/usr/local/lib -Iinc
LFLAGS=-lstdc++ -lrt -lpthread -lm -lc -lprotobuf -lprotoc
OBJECTS=data.o metadata.o idaAPI.o
#tocheck
#.PHONY: clean ida main data metadata
all:
make ida
###ZHT Library Compilation and import
LFLAGS+=-lzht
CFLAGS+=-Ilib/ECwrapper/inc
zht: lib/ZHT/Makefile
cd lib/ZHT && make
cp lib/ZHT/lib/libzht.a lib/
###Erasure Code Wrapper Library Compilation and Library Import
LFLAGS+=-lecwrapper
CUDAINC=-I $(CUDA_INC_PATH)
CUDALIB=-L $(CUDA_LIB_PATH)
CFLAGS+=$(CUDAINC) -Ilib/ZHT/inc
LFLAGS+=$(CUDALIB)
ecwrapper: lib/ECwrapper/Makefile
cd lib/ECwrapper && make
cp lib/ECwrapper/lib/libecwrapper.a lib/
###
## Custom File Make rules to compile all separately
# Should be deleted for finale version
main: ida.o
ls
data: data.o
ls
metadata: metadata.o
ls
##
ida: zht ecwrapper src/ida.cpp $(OBJECTS)
$(CXX) $(CFLAGS) src/ida.cpp -o bin/fu-fs $(LFLAGS)
PORT=5000
run: zht
lib/ZHT/bin/server_zht $(PORT) lib/ZHT/neighbor lib/ZHT/zht.cfg
obj:
mkdir -p obj
%.o: src/%.cpp obj
$(CXX) $(CFLAGS) -c src/$*.cpp -o obj/$*.o $(LFLAGS)
# A special kind of rule: These files don't need to be remade if they're
# out of date, just destroyed.
cache: src/gib_cuda_checksum.cu
rm -rf cache
mkdir cache
clean:
rm -rf obj cache
mrproper: clean
rm -f lib/*.a