-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (38 loc) · 870 Bytes
/
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
CC ?= gcc
LS ?= ls
CFLAGS ?= -Wall -Wextra -g
generate:
$(CC) -c -fPIC src/weight_balanced_tree.c
$(CC) -c -fPIC src/binary_tree.c
created:
$(CC) -shared -o weight_balanced_tree.so weight_balanced_tree.o
$(CC) -shared -o binary_tree.so binary_tree.o
verify:
$(LS) -l binary_tree.so
$(LS) -l weight_balanced_tree.so
benchmark:
$(CC) -c src/utils.c
$(CC) -o wbt src/weight_balanced_tree.c utils.o
./wbt
$(CC) -c src/utils.c
$(CC) -o bt src/binary_tree.c utils.o
./bt
debugbt:
$(CC) -c src/utils.c
$(CC) $(CFLAGS) src/binary_tree.c utils.o -o bt
gdb ./bt
debugwbt:
$(CC) -c src/utils.c
$(CC) $(CFLAGS) src/weight_balanced_tree.c utils.o -o wbt
gdb ./wbt
visualize:
pip3 install -r requirements.txt
python visualize.py
.PHONY: clean
clean:
rm -rf bt wbt
remove:
rm *.so
rm *.o
rm wbt
rm bt