[v0.98] Add compiler flags (in a different target, "strict") to detect programming errors, as suggested by #90 and #76

This commit is contained in:
Dr-Noob
2021-08-04 23:15:16 +02:00
parent eac97bf721
commit 051a37862c

View File

@@ -50,6 +50,9 @@ debug: $(OUTPUT)
static: CFLAGS += -static -O3 static: CFLAGS += -static -O3
static: $(OUTPUT) static: $(OUTPUT)
strict: CFLAGS += -O3 -Werror -fsanitize=undefined -D_FORTIFY_SOURCE=2
strict: $(OUTPUT)
$(OUTPUT): Makefile $(SOURCE) $(HEADERS) $(OUTPUT): Makefile $(SOURCE) $(HEADERS)
$(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT) $(CC) $(CFLAGS) $(SANITY_FLAGS) $(SOURCE) -o $(OUTPUT)