about summary refs log tree commit diff stats
path: root/makefile
diff options
context:
space:
mode:
Diffstat (limited to 'makefile')
-rw-r--r--makefile7
1 files changed, 5 insertions, 2 deletions
diff --git a/makefile b/makefile
index e6f30d40..4f9f0f84 100644
--- a/makefile
+++ b/makefile
@@ -16,14 +16,17 @@ tangle/tangle:
 termbox/libtermbox.a:
 	cd termbox && make
 
-.PHONY: autogenerated_lists test valgrind clena
+.PHONY: autogenerated_lists test valgrind clang clena
 
 test: mu
 	./mu test
 
-valgrind: mu
+valgrind: clang
 	valgrind --leak-check=yes -q --error-exitcode=1 ./mu test
 
+clang: makefile mu.cc termbox/libtermbox.a autogenerated_lists
+	clang++ -fsanitize=undefined mu.cc termbox/libtermbox.a -o mu
+
 # auto-generated files; by convention they end in '_list'.
 autogenerated_lists: mu.cc function_list test_list