-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
55 lines (37 loc) · 1.57 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
CXXFLAGS=-O2 -std=c++0x -g -c -Wall -pthread -fopenmp
SRCS = util.cc train.cc bipbuffer.cc connection.cc order.cc server.cc sequence.cc sequencer.cc
OBJS = $(SRCS:.cc=.o)
TESTS = test_util test_train test_order test_ringbuffer test_bipbuffer test_server
all: $(OBJS) test benchmark
test_util: $(OBJS) test_util.o
g++ -o test_util test_util.o $(OBJS)
test_train: $(OBJS) test_train.o
g++ -o test_train test_train.o $(OBJS)
test_order: $(OBJS) test_order.o
g++ -o test_order test_order.o $(OBJS)
test_ringbuffer: $(OBJS) test_ringbuffer.o
g++ -pthread -o test_ringbuffer test_ringbuffer.o $(OBJS)
test_bipbuffer: $(OBJS) test_bipbuffer.o
g++ -o test_bipbuffer test_bipbuffer.o $(OBJS)
test_server: $(OBJS) test_server.o
g++ -pthread -o test_server test_server.o $(OBJS)
benchmark: $(OBJS) benchmark.o
g++ -pthread -fopenmp -o benchmark benchmark.o $(OBJS)
benchmark_sequence: $(OBJS) benchmark_sequence.o
g++ -pthread -o benchmark_sequence benchmark_sequence.o $(OBJS)
benchmark_order: $(OBJS) benchmark_order.o
g++ -o benchmark_order benchmark_order.o $(OBJS)
benchmark_train: $(OBJS) benchmark_train.o
g++ -o benchmark_train benchmark_train.o $(OBJS)
benchmark_bipbuffer: $(OBJS) benchmark_bipbuffer.o
g++ -o benchmark_bipbuffer benchmark_bipbuffer.o $(OBJS)
benchmark_ringbuffer: $(OBJS) benchmark_ringbuffer.o
g++ -pthread -o benchmark_ringbuffer benchmark_ringbuffer.o $(OBJS)
benchmark_server: $(OBJS) benchmark_server.o
g++ -pthread -o benchmark_server benchmark_server.o $(OBJS)
tests: $(TESTS)
for test in $^ ; do \
./$$test ; \
done
clean:
rm -f $(TESTS) *.o