-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 786 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
CXX=clang++
CC=clang
LDFLAGS=-lpthread -libverbs
ifeq ($(DEBUG), 1)
CFLAGS=-I. -g
CPPFLAGS=-std=c++17 $(CFLAGS)
else
CFLAGS=-I. -m64 -O3 -fno-strict-aliasing
CPPFLAGS=-std=c++17 $(CFLAGS)
endif
PROGRAMS=timer_send timer_rdma timer_transmitter_send timer_transmitter_rdma
all: $(PROGRAMS)
timer_rdma: timer_rdma.cpp ibutils.cpp networking.o
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
timer_transmitter_rdma: timer_transmitter_rdma.cpp ibutils.cpp networking.o
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
timer_send: timer_send.cpp ibutils.cpp networking.o
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
timer_transmitter_send: timer_transmitter_send.cpp ibutils.cpp networking.o
$(CXX) $(CPPFLAGS) -o $@ $^ $(LDFLAGS)
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@
clean:
rm -f *.o $(PROGRAMS)