blob: f7934d81a1796e67d6be0b7ae2c0e888a2080beb (
plain) (
blame)
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
|
CFLAGS = -g -Wall -Wextra
check: check-vec check-sptree check-map
check-vec:
mkdir -p build
$(CC) $(CFLAGS) -Iinclude tests/vec.c -o build/vec
valgrind -q --error-exitcode=1 ./build/vec
check-sptree:
mkdir -p build
$(CC) $(CFLAGS) -Iinclude tests/sptree.c -o build/sptree
valgrind -q --error-exitcode=1 ./build/sptree
check-map:
mkdir -p build
$(CC) $(CFLAGS) -Iinclude tests/map.c -o build/map
valgrind -q --error-exitcode=1 ./build/map
bench: bench-vec bench-sptree bench-map
bench-vec:
mkdir -p build
$(CC) $(CFLAGS) -O2 -Iinclude tests/vec.c -o build/vec_opt
time ./build/vec_opt 2> build/vec_bench.txt
bench-sptree:
mkdir -p build
$(CC) $(CFLAGS) -O2 -Iinclude tests/sptree.c -o build/sptree_opt
time ./build/sptree_opt 2> build/sptree_bench.txt
bench-map:
mkdir -p build
$(CC) $(CFLAGS) -O2 -Iinclude tests/map.c -o build/map_opt
time ./build/map_opt 2> build/map_bench.txt
clean:
rm -rf build
|