-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
114 lines (77 loc) · 4.45 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
# minimalist makefile
######################
# To add a competitive technique, simply add your code in the src subdirectory (follow the README.md instructions) and
# add your executable file name to the EXECUTABLES variable below.
# along with a target to build it.
#######################
.SUFFIXES:
#
.SUFFIXES: .cpp .o .c .h
.PHONY: clean
UNAME := $(shell uname)
ifeq ($(UNAME), Linux)
OSFLAGS= -Wl,--no-as-needed
endif
#######################
# SunOS gcc7.2.0 modifications QSI/Jon Strabala
#########
# original CXX flag, new for FLAGS
ifeq ($(UNAME), SunOS)
# must be 64 bit compile, new for CFLAGS
OSFLAGS= -m64
# force gnu99 intead of c99 for getopt, new for CFLAGS
OSCFLAGS= -std=gnu99
endif
ifeq ($(DEBUG),1)
CFLAGS = -fuse-ld=gold -fPIC -std=c99 -ggdb -mavx2 -mbmi2 -march=native -Wall -Wextra -Wshadow -fsanitize=undefined -fno-omit-frame-pointer -fsanitize=address $(OSFLAGS) $(OSCFLAGS) -ldl
CXXFLAGS = -fuse-ld=gold -fPIC -std=c++11 -ggdb -mavx2 -mbmi2 -march=native -Wall -Wextra -Wshadow -fsanitize=undefined -fno-omit-frame-pointer -fsanitize=address $(OSFLAGS) -ldl
ROARFLAGS = -DCMAKE_BUILD_TYPE=Debug -DSANITIZE=ON
else
CFLAGS = -ggdb -fPIC -std=c99 -O3 -mavx2 -mbmi2 -march=native -Wall -Wextra -Wshadow $(OSFLAGS) -ldl
CXXFLAGS = -fPIC -std=c++11 -O3 -mavx2 -mbmi2 -march=native -Wall -Wextra -Wshadow $(OSFLAGS) -ldl
ROARFLAGS = -DCMAKE_BUILD_TYPE=Release
endif # debug
EXECUTABLES=wah32_benchmarks concise_benchmarks roaring_benchmarks slow_roaring_benchmarks bitmagic_benchmarks ewah32_benchmarks ewah64_benchmarks stl_vector_benchmarks stl_hashset_benchmarks stl_vector_benchmarks_memtracked stl_hashset_benchmarks_memtracked bitset_benchmarks malloced_roaring_benchmarks hot_roaring_benchmarks hot_slow_roaring_benchmarks gen
all: $(EXECUTABLES)
test:
./scripts/all.sh
bigtest:
./scripts/big.sh
hottest:
./scripts/hot_roaring.sh
src/roaring.c :
(cd src && exec ../CRoaring/amalgamation.sh && rm almagamation_demo.c && rm almagamation_demo.cpp)
gen : synthetic/anh_moffat_clustered.h synthetic/gen.cpp
$(CXX) $(CXXFLAGS) -o gen synthetic/gen.cpp -Isynthetic
roaring_benchmarks : src/roaring.c src/roaring_benchmarks.c
$(CC) $(CFLAGS) -o roaring_benchmarks src/roaring_benchmarks.c
hot_roaring_benchmarks : src/roaring.c src/hot_roaring_benchmarks.c
$(CC) $(CFLAGS) -ggdb -o hot_roaring_benchmarks src/hot_roaring_benchmarks.c
malloced_roaring_benchmarks : src/roaring.c src/roaring_benchmarks.c
$(CC) $(CFLAGS) -o malloced_roaring_benchmarks src/roaring_benchmarks.c -DRECORD_MALLOCS
slow_roaring_benchmarks : src/roaring.c src/roaring_benchmarks.c
$(CC) $(CFLAGS) -DDISABLE_X64 -o slow_roaring_benchmarks src/roaring_benchmarks.c
hot_slow_roaring_benchmarks : src/roaring.c src/hot_roaring_benchmarks.c
$(CC) $(CFLAGS) -ggdb -DDISABLE_X64 -o hot_slow_roaring_benchmarks src/hot_roaring_benchmarks.c
bitmagic_benchmarks: src/bitmagic_benchmarks.cpp
$(CXX) $(CXXFLAGS) -o bitmagic_benchmarks src/bitmagic_benchmarks.cpp -IBitMagic/src
ewah32_benchmarks: src/ewah32_benchmarks.cpp
$(CXX) $(CXXFLAGS) -o ewah32_benchmarks ./src/ewah32_benchmarks.cpp -IEWAHBoolArray/headers
wah32_benchmarks: src/wah32_benchmarks.cpp
$(CXX) $(CXXFLAGS) -o wah32_benchmarks ./src/wah32_benchmarks.cpp -IConcise/include
concise_benchmarks: src/concise_benchmarks.cpp
$(CXX) $(CXXFLAGS) -o concise_benchmarks ./src/concise_benchmarks.cpp -IConcise/include
ewah64_benchmarks: src/ewah64_benchmarks.cpp
$(CXX) $(CXXFLAGS) -o ewah64_benchmarks ./src/ewah64_benchmarks.cpp -IEWAHBoolArray/headers
stl_vector_benchmarks: src/stl_vector_benchmarks.cpp src/memtrackingallocator.h
$(CXX) $(CXXFLAGS) -o stl_vector_benchmarks ./src/stl_vector_benchmarks.cpp
stl_hashset_benchmarks: src/stl_hashset_benchmarks.cpp src/memtrackingallocator.h
$(CXX) $(CXXFLAGS) -o stl_hashset_benchmarks ./src/stl_hashset_benchmarks.cpp
stl_vector_benchmarks_memtracked: src/stl_vector_benchmarks.cpp src/memtrackingallocator.h
$(CXX) $(CXXFLAGS) -o stl_vector_benchmarks_memtracked ./src/stl_vector_benchmarks.cpp -DMEMTRACKED
stl_hashset_benchmarks_memtracked: src/stl_hashset_benchmarks.cpp src/memtrackingallocator.h
$(CXX) $(CXXFLAGS) -o stl_hashset_benchmarks_memtracked ./src/stl_hashset_benchmarks.cpp -DMEMTRACKED
bitset_benchmarks: src/bitset_benchmarks.c cbitset/include/bitset.h cbitset/src/bitset.c
$(CC) $(CFLAGS) -o bitset_benchmarks ./src/bitset_benchmarks.c cbitset/src/bitset.c -Icbitset/include
clean:
rm -r -f $(EXECUTABLES) src/roaring.c src/roaring.h src/roaring.hh bigtmp