This commit is contained in:
Nils O. Selåsdal
2026-05-14 14:45:29 +02:00
parent d04b151279
commit 6185de0694
6 changed files with 15 additions and 16 deletions
+3 -2
View File
@@ -7,7 +7,8 @@ ifndef DEBUG
CFLAGS += -O2
CPPFLAGS += -DNDEBUG
else
CPPFLAGS += -DDEBUG
CPPFLAGS += -DDEBUG -fsanitize=address,undefined
LDFLAGS += -fsanitize=address,undefined
endif
BUILDDIR = build
@@ -31,7 +32,7 @@ $(BUILDDIR)/$(LIB): $(OBJECTS)
$(BUILDDIR)/test/%: test/%.c $(BUILDDIR)/$(LIB)
mkdir -p $(@D)
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -MP -o $@ $< $(BUILDDIR)/$(LIB)
$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -MMD -MP -o $@ $< $(BUILDDIR)/$(LIB)
.PHONY: test
test: $(TEST_BINS)