diff options
author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-27 21:57:02 +0200 |
---|---|---|
committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-10-27 21:57:02 +0200 |
commit | 1f57645d9550e486a5bc209a0652bfad7fb8872a (patch) | |
tree | 2ff0fca8539c0fe147b463dca9e4d0e308336b95 /Makefile | |
parent | 5940254d9363ed8de9ba79a65cb074ec5aa4e69f (diff) | |
download | conts-1f57645d9550e486a5bc209a0652bfad7fb8872a.tar.gz conts-1f57645d9550e486a5bc209a0652bfad7fb8872a.zip |
add map
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 29 insertions, 8 deletions
@@ -1,16 +1,37 @@ -check: +CFLAGS = -g -std=c23 -Wall -Wextra +check: check-vec check-sptree check-map + +check-vec: mkdir -p build - $(CC) -g -Iinclude tests/vec.c -o build/vec - $(CC) -g -Iinclude tests/htrie.c -o build/htrie + $(CC) $(CFLAGS) -Iinclude tests/vec.c -o build/vec valgrind -q --error-exitcode=1 ./build/vec - valgrind -q --error-exitcode=1 ./build/htrie -bench: +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) -g -O2 -Iinclude tests/vec.c -o build/vec_opt - $(CC) -g -O2 -Iinclude tests/htrie.c -o build/htrie_opt + $(CC) $(CFLAGS) -O2 -Iinclude tests/vec.c -o build/vec_opt time ./build/vec_opt 2> build/vec_bench.txt - time ./build/htrie_opt 2> build/htrie_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 |