aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index f0b2255..dfdac40 100644
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,7 @@ VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null \
WARN = -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes \
-Wpointer-arith -Wvla -Wformat=2
+WARN += $(if $(WERROR),-Werror)
DEPFLAGS = -MMD -MP
CPPFLAGS = -Isrc -Iclients -Ivendor -Ivendor/argon2
DEFS = -D_GNU_SOURCE -DARGON2_NO_THREADS -DBOKF_VERSION=\"$(VERSION)\"
@@ -109,6 +110,11 @@ test-asan:
test-ubsan:
$(MAKE) BUILD=build-ubsan CFLAGS="$(SAN_CFLAGS) -fsanitize=undefined" test-core
+gate:
+ $(MAKE) clean
+ $(MAKE) WERROR=1 test
+ $(MAKE) WERROR=1 test-asan
+
$(BUILD)/vendor/%.o: vendor/%.c
@mkdir -p $(dir $@)
$(CC) $(CFLAGS) $(DEPFLAGS) $(CPPFLAGS) $(DEFS) -w -c $< -o $@
@@ -140,5 +146,5 @@ install: all
clean:
rm -rf $(BUILD) build-asan build-ubsan
-.PHONY: all backend test test-core test-pty check test-asan test-ubsan \
+.PHONY: all backend test test-core test-pty check test-asan test-ubsan gate \
install clean