Added 'linty' target for make

"make linty" does lots of error checking while compiling.
Simplified the standard make's CFLAGS.
Cleaned up code to eliminate resulting warnings generated by "make linty".
This commit is contained in:
Bob Little 2017-06-17 20:43:19 -04:00 committed by Eric S. Raymond
parent d92da99106
commit d844c2a391
6 changed files with 20 additions and 19 deletions

View file

@ -25,9 +25,7 @@
VERS=1.0
CC?=gcc
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wall -Wpedantic -Wextra -g
CCFLAGS+=-Wstrict-prototypes
CCFLAGS+=-Wmissing-prototypes
CCFLAGS+=-std=c99 -D _DEFAULT_SOURCE -Wpedantic
LIBS=
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux)
@ -118,5 +116,8 @@ refresh: advent.html
dist: advent-$(VERS).tar.gz
linty: CCFLAGS += -W -Wall -Wextra -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wshadow -Wfloat-equal -Wcast-align -Wwrite-strings -Waggregate-return -Wcast-qual -Wswitch-enum -Wwrite-strings -Wunreachable-code -Winit-self -Wpointer-arith -O2
linty: advent
debug: CCFLAGS += -O0 --coverage -g
debug: advent