-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
165 lines (115 loc) · 4.18 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
CC := gcc
LD := gcc
MAKE := make
CFLAGS += -Wall -Winline
CFLAGS += -O3
LDFLAGS += -lpthread -ltcmalloc_minimal
.PHONY: all clean
BINS = benchmark_list_spinlock \
benchmark_list_rcu \
benchmark_list_rlu \
benchmark_list_harris \
benchmark_list_vlist \
benchmark_list_swisstm \
benchmark_list_move_spinlock \
benchmark_list_move_rlu \
benchmark_list_move_vlist \
benchmark_list_move_swisstm \
benchmark_tree_prcu_eer \
benchmark_tree_prcu_d \
benchmark_tree_prcu_deer \
benchmark_tree_rcu \
benchmark_tree_rlu \
benchmark_tree_vtree \
benchmark_tree_bonsai \
benchmark_tree_vrbtree \
benchmark_tree_swisstm
all: $(BINS)
benchmark_list.o: benchmark_list.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
# LIST
list_spinlock.o: list_spinlock.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
list_rcu.o: list_rcu.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
rlu.o: rlu.c rlu.h
$(CC) $(CFLAGS) -c -o $@ $<
list_rlu.o: list_rlu.c benchmark_list.h rlu.h
$(CC) $(CFLAGS) -c -o $@ $<
qsbr.o: qsbr.c qsbr.h util.h
$(CC) $(CFLAGS) -c -o $@ $<
list_harris.o: list_harris.c benchmark_list.h util.h
$(CC) $(CFLAGS) -c -o $@ $<
list_vlist.o: list_vlist.c benchmark_list.h util.h
$(CC) $(CFLAGS) -c -o $@ $<
benchmark_list_spinlock: benchmark_list.o list_spinlock.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_rcu: benchmark_list.o list_rcu.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_rlu: benchmark_list.o list_rlu.o rlu.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_harris: benchmark_list.o list_harris.o qsbr.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_vlist: benchmark_list.o list_vlist.o qsbr.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_swisstm:
cd swisstm && $(MAKE) target/obj/intset-list
cp swisstm/target/obj/intset-list $@
# LIST MOVE
benchmark_list_move.o: benchmark_list_move.c benchmark_list_move.h
$(CC) $(CFLAGS) -c -o $@ $<
list_move_spinlock.o: list_move_spinlock.c benchmark_list_move.h
$(CC) $(CFLAGS) -c -o $@ $<
list_move_rlu.o: list_move_rlu.c benchmark_list_move.h
$(CC) $(CFLAGS) -c -o $@ $<
list_move_vlist.o: list_move_vlist.c benchmark_list_move.h
$(CC) $(CFLAGS) -c -o $@ $<
benchmark_list_move_spinlock: benchmark_list_move.o list_move_spinlock.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_move_rlu: benchmark_list_move.o list_move_rlu.o rlu.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_move_vlist: benchmark_list_move.o list_move_vlist.o qsbr.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_list_move_swisstm:
cd swisstm && $(MAKE) target/obj/intset-list-mv
cp swisstm/target/obj/intset-list-mv $@
# NON-BALANCED TREE
tree_prcu_eer.o: tree_prcu.c benchmark_list.h
$(CC) $(CFLAGS) -DPRCU_EER -c -o $@ $<
tree_prcu_d.o: tree_prcu.c benchmark_list.h
$(CC) $(CFLAGS) -DPRCU_D -c -o $@ $<
tree_prcu_deer.o: tree_prcu.c benchmark_list.h
$(CC) $(CFLAGS) -DPRCU_DEER -c -o $@ $<
tree_rcu.o: tree_rcu.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
tree_rlu.o: tree_rlu.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
tree_vtree.o: tree_vtree.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
benchmark_tree_prcu_eer: benchmark_list.o tree_prcu_eer.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_prcu_d: benchmark_list.o tree_prcu_d.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_prcu_deer: benchmark_list.o tree_prcu_deer.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_rcu: benchmark_list.o tree_rcu.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_rlu: benchmark_list.o tree_rlu.o rlu.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_vtree: benchmark_list.o tree_vtree.o qsbr.o
$(LD) -o $@ $^ $(LDFLAGS)
# BALANCED TREE
tree_bonsai.o: tree_bonsai.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
tree_vrbtree.o: tree_vrbtree.c benchmark_list.h
$(CC) $(CFLAGS) -c -o $@ $<
benchmark_tree_bonsai: benchmark_list.o tree_bonsai.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_vrbtree: benchmark_list.o tree_vrbtree.o qsbr.o
$(LD) -o $@ $^ $(LDFLAGS)
benchmark_tree_swisstm:
cd swisstm && $(MAKE) target/obj/intset-tree
cp swisstm/target/obj/intset-tree $@
clean:
cd swisstm && $(MAKE) clean
rm -f $(BINS) *.o