aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--README.md5
-rw-r--r--makefile6
2 files changed, 10 insertions, 1 deletions
diff --git a/README.md b/README.md
index f8ea1b4..c049ce0 100644
--- a/README.md
+++ b/README.md
@@ -358,3 +358,8 @@ at start time, which provide a protocol mapping to instances / channels.
The API and structures are more-or-less documented in [midimonster.h](midimonster.h),
more detailed documentation may follow.
+
+To build with `clang` sanitizers and even more warnings enabled, run `make sanitize`.
+This is useful to check for common errors and oversights.
+
+For runtime leak analysis with `valgrind`, you can use `make run`.
diff --git a/makefile b/makefile
index d759a7c..b97c8d8 100644
--- a/makefile
+++ b/makefile
@@ -1,4 +1,4 @@
-.PHONY: clean
+.PHONY: all clean run sanitize
BACKENDS = artnet.so midi.so osc.so loopback.so evdev.so
OBJS = config.o backend.o plugin.o
PLUGINDIR = "\"./\""
@@ -30,3 +30,7 @@ clean:
run:
valgrind --leak-check=full --show-leak-kinds=all ./midimonster
+
+sanitize: CC = clang
+sanitize: CFLAGS = -g -Wall -Wpedantic -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer
+sanitize: midimonster $(BACKENDS)