-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
43 lines (36 loc) · 1.69 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
all: build_filter query_filter
dependencies/fastfilter_cpp/src/xorfilter/xorfilter.h:
git submodule update --init --recursive
dependencies/xor_singleheader/include/binaryfusefilter.h:
git submodule update --init --recursive
dependencies/fastfilter_cpp/src/bloom/bloom.h:
git submodule update --init --recursive
query_filter: src/query_filter.cpp \
src/hexutil.h \
src/mappeablebloomfilter.h \
src/util.h \
src/sha.h \
dependencies/xor_singleheader/include/binaryfusefilter.h \
dependencies/xor_singleheader/include/xorfilter.h
c++ -O3 -o query_filter src/query_filter.cpp -Wall -std=c++11 -Idependencies
build_filter: src/build_filter.cpp \
src/hexutil.h \
src/mappeablebloomfilter.h \
src/util.h \
dependencies/fastfilter_cpp/src/bloom/bloom.h \
dependencies/fastfilter_cpp/src/hashutil.h \
dependencies/xor_singleheader/include/binaryfusefilter.h \
dependencies/xor_singleheader/include/xorfilter.h
c++ -O3 -o build_filter src/build_filter.cpp -std=c++11 -Wall -Idependencies/fastfilter_cpp/src -Idependencies
test: build_filter query_filter
./build_filter -V -f xor8 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f binaryfuse8 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f binaryfuse16 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
./build_filter -V -f bloom12 -o filter.bin sample.txt && \
./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && \
echo "SUCCESS" || (echo "Failure. There is a bug."| exit -1)
clean:
rm -f build_filter query_filter