Small update to change notes in Makefile.
This commit is contained in:
10
Makefile
10
Makefile
@@ -1,16 +1,12 @@
|
|||||||
# change notes:
|
# change notes:
|
||||||
# filter out -Werror when compiling with gcc. It chooses to warn about strange things sometimes.
|
# filter out -Werror when compiling ptest. GCC chooses to warn about strange things sometimes.
|
||||||
# Compiles will all flags below on clang with -Werror.
|
# mpc.c and mpc.h ompile will all flags below on clang and gcc with -Werror.
|
||||||
|
|
||||||
CC = gcc
|
CC = gcc
|
||||||
CFLAGS = -std=c11 -O3 -g -Wall -Wextra -Wformat=2 -Wshadow \
|
CFLAGS = -std=c11 -O3 -g -Werror -Wall -Wextra -Wformat=2 -Wshadow \
|
||||||
-Wno-format-nonliteral -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition \
|
-Wno-format-nonliteral -Wcast-align -Wwrite-strings -Wstrict-prototypes -Wold-style-definition \
|
||||||
-Wredundant-decls -Wnested-externs -Wmissing-include-dirs -Wswitch-default
|
-Wredundant-decls -Wnested-externs -Wmissing-include-dirs -Wswitch-default
|
||||||
|
|
||||||
ifneq ($(CC),gcc)
|
|
||||||
$(CFLAGS) += -Werror
|
|
||||||
endif
|
|
||||||
|
|
||||||
TESTS = $(wildcard tests/*.c)
|
TESTS = $(wildcard tests/*.c)
|
||||||
EXAMPLES = $(wildcard examples/*.c)
|
EXAMPLES = $(wildcard examples/*.c)
|
||||||
EXAMPLESEXE = $(EXAMPLES:.c=)
|
EXAMPLESEXE = $(EXAMPLES:.c=)
|
||||||
|
Reference in New Issue
Block a user