CFLAGS = -g --std=c99 -MMD $(INCS)
CFLAGS += -Wall -Wextra
CFLAGS += -Wno-unused-function
+CFLAGS += -Werror
# Linker Setup
LD = $(CC)
# Set the variables below or set them on the command line to enable the
# corresponding feature
-WERROR = 0
DEBUG = 0
GPROF = 0
GCOV = 0
-# Treat all warnings as errors (poor man's lint?)
-ifeq ($(WERROR), 1)
- CFLAGS += -Wall -Wextra -Werror -Wno-unused-parameter
-endif
-
# GCC Debugging
ifeq ($(DEBUG), 1)
CFLAGS += -g -O0
CFLAGS += --coverage
LDFLAGS += --coverage
endif
-
-# Clang Analyzers
-ifeq ($(ANALYZERS), 1)
- CFLAGS += --analyze -Xanalyzer -analyzer-output=text
- LDFLAGS += --analyze -Xanalyzer -analyzer-output=text
-endif
-
-# Clang Sanitizers
-ifeq ($(SANITIZERS), 1)
- CFLAGS += -fsanitize=address,dataflow,undefined -flto
- LDFLAGS += -fsanitize=address,dataflow,undefined -flto
-endif
-