aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2021-01-15 17:59:31 -0800
committerBruce Hill <bruce@bruce-hill.com>2021-01-15 17:59:31 -0800
commit1a3c90825afac05c096ae60df8c8409995305162 (patch)
tree12afaad5416864953ec2809b36e5a5933829fae4 /Makefile
parent00b96b1e1373335ff05145c5c678beff38faf369 (diff)
Added rule to simplify memory leak testing
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index b73d68d..02ea30d 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,10 @@ $(NAME): $(OBJFILES) $(NAME).c
clean:
rm -f $(NAME) $(OBJFILES)
+leaktest:
+ make G=-ggdb O=-O0 EXTRA_CFLAGS=-DDEBUG_HEAP clean bp
+ valgrind --leak-check=full ./bp -l -g grammars/bpeg.bp -p Grammar grammars/bpeg.bp
+
install: $(NAME)
mkdir -p -m 755 "$(PREFIX)/share/man/man1" "$(PREFIX)/bin" "$(SYSCONFDIR)/xdg/bp"
cp -rv grammars/* "$(SYSCONFDIR)/xdg/bp/"