-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathmakefile
More file actions
43 lines (31 loc) · 696 Bytes
/
makefile
File metadata and controls
43 lines (31 loc) · 696 Bytes
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
# CC=/usr/bin/g++
CXX ?= g++
CFLAGS = -O3 -std=c++11 -lpthread
EXEC=Bootest example example_custom_hash
all: $(EXEC)
ifeq ($(prof),1)
CFLAGS+= -pg
endif
ifeq ($(deb),1)
CFLAGS+= -O0 -DASSERTS -g
endif
ifeq ($(sani),1)
CFLAGS= -std=c++11 -lpthread -fsanitize=address -fno-omit-frame-pointer -O1 -fno-optimize-sibling-calls -g
endif
.PHONY: test clean
test:
./Bootest 10000 1 2 -check
all: $(EXEC)
example: example.cpp
$(CXX) -o $@ $^ $(CFLAGS)
example_custom_hash: example_custom_hash.cpp
$(CXX) -o $@ $^ $(CFLAGS)
Bootest: bootest.cpp
$(CXX) -o $@ $^ $(CFLAGS)
%.o: %.cpp %.h
$(CXX) -o $@ -c $< $(CFLAGS)
clean:
rm -rf *.o
rm Bootest
rm example
rm example_custom_hash