summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile16
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..48e8cb8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+check:
+ mkdir -p build
+ $(CC) -g -Iinclude tests/vec.c -o build/vec
+ $(CC) -g -Iinclude tests/htrie.c -o build/htrie
+ valgrind -q --error-exitcode=1 ./build/vec
+ valgrind -q --error-exitcode=1 ./build/htrie
+
+bench:
+ 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
+ time ./build/vec_opt 2> build/vec_bench.txt
+ time ./build/htrie_opt 2> build/htrie_bench.txt
+
+clean:
+ rm -rf build