From c26ed9a09b659eb4c6a6e70bf469158607c6d850 Mon Sep 17 00:00:00 2001 From: Dalton Woodard Date: Tue, 14 Oct 2014 23:16:11 -0700 Subject: [PATCH] Update to Makefile, added change notes. --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d950655..8fea7d5 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,15 @@ +# change notes: +# filter out -Werror when compiling with gcc. It chooses to warn about strange things sometimes. +# Compiles will all flags below on clang with -Werror. + CC = gcc -CFLAGS = -std=c11 -Wall -Wextra -Werror -O3 -g +CFLAGS = -std=c11 -O3 -g -Wall -Wextra -Wformat=2 -Wshadow \ + -Wno-format-nonliteral -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition \ + -Wredundant-decls -Wnested-externs -Wmissing-include-dirs -Wswitch-default + +ifneq ($(CC),gcc) + $(CFLAGS) += -Werror +endif TESTS = $(wildcard tests/*.c) EXAMPLES = $(wildcard examples/*.c)