aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMistivia <i@mistivia.com>2025-06-06 12:58:14 +0800
committerMistivia <i@mistivia.com>2025-06-06 12:58:14 +0800
commit1fad3a10fe4743d69342de294cc65bfe66e32bc9 (patch)
treed91be066e44fe7af1eeece0f1b081463bc64dfc7 /Makefile
parent4779050053cb5f73b54ff936c6393e82ffe5605c (diff)
fix leak and hashtable bug
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 3f409e9..6be68e4 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,8 @@
cc = gcc
+cflags = \
+ -g \
+ -fsanitize=address
+
src = $(shell ls src/*.c)
obj = $(src:.c=.o)
@@ -21,10 +25,10 @@ test: $(tests_bin)
@scripts/runall.sh $^
$(obj):%.o:%.c
- $(cc) -c -g $< -MD -MF $@.d -o $@
+ $(cc) -c $(cflags) $< -MD -MF $@.d -o $@
$(tests_bin):%.bin:%.c libalgds.a
- $(cc) -g -Isrc/ $< libalgds.a -MD -MF $@.d -o $@
+ $(cc) $(cflags) -Isrc/ $< libalgds.a -MD -MF $@.d -o $@
clean:
-rm $(shell find tests/ -name '*.bin')